Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::ConnectionFactory Class Reference
[OpenSG network support]

Brief. More...

#include <OSGConnectionFactory.h>

Collaboration diagram for osg::ConnectionFactory:

Collaboration graph
[legend]
List of all members.

Public Types

types
typedef std::map< std::string,
ConnectionType * > 
TypeMap

Public Methods

interface
Connectioncreate (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

Detailed Description

Brief.

Author:
Marcus Roth
The ConnectionFactory knows all types of connections by name. A new connection object could be crated by calling
 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");
 


Member Typedef Documentation

typedef std::map<std::string,ConnectionType *> osg::ConnectionFactory::TypeMap
 


Constructor & Destructor Documentation

ConnectionFactory::ConnectionFactory void    [protected]
 

Constructor documentation

ConnectionFactory::~ConnectionFactory void    [protected, virtual]
 

Destructor documentation

osg::ConnectionFactory::ConnectionFactory const ConnectionFactory &    source [private]
 

prohibit default function (move to 'public' if needed)


Member Function Documentation

ConnectionFactory & ConnectionFactory::the void    [static]
 

get factory

Connection * ConnectionFactory::create const string &    name
 

create connection by name

void osg::ConnectionFactory::dump void   
 

void ConnectionFactory::addType ConnectionType   type [protected]
 

add new type

void ConnectionFactory::subType ConnectionType   type [protected]
 

remove type

void osg::ConnectionFactory::operator= const ConnectionFactory &    source [private]
 

prohibit default function (move to 'public' if needed)


Friends And Related Function Documentation

friend class ConnectionType [friend]
 


Member Data Documentation

TypeMap osg::ConnectionFactory::_map [protected]
 

ConnectionFactory * ConnectionFactory::_the = NULL [static, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Jul 3 16:32:28 2002 for OpenSG by doxygen1.2.16