dashel  1.3.3
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
Dashel::StreamTypeRegistry Struct Reference

Registry of constructors to a stream, to add new stream types dynamically. More...

#include <dashel.h>

Public Types

typedef Stream *(* CreatorFunc) (const std::string &target, const Hub &hub)
 A function which creates an instance of a stream.
 

Public Member Functions

 StreamTypeRegistry ()
 Register known stream types, implemented in different platform-specific files.
 
void reg (const std::string &proto, const CreatorFunc func)
 Register a new stream type.
 
Streamcreate (const std::string &proto, const std::string &target, const Hub &hub) const
 Create a stream of a given type, return 0 if type does not exist.
 
std::string list () const
 Return list of stream types.
 

Protected Types

typedef std::map< std::string, CreatorFuncCreatorMap
 a map of stream type names to constructors and arguments
 

Protected Attributes

CreatorMap creators
 streams that can be created
 

Detailed Description

Registry of constructors to a stream, to add new stream types dynamically.


The documentation for this struct was generated from the following file: