Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::Primitive< T > Class Template Reference
Inheritance diagram for plist::Primitive< T >:
Detailed Descriptiontemplate<typename T>
|
Classes | |
struct | conversion_policy |
Public Member Functions | |
Primitive () | |
constructor | |
Primitive (const T &v) | |
copy constructor, automatic conversion from value type | |
Primitive & | operator= (const T &v) |
assignment from value type (template specializations add in-place modiciation (e.g. +=, *=)) | |
virtual Primitive & | operator= (const PrimitiveBase &pb) |
assignment (don't assign listeners); doesn't trigger fireValueChanged, subclass should do that from its own operator=() following assignment | |
Primitive & | operator= (const Primitive &p) |
assignment from primitive of the same type (just assign value) | |
Primitive & | operator+= (const T &v) |
add in-place | |
Primitive & | operator-= (const T &v) |
subtract in-place | |
Primitive & | operator*= (const T &v) |
multiply in-place | |
Primitive & | operator/= (const T &v) |
divide in-place | |
const T & | operator* () const |
smart pointer, dereference to access primitive storage | |
const T * | operator-> () const |
smart pointer, dereference to access primitive storage | |
operator T () const | |
cast operator to automatically convert to value type | |
void | loadXML (xmlNode *node) |
interprets node as holding the specialization type | |
void | saveXML (xmlNode *node) const |
saves val into node | |
void | set (const std::string &str) |
assign a new value | |
std::string | get () const |
return current value as a string | |
virtual bool | operator== (const PrimitiveBase &other) |
virtual long | toLong () const |
return current value as an (long) integer (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type) | |
virtual double | toDouble () const |
return current value as a double (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type) | |
virtual Primitive< T > * | clone () const __attribute__((warn_unused_result)) |
clone definition for Primitive<T> | |
const T & | getPreviousValue () const |
returns the previously assigned value | |
Protected Attributes | |
T | val |
storage of primitive value | |
T | prevVal |
following each assignment, this is the "old" value -- very handy for PrimitiveListeners |
plist::Primitive< T >::Primitive | ( | ) |
constructor
Definition at line 65 of file plistPrimitives.h.
plist::Primitive< T >::Primitive | ( | const T & | v | ) |
copy constructor, automatic conversion from value type
Definition at line 67 of file plistPrimitives.h.
Primitive< T > * plist::Primitive< T >::clone | ( | ) | const [virtual] |
clone definition for Primitive<T>
implements the clone function for Primitive<T>
implements the clone function for Primitive<std::string>
implements the clone function for Primitive<unsigned char>
implements the clone function for Primitive<char>
implements the clone function for Primitive<bool>
Implements plist::ObjectBase.
Reimplemented in plist::OutputSelector, and plist::Angle.
Definition at line 68 of file plistPrimitives.cc.
std::string plist::Primitive< T >::get | ( | ) | const [virtual] |
return current value as a string
Implements plist::PrimitiveBase.
Reimplemented in plist::OutputSelector, and plist::Angle.
Definition at line 93 of file plistPrimitives.h.
Referenced by ShapeSpaceCollisionCheckerBase< 2 >::addDisplayRobotObstacles(), ShapeSpaceCollisionCheckerBase< 2 >::addRobotObstacles(), and ShapeSpaceCollisionCheckerBase< 3 >::createBodyObstacle().
const T& plist::Primitive< T >::getPreviousValue | ( | ) | const |
returns the previously assigned value
Definition at line 114 of file plistPrimitives.h.
void plist::Primitive< T >::loadXML | ( | xmlNode * | node | ) | [virtual] |
interprets node as holding the specialization type
Reimplemented from plist::ObjectBase.
Reimplemented in plist::OutputSelector, and plist::Angle.
Definition at line 13 of file plistPrimitives.cc.
Referenced by plist::Point::loadXML().
plist::Primitive< T >::operator T | ( | ) | const |
cast operator to automatically convert to value type
Definition at line 85 of file plistPrimitives.h.
const T& plist::Primitive< T >::operator* | ( | ) | const |
smart pointer, dereference to access primitive storage
Definition at line 80 of file plistPrimitives.h.
Primitive& plist::Primitive< T >::operator*= | ( | const T & | v | ) |
multiply in-place
Definition at line 76 of file plistPrimitives.h.
Primitive& plist::Primitive< T >::operator+= | ( | const T & | v | ) |
add in-place
Definition at line 74 of file plistPrimitives.h.
Primitive& plist::Primitive< T >::operator-= | ( | const T & | v | ) |
subtract in-place
Definition at line 75 of file plistPrimitives.h.
const T* plist::Primitive< T >::operator-> | ( | ) | const |
smart pointer, dereference to access primitive storage
Definition at line 82 of file plistPrimitives.h.
Primitive& plist::Primitive< T >::operator/= | ( | const T & | v | ) |
divide in-place
Definition at line 77 of file plistPrimitives.h.
Primitive& plist::Primitive< T >::operator= | ( | const Primitive< T > & | p | ) |
assignment from primitive of the same type (just assign value)
Definition at line 72 of file plistPrimitives.h.
Referenced by plist::Primitive< bool >::operator=().
virtual Primitive& plist::Primitive< T >::operator= | ( | const PrimitiveBase & | pb | ) | [virtual] |
assignment (don't assign listeners); doesn't trigger fireValueChanged, subclass should do that from its own operator=() following assignment
Reimplemented from plist::PrimitiveBase.
Definition at line 70 of file plistPrimitives.h.
Referenced by plist::Primitive< bool >::operator=().
Primitive& plist::Primitive< T >::operator= | ( | const T & | v | ) |
assignment from value type (template specializations add in-place modiciation (e.g. +=, *=))
Reimplemented in plist::OutputSelector.
Definition at line 69 of file plistPrimitives.h.
virtual bool plist::Primitive< T >::operator== | ( | const PrimitiveBase & | other | ) | [virtual] |
Implements plist::PrimitiveBase.
Definition at line 101 of file plistPrimitives.h.
void plist::Primitive< T >::saveXML | ( | xmlNode * | node | ) | const [virtual] |
saves val into node
Implements plist::ObjectBase.
Reimplemented in plist::OutputSelector, and plist::Angle.
Definition at line 47 of file plistPrimitives.cc.
Referenced by plist::Point::saveXML().
void plist::Primitive< T >::set | ( | const std::string & | str | ) | [virtual] |
assign a new value
Implements plist::PrimitiveBase.
Reimplemented in plist::OutputSelector, and plist::Angle.
Definition at line 53 of file plistPrimitives.cc.
Referenced by plist::DictionaryBase::ConversionTo< plist::Primitive< double > >::addValue(), plist::DictionaryBase::ConversionTo< plist::Primitive< float > >::addValue(), and Config::setValue().
double plist::Primitive< T >::toDouble | ( | ) | const [virtual] |
return current value as a double (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type)
Implements plist::ObjectBase.
Definition at line 109 of file plistPrimitives.h.
long plist::Primitive< T >::toLong | ( | ) | const [virtual] |
return current value as an (long) integer (throws std::runtime_error exception if incompatable, e.g. dictionary or array to value type)
Implements plist::ObjectBase.
Definition at line 108 of file plistPrimitives.h.
T plist::Primitive< T >::prevVal [protected] |
following each assignment, this is the "old" value -- very handy for PrimitiveListeners
Definition at line 118 of file plistPrimitives.h.
Referenced by plist::Primitive< bool >::getPreviousValue(), plist::Primitive< bool >::operator*=(), plist::Primitive< bool >::operator+=(), plist::Primitive< bool >::operator-=(), plist::Primitive< bool >::operator/=(), and plist::Primitive< bool >::operator=().
T plist::Primitive< T >::val [protected] |
storage of primitive value
Definition at line 117 of file plistPrimitives.h.
Referenced by plist::Primitive< bool >::get(), plist::Primitive< unsigned short >::operator unsigned short(), plist::Primitive< bool >::operator*(), plist::Primitive< bool >::operator*=(), plist::Primitive< bool >::operator+=(), plist::Primitive< bool >::operator-=(), plist::Primitive< bool >::operator->(), plist::Primitive< bool >::operator/=(), plist::OutputSelector::operator=(), plist::Primitive< bool >::operator=(), plist::Primitive< bool >::operator==(), plist::Primitive< T >::saveXML(), plist::Primitive< bool >::toDouble(), and plist::Primitive< bool >::toLong().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:25 2016 by Doxygen 1.6.3 |