#include <OSGConnectionFactory.h>
Collaboration diagram for osg::ConnectionFactory:

Public Types | |
types | |
| typedef std::map< std::string, ConnectionType * > | TypeMap |
Public Methods | |
interface | |
| Connection * | create (const string &name) |
Dump | |
| void | dump (void) |
Static Public Methods | |
access | |
| ConnectionFactory & | the () |
Protected Methods | |
Constructors | |
| ConnectionFactory (void) | |
Destructor | |
| virtual | ~ConnectionFactory (void) |
Type information | |
| void | addType (ConnectionType *type) |
| void | subType (ConnectionType *type) |
Protected Attributes | |
fields | |
| TypeMap | _map |
Private Methods | |
| ConnectionFactory (const ConnectionFactory &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const ConnectionFactory &source) |
| prohibit default function (move to 'public' if needed) | |
Static Private Attributes | |
| ConnectionFactory * | _the = NULL |
Friends | |
| class | ConnectionType |
Connection *c = ConnectionFactory::the().create("Multicast");
if(!c)
{
SLOG << "Unknown connection:";
}
Each connection type must be registered to the factory. This is done by static initialisation. The following example shows registration of the Multicast connection.
ConnectionType MulticastConnection::_type(&MulticastConnection::create,
"Multicast");
|
|
|
|
|
Constructor documentation |
|
|
Destructor documentation |
|
|
prohibit default function (move to 'public' if needed)
|
|
|
get factory |
|
|
create connection by name |
|
|
|
|
|
add new type |
|
|
remove type |
|
|
prohibit default function (move to 'public' if needed)
|
|
|
|
|
|
|
|
|
|
1.2.16