ot::CommonNodeFactory Class Reference

#include <CommonNodeFactory.h>

Inheritance diagram for ot::CommonNodeFactory:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CommonNodeFactory ()
virtual ~CommonNodeFactory ()
virtual NodecreateNode (const std::string &name, StringTable &attributes)

Static Public Member Functions

static bool isKnownNode (std::string nodeName)

Static Protected Member Functions

static int parseVector (const std::string &line, float *val)
static int parseRotation (const std::string &line, const std::string &type, float *val)

Protected Attributes

std::vector< std::string > nodePorts
 stores names of known NodePorts, to make instantiation more generic

Static Protected Attributes

static std::vector< std::string > knownNodes

Constructor & Destructor Documentation

ot::CommonNodeFactory::CommonNodeFactory  ) 
 

constructor method. Initalizes the wrapperNodes array.

ot::CommonNodeFactory::~CommonNodeFactory  )  [virtual]
 

destructor


Member Function Documentation

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

creates the described node types.

Parameters:
name reference to string containing element name
attributes reference to StringMap of elements attribute values
Returns:
new Node or NULL, if element name was not recognized

Implements ot::NodeFactory.

bool ot::CommonNodeFactory::isKnownNode std::string  nodeName  )  [static]
 

int ot::CommonNodeFactory::parseRotation const std::string &  line,
const std::string &  type,
float *  val
[static, protected]
 

parses a string for a rotation, where the type is defined by a second string, returns int value indicating an error. If an error occurs, the val values are not changed.

Parameters:
line string to parse
type string defining type of rotation (quaternion|matrix|axisangle|euler)
val pointer to four floats, rotation will be stored in quaternion format
Returns:
0 if ok, other value if error occured

int ot::CommonNodeFactory::parseVector const std::string &  line,
float *  val
[static, protected]
 

parses a string for a three component vector, returns int value indicating an error. If an error occurs, the val values are not changed.

Parameters:
line string to parse
val pointer to three floats
Returns:
0 if ok, other value if error occured


Member Data Documentation

std::vector< std::string > ot::CommonNodeFactory::knownNodes [static, protected]
 

std::vector<std::string> ot::CommonNodeFactory::nodePorts [protected]
 

stores names of known NodePorts, to make instantiation more generic


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