Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

OutputConfig< T > Class Template Reference

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

#include <Config.h>

Inheritance diagram for OutputConfig< T >:

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 64 of file Config.h.

List of all members.

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 
)

constructor

Definition at line 67 of file Config.h.


Member Function Documentation

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

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

Definition at line 79 of file Config.h.

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

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

Reimplemented from plist::DictionaryOf< PO, Alloc >.

Definition at line 74 of file Config.h.

Referenced by OutputConfig< plist::Primitive< float > >::getEntry().

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

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

Reimplemented from ConfigDictionary.

Definition at line 90 of file Config.h.

Referenced by OutputConfig< plist::Primitive< float > >::loadXMLNode().

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

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

Definition at line 81 of file Config.h.

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

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

Reimplemented from plist::DictionaryBase.

Definition at line 714 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 95 of file Config.h.

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


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3