OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::NodeFactoryContainer Class Reference
[Core Classes]

An implementation of NodeFactory that contains several NodeFactories and acts like the one providing all node types of the different factories together. More...

#include <NodeFactoryContainer.h>

Inheritance diagram for ot::NodeFactoryContainer:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Protected Attributes

NodeFactoryVector factories

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

Definition at line 68 of file NodeFactoryContainer.h.


Constructor & Destructor Documentation

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

Destructor clears the factories list.

Definition at line 55 of file NodeFactoryContainer.cxx.

References factories.


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

Definition at line 62 of file NodeFactoryContainer.cxx.

References factories.

Referenced by ot::Context::addFactory().

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.

Definition at line 73 of file NodeFactoryContainer.cxx.

References factories.

Referenced by ot::ConfigurationParser::buildTree(), and ot::Context::createNode().

void ot::NodeFactoryContainer::removeFactory ( NodeFactory factory  ) 

removes a NodeFactory from the container.

Parameters:
factory reference to the NodeFactory object

Definition at line 87 of file NodeFactoryContainer.cxx.

References factories.

Referenced by ot::Context::removeFactory().


Member Data Documentation

the list of known NodeFactories

Definition at line 73 of file NodeFactoryContainer.h.

Referenced by addFactory(), createNode(), removeFactory(), and ~NodeFactoryContainer().


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

copyright (c) 2006 Graz University of Technology