| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::ArrayOf< PO, Alloc > Class Template Reference#include <plistCollections.h>
Inheritance diagram for plist::ArrayOf< PO, Alloc >:
![]() Detailed Descriptiontemplate<typename PO, typename Alloc = typename PO::template conversion_policy<ArrayBase,PO>::value_conversion>
A collection of plist objects, similar to a Dictionary, but no keys -- order matters!, see plist::Array.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| typedef ArrayBase::storage_t | storage_t |
Public Member Functions | |
| ArrayOf () | |
| ArrayOf (typename storage_t::size_type n, const PO &t, bool growable=true) | |
| constructor | |
| 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="") |
| replaces 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="") |
| 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 | |
| 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 | |
| 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 | |
Static Protected Member Functions | |
| static PO * | allocatePO () |
| allocates a new PO instance, unless PO is an abstract type, in which case a template specialization will throw a bad_cast | |
| static void | assignPO (PO &a, const PO &b) |
| assigns one PO to another, unless PO is ObjectBase, in which case set() is used (via template specialization) | |
| typedef ArrayBase::storage_t plist::ArrayOf< PO, Alloc >::storage_t |
shorthand for the type of the storage
Reimplemented from plist::ArrayBase.
Definition at line 1074 of file plistCollections.h.
| plist::ArrayOf< PO, Alloc >::ArrayOf | ( | ) | [inline] |
constructor
Definition at line 1112 of file plistCollections.h.
| plist::ArrayOf< PO, Alloc >::ArrayOf | ( | typename storage_t::size_type | n, | |
| const PO & | t, | |||
| bool | growable = true | |||
| ) | [inline] |
| plist::ArrayOf< PO, Alloc >::ArrayOf | ( | const ArrayOf< PO, Alloc > & | d | ) | [inline] |
| plist::ArrayOf< PO, Alloc >::~ArrayOf | ( | ) | [inline] |
| ArrayOf< PO, Alloc > & plist::ArrayOf< PO, Alloc >::operator= | ( | const ArrayOf< PO, Alloc > & | a | ) | [inline] |
assignment (don't assign listeners); subclass should call fireEntriesChanged after calling this (and updating its own storage)
Definition at line 1355 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::set().
| virtual void plist::ArrayOf< PO, Alloc >::set | ( | const ObjectBase & | ) | [inline, 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.
Definition at line 1125 of file plistCollections.h.
| void plist::ArrayOf< PO, Alloc >::set | ( | const ArrayBase & | a | ) | [inline, virtual] |
handles polymorphic assignment of ArrayBase subclasses, similar to operator=(ArrayOf), but allows conversion of entries
Definition at line 1299 of file plistCollections.h.
| virtual void plist::ArrayOf< PO, Alloc >::addEntry | ( | PO & | val, | |
| const std::string & | comment = "" | |||
| ) | [inline, virtual] |
adds a new entry to the end of the array, (de)allocation retained by caller
Definition at line 1132 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::loadXMLNode(), plist::ArrayOf< PO, Alloc >::operator=(), and plist::ArrayOf< PO, Alloc >::set().
| virtual void plist::ArrayOf< PO, Alloc >::addEntry | ( | PO * | val, | |
| const std::string & | comment = "" | |||
| ) | [inline, virtual] |
adds a new entry to the end of the array, (de)allocation responsibility of array
Definition at line 1134 of file plistCollections.h.
| void plist::ArrayOf< PO, Alloc >::setEntry | ( | size_t | index, | |
| PO & | val, | |||
| bool | warnExists = false | |||
| ) | [inline, virtual] |
replaces previous entry at the specified index, which must be less than or equal to the current array size
Definition at line 1178 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::loadXMLNode(), plist::ArrayOf< PO, Alloc >::operator=(), and plist::ArrayOf< PO, Alloc >::set().
| void plist::ArrayOf< PO, Alloc >::addEntry | ( | size_t | index, | |
| PO & | val, | |||
| const std::string & | comment = "" | |||
| ) | [inline, virtual] |
replaces previous entry at the specified index, which must be less than or equal to the current array size
Definition at line 1194 of file plistCollections.h.
| void plist::ArrayOf< PO, Alloc >::setEntry | ( | size_t | index, | |
| PO * | val, | |||
| bool | warnExists = false | |||
| ) | [inline, 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 1207 of file plistCollections.h.
| void plist::ArrayOf< PO, Alloc >::addEntry | ( | size_t | index, | |
| PO * | val, | |||
| const std::string & | comment = "" | |||
| ) | [inline, 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 1231 of file plistCollections.h.
| PO& plist::ArrayOf< PO, Alloc >::getEntry | ( | size_t | index | ) | const [inline] |
return the value at position index, which must exist (no range checking)
Reimplemented from plist::ArrayBase.
Definition at line 1146 of file plistCollections.h.
| PO& plist::ArrayOf< PO, Alloc >::operator[] | ( | size_t | index | ) | const [inline] |
return the value at position index, which must exist (no range checking, equivalent to getEntry(index))
Reimplemented from plist::ArrayBase.
Definition at line 1148 of file plistCollections.h.
| const_iterator plist::ArrayOf< PO, Alloc >::begin | ( | ) | const [inline] |
return an STL const_iterator to the first entry
Reimplemented from plist::ArrayBase.
Definition at line 1151 of file plistCollections.h.
| const_iterator plist::ArrayOf< PO, Alloc >::end | ( | ) | const [inline] |
return the one-past-end const_iterator
Reimplemented from plist::ArrayBase.
Definition at line 1153 of file plistCollections.h.
| virtual bool plist::ArrayOf< PO, Alloc >::canContain | ( | const ObjectBase & | obj | ) | [inline, virtual] |
returns true if the array can store the specified object
Implements plist::Collection.
Definition at line 1156 of file plistCollections.h.
| ArrayOf< PO, Alloc > * plist::ArrayOf< PO, Alloc >::clone | ( | ) | const [inline, virtual] |
clone implementation for Array
implements the clone function for Array
Implements plist::ObjectBase.
Definition at line 1248 of file plistCollections.h.
| static PO* plist::ArrayOf< PO, Alloc >::allocatePO | ( | ) | [inline, static, protected] |
allocates a new PO instance, unless PO is an abstract type, in which case a template specialization will throw a bad_cast
Definition at line 1163 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::set().
| static void plist::ArrayOf< PO, Alloc >::assignPO | ( | PO & | a, | |
| const PO & | b | |||
| ) | [inline, static, protected] |
assigns one PO to another, unless PO is ObjectBase, in which case set() is used (via template specialization)
Definition at line 1165 of file plistCollections.h.
Referenced by plist::ArrayOf< PO, Alloc >::operator=().
| bool plist::ArrayOf< PO, Alloc >::loadXMLNode | ( | size_t | index, | |
| xmlNode * | val, | |||
| const std::string & | comment | |||
| ) | [inline, protected, virtual] |
called with each node being loaded so subclass can handle appropriately
Implements plist::ArrayBase.
Definition at line 1262 of file plistCollections.h.
|
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:56 2007 by Doxygen 1.5.4 |