H3D::H3DSoundFileNode Class Reference
[Abstract nodes.]

This abstract node type is used to derive node types that can stream PCM sound data from a file. More...

#include <H3DSoundFileNode.h>

Inheritance diagram for H3D::H3DSoundFileNode:

Inheritance graph
List of all members.

Public Types

typedef H3DSoundFileNode *(* CreateNodeFunc )()
typedef bool(* SupportsFileFunc )(const string &url)
 Function ptr type for.

Public Member Functions

virtual unsigned int load (const string &_url)=0
 Load a sound file from the given url that will be used to generate PCM data.

Static Public Member Functions

template<class N>
static H3DSoundFileNodenewSoundFileNode ()
static H3DSoundFileNodegetSupportedFileReader (const string &url)
 Given an url to a file, it returns an instance of a H3DSoundFileNode class that can handle that file type.
static void registerFileReader (const string &name, CreateNodeFunc create, SupportsFileFunc supports)
 Register a file reader that can then be returned by getSupportedFileReader().
static void registerFileReader (const FileReaderRegistration &fr)
 Register a file reader that can then be returned by getSupportedFileReader().

Static Protected Attributes

static list< FileReaderRegistration > * registered_file_readers
static bool initialized = false

Classes

struct  FileReaderRegistration
 Class used to register a class to the registered file readers. More...

Detailed Description

This abstract node type is used to derive node types that can stream PCM sound data from a file.

It also upholds a database over all subclasses that registers itself. The getSupportedFileReader function can then be used to get an instance of a H3DSoundFileNode that supports a certain file type.


Member Function Documentation

H3DSoundFileNode * H3DSoundFileNode::getSupportedFileReader const string &  url  )  [static]
 

Given an url to a file, it returns an instance of a H3DSoundFileNode class that can handle that file type.

If no such class is registered NULL is returns.

static void H3D::H3DSoundFileNode::registerFileReader const string &  name,
CreateNodeFunc  create,
SupportsFileFunc  supports
[inline, static]
 

Register a file reader that can then be returned by getSupportedFileReader().

Parameters:
name The name of the class
create A function for creating an instance of that class.
supports A function to determine if the class supports a given file type.


Generated on Thu Aug 24 12:39:22 2006 for H3D API by  doxygen 1.4.5