|
dashel
1.3.3
|
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. | |
| Stream * | 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. | |
| std::string | list () const |
| Return list of stream types. | |
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 | |
Registry of constructors to a stream, to add new stream types dynamically.
1.8.11