Public Types | Public Member Functions | Protected Types | Protected Attributes
Dashel::StreamTypeRegistry Struct Reference

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

#include <dashel.h>

List of all members.

Public Types

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

Public Member Functions

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.
void reg (const std::string &proto, const CreatorFunc func)
 Register a new stream type.
 StreamTypeRegistry ()
 Register known stream types, implemented in different platform-specific files.

Protected Types

typedef std::map< std::string,
CreatorFunc
CreatorMap
 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.

Definition at line 521 of file dashel.h.


Member Typedef Documentation

typedef Stream*(* Dashel::StreamTypeRegistry::CreatorFunc)(const std::string &target, const Hub &hub)

A function which creates an instance of a stream.

Definition at line 524 of file dashel.h.

typedef std::map<std::string, CreatorFunc> Dashel::StreamTypeRegistry::CreatorMap [protected]

a map of stream type names to constructors and arguments

Definition at line 540 of file dashel.h.


Constructor & Destructor Documentation

Register known stream types, implemented in different platform-specific files.

Definition at line 1341 of file dashel-posix.cpp.


Member Function Documentation

Stream * Dashel::StreamTypeRegistry::create ( 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.

Definition at line 304 of file dashel-common.cpp.

std::string Dashel::StreamTypeRegistry::list ( ) const

Return list of stream types.

Definition at line 314 of file dashel-common.cpp.

void Dashel::StreamTypeRegistry::reg ( const std::string &  proto,
const CreatorFunc  func 
)

Register a new stream type.

Definition at line 299 of file dashel-common.cpp.


Member Data Documentation

streams that can be created

Definition at line 542 of file dashel.h.


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


dashel
Author(s): Stéphane Magnenat
autogenerated on Sun Oct 5 2014 23:46:32