Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

OutputConfig< T > Class Template Reference

#include <Config.h>

Inheritance diagram for OutputConfig< T >:

List of all members.


Detailed Description

template<typename T>
class OutputConfig< T >

Stores an item for each joint, can be accessed via joint name or array offset.

Two main reasons for this class are to keep outputs in offset order (not alphabetic by name), and to strip '~' from output names for backward compatability (used to pad output names to ensure constant string length.

Definition at line 63 of file Config.h.


Public Member Functions

 OutputConfig (unsigned int firstOffset, unsigned int numOutputsToStore, const T &defValue)
 constructor
virtual ObjectBase & getEntry (const std::string &name)
 strips trailing '~' characters from name before doing usual lookup
T & getEntry (size_t index)
 return the value at position index, which must exist (no range checking)
T & operator[] (size_t index)
 return the value at position index, which must exist (no range checking, equivalent to getEntry(index))
void saveXML (xmlNode *node, bool onlyOverwrite, std::set< std::string > &seen) const
 small trick -- override to save outputs in indexed order instead of alphabetical order

Protected Member Functions

bool loadXMLNode (const std::string &key, xmlNode *val, const std::string &comment)
 strips trailing '~' characters from name before doing usual lookup

Protected Attributes

unsigned int offset
 the index offset of the first entry in outputs
std::vector< T > outputs
 storage of data for each output

Constructor & Destructor Documentation

template<typename T>
OutputConfig< T >::OutputConfig ( unsigned int  firstOffset,
unsigned int  numOutputsToStore,
const T &  defValue 
) [inline]

constructor

Definition at line 66 of file Config.h.


Member Function Documentation

template<typename T>
virtual ObjectBase& OutputConfig< T >::getEntry ( const std::string &  name  )  [inline, virtual]

strips trailing '~' characters from name before doing usual lookup

Reimplemented from plist::DictionaryOf< ObjectBase >.

Definition at line 73 of file Config.h.

template<typename T>
T& OutputConfig< T >::getEntry ( size_t  index  )  [inline]

return the value at position index, which must exist (no range checking)

Definition at line 78 of file Config.h.

template<typename T>
T& OutputConfig< T >::operator[] ( size_t  index  )  [inline]

return the value at position index, which must exist (no range checking, equivalent to getEntry(index))

Definition at line 80 of file Config.h.

template<typename T>
void OutputConfig< T >::saveXML ( xmlNode node,
bool  onlyOverwrite,
std::set< std::string > &  seen 
) const [inline, virtual]

small trick -- override to save outputs in indexed order instead of alphabetical order

Reimplemented from plist::DictionaryBase.

Definition at line 705 of file Config.h.

template<typename T>
bool OutputConfig< T >::loadXMLNode ( const std::string &  key,
xmlNode val,
const std::string &  comment 
) [inline, protected, virtual]

strips trailing '~' characters from name before doing usual lookup

Reimplemented from ConfigDictionary.

Definition at line 89 of file Config.h.


Member Data Documentation

template<typename T>
unsigned int OutputConfig< T >::offset [protected]

the index offset of the first entry in outputs

Definition at line 94 of file Config.h.

Referenced by OutputConfig< T >::saveXML().


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

Tekkotsu v4.0
Generated Thu Nov 22 00:58:34 2007 by Doxygen 1.5.4