OSG::ConnectionFactoryBase Class Reference

Factory for Connections, see. More...

#include <OSGConnectionFactory.h>

List of all members.


Public Types

types


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

Public Member Functions

interface


GroupConnectioncreateGroup (const std::string &name)
PointConnectioncreatePoint (const std::string &name)
Dump


void dump (void)

Protected Member Functions

Constructors


 ConnectionFactoryBase (void)
Destructor


virtual ~ConnectionFactoryBase (void)
Type information


void addGroupType (ConnectionType *type)
void addPointType (ConnectionType *type)
void subGroupType (ConnectionType *type)
void subPointType (ConnectionType *type)

Protected Attributes

fields


TypeMap _groupMap
TypeMap _pointMap

Private Member Functions

 ConnectionFactoryBase (const ConnectionFactoryBase &source)
 prohibit default function (move to 'public' if needed)
void operator= (const ConnectionFactoryBase &source)
 prohibit default function (move to 'public' if needed)

Friends

class ConnectionType
class SingletonHolder

Detailed Description

Definition at line 57 of file OSGConnectionFactory.h.


Member Typedef Documentation

typedef std::map<std::string,ConnectionType *> OSG::ConnectionFactoryBase::TypeMap

Definition at line 67 of file OSGConnectionFactory.h.


Constructor & Destructor Documentation

OSG::ConnectionFactoryBase::ConnectionFactoryBase ( void   )  [protected]

Definition at line 94 of file OSGConnectionFactory.cpp.

00094                                                  :
00095     _groupMap(),
00096     _pointMap()
00097 {
00098 }

OSG::ConnectionFactoryBase::~ConnectionFactoryBase ( void   )  [protected, virtual]

Definition at line 105 of file OSGConnectionFactory.cpp.

00106 {
00107 }

OSG::ConnectionFactoryBase::ConnectionFactoryBase ( const ConnectionFactoryBase source  )  [private]


Member Function Documentation

GroupConnection * OSG::ConnectionFactoryBase::createGroup ( const std::string &  name  ) 

Definition at line 114 of file OSGConnectionFactory.cpp.

References _groupMap.

00115 {
00116     TypeMap::iterator i=_groupMap.find(name);
00117     if(i == _groupMap.end())
00118         return NULL;
00119     else
00120         return i->second->createGroup();
00121 }

PointConnection * OSG::ConnectionFactoryBase::createPoint ( const std::string &  name  ) 

create point connection by name

Definition at line 125 of file OSGConnectionFactory.cpp.

References _pointMap.

00126 {
00127     TypeMap::iterator i=_pointMap.find(name);
00128     if(i == _pointMap.end())
00129         return NULL;
00130     else
00131         return i->second->createPoint();
00132 }

void OSG::ConnectionFactoryBase::dump ( void   ) 

void OSG::ConnectionFactoryBase::addGroupType ( ConnectionType type  )  [protected]

Definition at line 139 of file OSGConnectionFactory.cpp.

References _groupMap, OSG::ConnectionType::getName(), and SINFO.

00140 {
00141     _groupMap[type->getName()]=type;
00142     SINFO << "Group Connection type " << type->getName() 
00143           << " added" << std::endl;
00144 }

void OSG::ConnectionFactoryBase::addPointType ( ConnectionType type  )  [protected]

add new point type

Definition at line 148 of file OSGConnectionFactory.cpp.

References _pointMap, OSG::ConnectionType::getName(), and SINFO.

00149 {
00150     _pointMap[type->getName()]=type;
00151     SINFO << "Point Connection type " << type->getName() 
00152           << " added" << std::endl;
00153 }

void OSG::ConnectionFactoryBase::subGroupType ( ConnectionType type  )  [protected]

remove group type

Definition at line 172 of file OSGConnectionFactory.cpp.

References _groupMap, OSG::ConnectionType::getName(), OSG::GlobalSystemState, OSG::Shutdown, and SINFO.

00173 {
00174     TypeMap::iterator i=_groupMap.find(type->getName());
00175 
00176     if(i != _groupMap.end() && i->second == type)
00177         _groupMap.erase(i);
00178 
00179     if(GlobalSystemState != Shutdown)
00180     {
00181         SINFO << "Group connection type " << type->getName() 
00182               << " removed" << std::endl;
00183     }
00184 }

void OSG::ConnectionFactoryBase::subPointType ( ConnectionType type  )  [protected]

remove point type

Definition at line 157 of file OSGConnectionFactory.cpp.

References _pointMap, OSG::ConnectionType::getName(), OSG::GlobalSystemState, OSG::Shutdown, and SINFO.

00158 {
00159     TypeMap::iterator i=_pointMap.find(type->getName());
00160     if(i != _pointMap.end() && i->second == type)
00161         _pointMap.erase(i);
00162 
00163     if(GlobalSystemState != Shutdown)
00164     {
00165         SINFO << "Point connection type " << type->getName() 
00166               << " removed" << std::endl;
00167     }
00168 }

void OSG::ConnectionFactoryBase::operator= ( const ConnectionFactoryBase source  )  [private]


Friends And Related Function Documentation

friend class ConnectionType [friend]

Definition at line 136 of file OSGConnectionFactory.h.

friend class SingletonHolder [friend]

Definition at line 139 of file OSGConnectionFactory.h.


Member Data Documentation

Definition at line 98 of file OSGConnectionFactory.h.

Referenced by addGroupType(), createGroup(), and subGroupType().

Definition at line 99 of file OSGConnectionFactory.h.

Referenced by addPointType(), createPoint(), and subPointType().


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