API documentation
SequenceTree Class Reference
Singelton implementation of the lfo-tree representation of the whole sequence. More...
#include <SequenceTree.h>
Collaboration diagram for SequenceTree:Public Member Functions | |
| void | Initialize (string seqFile) |
| DOMNodeList * | GetChildNodes (DOMNode *node) |
| DOMNode * | GetParentNode (DOMNode *node) |
| DOMNamedNodeMap * | GetAttributes (DOMNode *node) |
| Module * | GetModule (DOMNode *node) |
| unsigned int | AddModule (string name) |
| int | RunTree (DOMNode *node, void *ptr, unsigned int(*fun)(void *, DOMNode *), int depth=0) |
| unsigned int | Populate () |
| Module * | GetParent (DOMNode *node) |
| vector< Module * > | GetChildren (DOMNode *node) |
| Module * | GetChild (DOMNode *node, unsigned int position) |
| ConcatSequence * | GetRootConcatSequence () |
| Module * | GetModuleByAttributeValue (string name, string value) |
| DOMDocument * | GetDOMDocument () |
| ModulePrototypeFactory * | GetMPF () |
| map< DOMNode *, Module * > * | GetModuleMap () |
| int | GetDepth () |
| void | SerializeModules (string xml_file) |
| Parameters * | GetParameters () |
| bool | GetStatus () |
| Get my status of parsing XML. | |
| ~SequenceTree () | |
Static Public Member Functions | |
| static SequenceTree * | instance () |
| static unsigned int | CreateModule (void *ptr, DOMNode *node) |
| static vector< string > | Tokenize (const string &str, const string &delimiters=",") |
Detailed Description
Singelton implementation of the lfo-tree representation of the whole sequence.
Definition at line 41 of file SequenceTree.h.
Constructor & Destructor Documentation
| SequenceTree::~SequenceTree | ( | ) |
public virtual default destructor
Definition at line 49 of file SequenceTree.cpp.
Member Function Documentation
| unsigned int SequenceTree::AddModule | ( | string | name | ) |
Get a puls based on its name
- Parameters:
-
name Unique name of the Module to be added
Definition at line 126 of file SequenceTree.cpp.
| unsigned int SequenceTree::CreateModule | ( | void * | ptr, | |
| DOMNode * | node | |||
| ) | [static] |
A static function to create modules. Called by SequenceTree::Populate() as function pointer argument to SequenceTree::RunTree() .
- Parameters:
-
ptr Pointer to the SequenceTree object. node More elaborate description here please.
- Returns:
- Error code.
Definition at line 234 of file SequenceTree.cpp.
References ModulePrototypeFactory::CloneModule(), and Module::Initialize().
Referenced by Populate().
Here is the call graph for this function:
Here is the caller graph for this function:| DOMNamedNodeMap * SequenceTree::GetAttributes | ( | DOMNode * | node | ) |
Get the attributes of the given node
- Parameters:
-
node the node for which the attributes are requested
Definition at line 109 of file SequenceTree.cpp.
| Module * SequenceTree::GetChild | ( | DOMNode * | node, | |
| unsigned int | position | |||
| ) |
Get child at position
- Parameters:
-
node The node referred to. position The position in the vector of children
Definition at line 279 of file SequenceTree.cpp.
References GetChildren().
Referenced by Module::GetChild().
Here is the call graph for this function:
Here is the caller graph for this function:| DOMNodeList * SequenceTree::GetChildNodes | ( | DOMNode * | node | ) |
Get the child nodes of the given node
- Parameters:
-
node the node for which the child nodes are requested
- Returns:
- pointer to DOMNodeList including the children of the node for which the children are requested
Definition at line 102 of file SequenceTree.cpp.
| vector< Module * > SequenceTree::GetChildren | ( | DOMNode * | node | ) |
Get vector of chilren
- Parameters:
-
node The node referred to.
Definition at line 262 of file SequenceTree.cpp.
Referenced by GetChild(), and Module::GetChildren().
Here is the caller graph for this function:| int SequenceTree::GetDepth | ( | ) | [inline] |
Get the depth of the tree
- Returns:
- the depth
Definition at line 202 of file SequenceTree.h.
Referenced by Module::DumpTree().
Here is the caller graph for this function:| DOMDocument* SequenceTree::GetDOMDocument | ( | ) | [inline] |
Get the DOM document
- Returns:
- the requested DOM document
Definition at line 181 of file SequenceTree.h.
Referenced by Module::InsertChild().
Here is the caller graph for this function:| Module * SequenceTree::GetModule | ( | DOMNode * | node | ) |
Get a Module based on its DOMNode
- Parameters:
-
node The DOMNode
Definition at line 114 of file SequenceTree.cpp.
| Module * SequenceTree::GetModuleByAttributeValue | ( | string | name, | |
| string | value | |||
| ) |
Get first module in the tree, which has a matching attribute (name,value) pair in its DOMNode.
- Parameters:
-
name The name of the attribute. value The value of the attribute.
- Returns:
- The module.
Definition at line 296 of file SequenceTree.cpp.
Referenced by Module::GetPrototypeByAttributeValue().
Here is the caller graph for this function:| map<DOMNode*, Module*>* SequenceTree::GetModuleMap | ( | ) | [inline] |
Get the map of clonable modules
- Returns:
- Map of DOM nodes and modules
Definition at line 195 of file SequenceTree.h.
Referenced by Module::InsertChild().
Here is the caller graph for this function:| ModulePrototypeFactory* SequenceTree::GetMPF | ( | ) | [inline] |
Get the module prototype factory
- Returns:
- the requested prototype factory
Definition at line 188 of file SequenceTree.h.
Referenced by Module::InsertChild().
Here is the caller graph for this function:| Parameters* SequenceTree::GetParameters | ( | ) | [inline] |
Get pointer to the sole instance of the 'Parameters' module.
Definition at line 212 of file SequenceTree.h.
Referenced by Module::Initialize(), and Module::WriteStaticXML().
Here is the caller graph for this function:| Module * SequenceTree::GetParent | ( | DOMNode * | node | ) |
Get the parent module
- Parameters:
-
node The node referred to.
Definition at line 250 of file SequenceTree.cpp.
Referenced by Module::GetParent().
Here is the caller graph for this function:| DOMNode * SequenceTree::GetParentNode | ( | DOMNode * | node | ) |
Get the Parent node of the given node
- Parameters:
-
node the node for which the parent node is requested
- Returns:
- pointer to the requested parent node
Definition at line 95 of file SequenceTree.cpp.
| ConcatSequence * SequenceTree::GetRootConcatSequence | ( | ) |
Get the root ConcatSequence module.
- Returns:
- The root ConcatSequence module.
Definition at line 288 of file SequenceTree.cpp.
Referenced by TrajectoryMotion::LoadFile(), Trajectory1D::LoadFile(), Populate(), and Simulator::SetSequence().
Here is the caller graph for this function:| void SequenceTree::Initialize | ( | string | seqFile | ) |
Initialize the sole instance
- Parameters:
-
seqFile uri to the xml file representing the sequence tree to to Initialize from
- Returns:
- error code (0: ok, 1: file io error, 2: dtd validation error)
Definition at line 79 of file SequenceTree.cpp.
References XMLIO::Parse().
Referenced by Simulator::SetSequence().
Here is the call graph for this function:
Here is the caller graph for this function:| SequenceTree * SequenceTree::instance | ( | ) | [static] |
Get the sole instance of the Sequence tree
Definition at line 69 of file SequenceTree.cpp.
Referenced by Module::Initialize(), TrajectoryMotion::LoadFile(), Trajectory1D::LoadFile(), Populate(), RunTree(), Simulator::SetSequence(), and Simulator::~Simulator().
Here is the caller graph for this function:| unsigned int SequenceTree::Populate | ( | ) |
Populate sequence
Populate sequence with the given XML by cloning all needed objects.
Definition at line 134 of file SequenceTree.cpp.
References CreateModule(), Module::GetChildren(), ConcatSequence::GetDuration(), GetRootConcatSequence(), instance(), AtomicSequence::Prepare(), ConcatSequence::Prepare(), Parameters::Prepare(), World::pStaticAtom, and RunTree().
Referenced by Simulator::SetSequence().
Here is the call graph for this function:
Here is the caller graph for this function:| int SequenceTree::RunTree | ( | DOMNode * | node, | |
| void * | ptr, | |||
| unsigned int(*)(void *, DOMNode *) | fun, | |||
| int | depth = 0 | |||
| ) |
Run through the sequence tree starting with a given node and perform on its children
- Parameters:
-
node The given DOM node ptr More elaborate description here please fun Pointer to the performing function depth Depth of run (default=0).
- Returns:
- The depth of the tree
Definition at line 197 of file SequenceTree.cpp.
References instance(), and World::pStaticAtom.
Referenced by Populate().
Here is the call graph for this function:
Here is the caller graph for this function:| void SequenceTree::SerializeModules | ( | string | xml_file | ) |
Write xml file containing all modules of the sequence framework.
Definition at line 309 of file SequenceTree.cpp.
References Module::AddAllDOMattributes(), ModulePrototypeFactory::CloneModule(), Module::GetChild(), Prototype::GetClassType(), ModulePrototypeFactory::GetModuleList(), Prototype::GetNode(), Module::GetNumberOfChildren(), Prototype::GetType(), Module::Initialize(), Module::Prepare(), and XMLIO::Write().
Here is the call graph for this function:| static vector<string> SequenceTree::Tokenize | ( | const string & | str, | |
| const string & | delimiters = "," | |||
| ) | [static] |
A static string tokenizer. Needed for setting module dependencies.
- Parameters:
-
str The string to tokenize. delimiters The delimiters to split the string.
- Returns:
- The vector of tokenized sub-strings.
The documentation for this class was generated from the following files:






















