ot::NodeFactoryContainer Class Reference
[Core Classes]

#include <NodeFactoryContainer.h>

Inheritance diagram for ot::NodeFactoryContainer:

Inheritance graph
[legend]
Collaboration diagram for ot::NodeFactoryContainer:

Collaboration graph
[legend]
List of all members.

Detailed Description

An implementation of NodeFactory that contains several NodeFactories and acts like the one providing all node types of the different factories together. When createNode is called it loops through the known NodeFactories and calls createNode on them until it receives a non NULL result. It then returns this node.
Author:
Gerhard Reitmayr


Public Member Functions

virtual ~NodeFactoryContainer ()
void addFactory (NodeFactory &factory)
void removeFactory (NodeFactory &factory)
virtual NodecreateNode (const std::string &name, StringTable &attributes)
void removeAll ()
void copyFrom (const NodeFactoryContainer &other)

Protected Attributes

NodeFactoryVector factories
 the list of known NodeFactories


Constructor & Destructor Documentation

ot::NodeFactoryContainer::~NodeFactoryContainer  )  [virtual]
 

Destructor clears the factories list.


Member Function Documentation

void ot::NodeFactoryContainer::addFactory NodeFactory factory  ) 
 

adds a NodeFactory to the container making nodes provided by this factory accessible.

Parameters:
factory reference to the NodeFactory object

void ot::NodeFactoryContainer::copyFrom const NodeFactoryContainer other  ) 
 

Node * ot::NodeFactoryContainer::createNode const std::string &  name,
StringTable attributes
[virtual]
 

implements abstract method from NodeFactory. it loops through the known NodeFactories and calls createNode on them until it receives a non NULL result. It then returns this node.

Parameters:
name reference to string containing element name
attributes refenrence to StringTable containing attribute values
Returns:
pointer to new Node or NULL. The new Node must be allocated with new !

Implements ot::NodeFactory.

void ot::NodeFactoryContainer::removeAll  ) 
 

void ot::NodeFactoryContainer::removeFactory NodeFactory factory  ) 
 

removes a NodeFactory from the container.

Parameters:
factory reference to the NodeFactory object


Member Data Documentation

NodeFactoryVector ot::NodeFactoryContainer::factories [protected]
 

the list of known NodeFactories


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:29:09 2007 for NaviTrack by  doxygen 1.4.6