Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::ArrayOf< PO, Alloc > Class Template ReferenceA collection of plist objects, similar to a Dictionary, but no keys -- order matters!, see plist::Array. More...
Inheritance diagram for plist::ArrayOf< PO, Alloc >:
Detailed Descriptiontemplate<typename PO, typename Alloc = typename PO::template conversion_policy<ArrayBase,PO>::value_conversion>
|
Public Types | |
typedef ArrayBase::storage_t | storage_t |
Public Member Functions | |
ArrayOf () | |
ArrayOf (typename storage_t::size_type n) | |
constructor, create n entries using default constructor, defaults to non-growable (load does not change size) | |
ArrayOf (typename storage_t::size_type n, const PO &t, bool growable=false) | |
constructor, create n copies of t, defaults to non-growable (load does not change size) | |
ArrayOf (const ArrayOf &d) | |
copy constructor (don't assign listeners) | |
ArrayOf & | operator= (const ArrayOf &a) |
assignment (don't assign listeners); subclass should call fireEntriesChanged after calling this (and updating its own storage) | |
virtual void | set (const ObjectBase &ob) |
polymorphic assignment (throws std::bad_cast if the assignment is between invalid types, i.e. a primitive and a collection, or different collection types) | |
virtual void | set (const ArrayBase &a) |
handles polymorphic assignment of ArrayBase subclasses, similar to operator=(ArrayOf), but allows conversion of entries | |
~ArrayOf () | |
destructor | |
virtual void | addEntry (PO &val, const std::string &comment="") |
adds a new entry to the end of the array, (de)allocation retained by caller | |
virtual void | addEntry (PO *val, const std::string &comment="") |
adds a new entry to the end of the array, (de)allocation responsibility of array | |
virtual void | setEntry (size_t index, PO &val, bool warnExists=false) |
replaces previous entry at the specified index, which must be less than or equal to the current array size | |
virtual void | addEntry (size_t index, PO &val, const std::string &comment="") |
displaces previous entry at the specified index, which must be less than or equal to the current array size | |
virtual void | setEntry (size_t index, PO *val, bool warnExists=false) |
replaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array | |
virtual void | addEntry (size_t index, PO *val, const std::string &comment="") |
displaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array | |
virtual void | forceEntry (ObjectBase &val, const std::string &comment="") |
adds a new entry to the end of the array, (de)allocation retained by caller | |
virtual void | forceEntry (ObjectBase *val, const std::string &comment="") |
adds a new entry to the end of the array, (de)allocation responsibility of array | |
virtual void | forceEntry (size_t index, ObjectBase &val, const std::string &comment="") |
displaces previous entry at the specified index, which must be less than or equal to the current array size | |
virtual void | forceEntry (size_t index, ObjectBase *val, const std::string &comment="") |
displaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array | |
PO & | getEntry (size_t index) const |
return the value at position index, which must exist (no range checking) | |
PO & | operator[] (size_t index) const |
return the value at position index, which must exist (no range checking, equivalent to getEntry(index)) | |
const_iterator | begin () const |
return an STL const_iterator to the first entry | |
const_iterator | end () const |
return the one-past-end const_iterator | |
PO & | front () const |
return first element | |
PO & | back () const |
return last element | |
virtual bool | canContain (const ObjectBase &obj) |
returns true if the array can store the specified object | |
virtual ArrayOf * | clone () const __attribute__((warn_unused_result)) |
clone implementation for Array | |
Protected Member Functions | |
virtual bool | loadXMLNode (size_t index, xmlNode *val, const std::string &comment) |
called with each node being loaded so subclass can handle appropriately |
typedef ArrayBase::storage_t plist::ArrayOf< PO, Alloc >::storage_t |
shorthand for the type of the storage
Reimplemented from plist::ArrayBase.
Reimplemented in plist::Point.
Definition at line 1212 of file plistCollections.h.
plist::ArrayOf< PO, Alloc >::ArrayOf | ( | ) |
constructor
Definition at line 1255 of file plistCollections.h.
plist::ArrayOf< PO, Alloc >::ArrayOf | ( | typename storage_t::size_type | n | ) | [explicit] |
constructor, create n entries using default constructor, defaults to non-growable (load does not change size)
Definition at line 1257 of file plistCollections.h.
plist::ArrayOf< PO, Alloc >::ArrayOf | ( | typename storage_t::size_type | n, | |
const PO & | t, | |||
bool | growable = false | |||
) |
constructor, create n copies of t, defaults to non-growable (load does not change size)
Definition at line 1264 of file plistCollections.h.
plist::ArrayOf< PO, Alloc >::ArrayOf | ( | const ArrayOf< PO, Alloc > & | d | ) |
copy constructor (don't assign listeners)
Definition at line 1281 of file plistCollections.h.
plist::ArrayOf< PO, Alloc >::~ArrayOf | ( | ) |
destructor
Definition at line 1289 of file plistCollections.h.
void ArrayOf::addEntry | ( | size_t | index, | |
PO * | val, | |||
const std::string & | comment = "" | |||
) | [virtual] |
displaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array
Definition at line 1406 of file plistCollections.h.
void ArrayOf::addEntry | ( | size_t | index, | |
PO & | val, | |||
const std::string & | comment = "" | |||
) | [virtual] |
displaces previous entry at the specified index, which must be less than or equal to the current array size
Definition at line 1369 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::addEntry | ( | PO * | val, | |
const std::string & | comment = "" | |||
) | [virtual] |
adds a new entry to the end of the array, (de)allocation responsibility of array
Definition at line 1294 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::addEntry | ( | PO & | val, | |
const std::string & | comment = "" | |||
) | [virtual] |
adds a new entry to the end of the array, (de)allocation retained by caller
Definition at line 1292 of file plistCollections.h.
Referenced by plist::ArrayOf< plist::Primitive< PLISTREAL > >::forceEntry(), KinematicJointSaver::init(), KinematicJointSaver::KinematicJointSaver(), plist::ArrayOf< PO, Alloc >::loadXMLNode(), plist::ArrayOf< PO, Alloc >::operator=(), and plist::ArrayOf< PO, Alloc >::set().
PO& plist::ArrayOf< PO, Alloc >::back | ( | ) | const |
return last element
Reimplemented from plist::ArrayBase.
Definition at line 1326 of file plistCollections.h.
const_iterator plist::ArrayOf< PO, Alloc >::begin | ( | ) | const |
return an STL const_iterator to the first entry
Reimplemented from plist::ArrayBase.
Definition at line 1320 of file plistCollections.h.
Referenced by ShapeSpaceCollisionCheckerBase< 2 >::addDisplayRobotObstacles(), ShapeSpaceCollisionCheckerBase< 3 >::addRobotObstacles(), ShapeSpaceCollisionCheckerBase< 2 >::addRobotObstacles(), ShapeSpacePlanner3DR< N >::getBoxes(), ShapeSpacePlanner2DR< N >::getBoxes(), KinematicJoint::getObstacles(), KinematicJoint::hasMass(), KinematicJoint::ComponentsListener::plistCollectionEntriesChanged(), ShapeSpacePlanner3DR< N >::plotPath(), KinematicJoint::sumLinkCenterOfMass(), and KinematicJoint::updateBB().
virtual bool plist::ArrayOf< PO, Alloc >::canContain | ( | const ObjectBase & | obj | ) | [virtual] |
returns true if the array can store the specified object
Implements plist::Collection.
Reimplemented in plist::RGBColor< T >.
Definition at line 1329 of file plistCollections.h.
clone implementation for Array
implements the clone function for Array
Implements plist::ObjectBase.
Reimplemented in plist::RGBColor< T >.
Definition at line 1423 of file plistCollections.h.
const_iterator plist::ArrayOf< PO, Alloc >::end | ( | ) | const |
return the one-past-end const_iterator
Reimplemented from plist::ArrayBase.
Definition at line 1322 of file plistCollections.h.
Referenced by ShapeSpaceCollisionCheckerBase< 2 >::addDisplayRobotObstacles(), ShapeSpaceCollisionCheckerBase< 3 >::addRobotObstacles(), ShapeSpaceCollisionCheckerBase< 2 >::addRobotObstacles(), ShapeSpacePlanner3DR< N >::getBoxes(), ShapeSpacePlanner2DR< N >::getBoxes(), KinematicJoint::getObstacles(), KinematicJoint::hasMass(), KinematicJoint::ComponentsListener::plistCollectionEntriesChanged(), ShapeSpacePlanner3DR< N >::plotPath(), KinematicJoint::sumLinkCenterOfMass(), and KinematicJoint::updateBB().
virtual void plist::ArrayOf< PO, Alloc >::forceEntry | ( | size_t | index, | |
ObjectBase * | val, | |||
const std::string & | comment = "" | |||
) | [virtual] |
displaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array
Implements plist::ArrayBase.
Definition at line 1312 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::forceEntry | ( | size_t | index, | |
ObjectBase & | val, | |||
const std::string & | comment = "" | |||
) | [virtual] |
displaces previous entry at the specified index, which must be less than or equal to the current array size
Implements plist::ArrayBase.
Definition at line 1310 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::forceEntry | ( | ObjectBase * | val, | |
const std::string & | comment = "" | |||
) | [virtual] |
adds a new entry to the end of the array, (de)allocation responsibility of array
Implements plist::ArrayBase.
Definition at line 1308 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::forceEntry | ( | ObjectBase & | val, | |
const std::string & | comment = "" | |||
) | [virtual] |
adds a new entry to the end of the array, (de)allocation retained by caller
Implements plist::ArrayBase.
Definition at line 1306 of file plistCollections.h.
PO& plist::ArrayOf< PO, Alloc >::front | ( | ) | const |
return first element
Reimplemented from plist::ArrayBase.
Definition at line 1324 of file plistCollections.h.
PO& plist::ArrayOf< PO, Alloc >::getEntry | ( | size_t | index | ) | const |
return the value at position index, which must exist (no range checking)
Reimplemented from plist::ArrayBase.
Definition at line 1315 of file plistCollections.h.
bool ArrayOf::loadXMLNode | ( | size_t | index, | |
xmlNode * | val, | |||
const std::string & | comment | |||
) | [protected, virtual] |
called with each node being loaded so subclass can handle appropriately
Implements plist::ArrayBase.
Reimplemented in KinematicJointLoader.
Definition at line 1426 of file plistCollections.h.
ArrayOf< PO, Alloc > & ArrayOf::operator= | ( | const ArrayOf< PO, Alloc > & | a | ) |
assignment (don't assign listeners); subclass should call fireEntriesChanged after calling this (and updating its own storage)
Definition at line 1519 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::set().
PO& plist::ArrayOf< PO, Alloc >::operator[] | ( | size_t | index | ) | const |
return the value at position index, which must exist (no range checking, equivalent to getEntry(index))
Reimplemented from plist::ArrayBase.
Definition at line 1317 of file plistCollections.h.
void ArrayOf::set | ( | const ArrayBase & | a | ) | [virtual] |
handles polymorphic assignment of ArrayBase subclasses, similar to operator=(ArrayOf), but allows conversion of entries
Definition at line 1458 of file plistCollections.h.
virtual void plist::ArrayOf< PO, Alloc >::set | ( | const ObjectBase & | ) | [virtual] |
polymorphic assignment (throws std::bad_cast if the assignment is between invalid types, i.e. a primitive and a collection, or different collection types)
Implements plist::ObjectBase.
Reimplemented in plist::RGBColor< T >.
Definition at line 1285 of file plistCollections.h.
void ArrayOf::setEntry | ( | size_t | index, | |
PO * | val, | |||
bool | warnExists = false | |||
) | [virtual] |
replaces previous entry at the specified index, which must be less than or equal to the current array size; control of (de)allocation will be assumed by the Array
Definition at line 1382 of file plistCollections.h.
void ArrayOf::setEntry | ( | size_t | index, | |
PO & | val, | |||
bool | warnExists = false | |||
) | [virtual] |
replaces previous entry at the specified index, which must be less than or equal to the current array size
Definition at line 1353 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::loadXMLNode(), plist::ArrayOf< PO, Alloc >::operator=(), and plist::ArrayOf< PO, Alloc >::set().
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:25 2016 by Doxygen 1.6.3 |