Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
plist::DictionaryOf< PO, Alloc > Class Template ReferenceA dictionary which requires all elements to be subtypes of the PO template argument. More...
Inheritance diagram for plist::DictionaryOf< PO, Alloc >:
Detailed Descriptiontemplate<typename PO, typename Alloc = typename PO::template conversion_policy<DictionaryBase,PO>::value_conversion>
|
Public Types | |
typedef DictionaryBase::storage_t | storage_t |
typedef PO | entryRet_t |
older compilers don't support covariant returns, so this is the templated storage type on modern compilers, generic ObjectBase otherwise, can check defined(PLIST_NO_COVRET) | |
Public Member Functions | |
DictionaryOf () | |
DictionaryOf (bool growable) | |
constructor | |
DictionaryOf (const DictionaryOf &d) | |
copy constructor (don't assign listeners) | |
DictionaryOf & | operator= (const DictionaryOf &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 DictionaryBase &a) |
handles actual setting of one dictionary to another, similar to operator=(DictionaryOf), but allows for polymorphic conversion to the template type | |
~DictionaryOf () | |
destructor | |
virtual void | setEntry (const std::string &name, PO &val, bool warnExists=false) |
Replaces the entry with the specified key, optionally warns as it does so. If you simply want to set the *value* of the specified entry, try getEntry() and assignment... | |
virtual void | addEntry (const std::string &name, PO &val, const std::string &comment="", bool warnExists=true) |
Convenience method for adding new entries, with optional comment and warning if replacing a previous entry. | |
virtual void | setEntry (const std::string &name, PO *val, bool warnExists=false) |
Replaces the entry with the specified key, optionally warns as it does so. If you simply want to set the *value* of the specified entry, try getEntry() and assignment... | |
virtual void | addEntry (const std::string &name, PO *val, const std::string &comment="", bool warnExists=true) |
Convenience method for adding new entries, with optional comment and warning if replacing a previous entry. | |
entryRet_t & | getEntry (const std::string &name) |
returns a reference to the entry with the specified name, creating it if it doesn't exist | |
entryRet_t & | operator[] (const std::string &name) |
returns a reference to the entry with the specified name, creating it if it doesn't exist | |
const_iterator | findEntry (const std::string &name) const |
returns an iterator the <key, value> pair with the specified key (returns end() if not found) | |
const_iterator | begin () const |
return an STL const_iterator to the first entry (note implicit conversion to specialized const_iterator) | |
const_iterator | end () const |
return the one-past-end const_iterator (note implicit conversion to specialized const_iterator) | |
virtual bool | canContain (const ObjectBase &obj) |
returns true if the Collection subclass allows storage of the argument | |
virtual DictionaryOf * | clone () const __attribute__((warn_unused_result)) |
clone implementation for Dictionary | |
Protected Member Functions | |
virtual bool | loadXMLNode (const std::string &name, xmlNode *val, const std::string &comment) |
called with each node being loaded so subclass can handle appropriately |
typedef PO plist::DictionaryOf< PO, Alloc >::entryRet_t |
older compilers don't support covariant returns, so this is the templated storage type on modern compilers, generic ObjectBase otherwise, can check defined(PLIST_NO_COVRET)
Definition at line 600 of file plistCollections.h.
typedef DictionaryBase::storage_t plist::DictionaryOf< PO, Alloc >::storage_t |
shorthand for the type of the storage
Reimplemented from plist::DictionaryBase.
Definition at line 546 of file plistCollections.h.
plist::DictionaryOf< PO, Alloc >::DictionaryOf | ( | ) |
constructor
Definition at line 570 of file plistCollections.h.
plist::DictionaryOf< PO, Alloc >::DictionaryOf | ( | bool | growable | ) | [explicit] |
constructor
Definition at line 572 of file plistCollections.h.
plist::DictionaryOf< PO, Alloc >::DictionaryOf | ( | const DictionaryOf< PO, Alloc > & | d | ) |
copy constructor (don't assign listeners)
Definition at line 574 of file plistCollections.h.
plist::DictionaryOf< PO, Alloc >::~DictionaryOf | ( | ) |
destructor
Definition at line 583 of file plistCollections.h.
void plist::DictionaryOf< PO, Alloc >::addEntry | ( | const std::string & | name, | |
PO * | val, | |||
const std::string & | comment = "" , |
|||
bool | warnExists = true | |||
) | [virtual] |
Convenience method for adding new entries, with optional comment and warning if replacing a previous entry.
By passing a pointer to the entry, you indicate you wish the dictionary to assume responsibility for deallocation
Definition at line 712 of file plistCollections.h.
void plist::DictionaryOf< PO, Alloc >::addEntry | ( | const std::string & | name, | |
PO & | val, | |||
const std::string & | comment = "" , |
|||
bool | warnExists = true | |||
) | [virtual] |
Convenience method for adding new entries, with optional comment and warning if replacing a previous entry.
By passing a reference to the entry, you indicate you will retain responsibility for deallocation
Definition at line 667 of file plistCollections.h.
Referenced by Config::behaviors_config::behaviors_config(), CameraData::CameraData(), Config::Config(), Config::controller_config::controller_config(), OdometrySensor::declareValues(), GPSSensor::declareValues(), SensorFeedback::declareValues(), SensorContact::declareValues(), SensorRangeFinder::declareValues(), Config::vision_config::DepthCamConfig::DepthCamConfig(), ConfigurationEditor::getObjectTemplates(), XWalkParameters::init(), OdometrySensor::init(), GPSSensor::init(), SensorContact::init(), SensorRangeFinder::init(), SensorInfo::init(), PlannerObstacle< N >::init(), KinematicJoint::ControllerInfo::init(), LinkComponent::init(), DynamicRobotState::init(), DriverMessaging::ContactPoint::init(), KinematicJoint::initEntries(), InstanceTypeLoader::InstanceTypeLoader(), KoduConfig::KoduConfig(), XWalkParameters::LegParameters::LegParameters(), LinearMotorController::LinearMotorController(), DriverMessaging::LoadPrediction::LoadPrediction(), EllipsoidObstacle::loadXML(), SphericalObstacle::loadXML(), CylindricalObstacle::loadXML(), BoxObstacle::loadXML(), ConvexPolyObstacle::loadXML(), EllipticalObstacle::loadXML(), CircularObstacle::loadXML(), RectangularObstacle::loadXML(), plist::loadXML(), plist::DictionaryOf< PO, Alloc >::loadXMLNode(), Config::main_config::main_config(), Config::motion_config::motion_config(), MotorController::MotorController(), plist::DictionaryOf< PO, Alloc >::operator=(), OutputConfig< plist::Primitive< float > >::OutputConfig(), PhysicsWorld::PhysicsWorld(), PIDMotorController::PIDMotorController(), ProportionalMotorController::ProportionalMotorController(), Config::vision_config::RawCamConfig::RawCamConfig(), Config::vision_config::RegionCamConfig::RegionCamConfig(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::registerInstance(), EllipsoidObstacle::saveXML(), SphericalObstacle::saveXML(), CylindricalObstacle::saveXML(), BoxObstacle::saveXML(), ConvexPolyObstacle::saveXML(), EllipticalObstacle::saveXML(), CircularObstacle::saveXML(), RectangularObstacle::saveXML(), Config::vision_config::SegCamConfig::SegCamConfig(), DriverMessaging::SensorPriority::SensorPriority(), plist::DictionaryOf< PO, Alloc >::set(), XWalkParameters::SinusoidalParameters::SinusoidalParameters(), Config::sound_config::sound_config(), Config::sound_config::streaming_config::streaming_config(), Config::vision_config::StreamingConfig::StreamingConfig(), Config::vision_config::vision_config(), WheeledWalkMC::WheeledWalkMC(), and Config::wireless_config::wireless_config().
const_iterator plist::DictionaryOf< PO, Alloc >::begin | ( | ) | const |
return an STL const_iterator to the first entry (note implicit conversion to specialized const_iterator)
Reimplemented from plist::DictionaryBase.
Reimplemented in PhysicsWorld.
Definition at line 624 of file plistCollections.h.
Referenced by InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::loadXML(), plist::DictionaryOf< PO, Alloc >::operator=(), plist::DictionaryOf< PO, Alloc >::set(), and XWalkMC::updateOutputsWalking().
virtual bool plist::DictionaryOf< PO, Alloc >::canContain | ( | const ObjectBase & | obj | ) | [virtual] |
returns true if the Collection subclass allows storage of the argument
Implements plist::Collection.
Reimplemented in plist::RGBColor< T >.
Definition at line 628 of file plistCollections.h.
DictionaryOf< PO, Alloc > * plist::DictionaryOf< PO, Alloc >::clone | ( | ) | const [virtual] |
clone implementation for Dictionary
implements the clone function for dictionary
Implements plist::ObjectBase.
Reimplemented in LinkComponent, KinematicJoint, SensorInfo, SensorRangeFinder, SensorContact, SensorFeedback, GPSSensor, OdometrySensor, RectangularObstacle, CircularObstacle, EllipticalObstacle, ConvexPolyObstacle, HierarchicalObstacle, BoxObstacle, CylindricalObstacle, SphericalObstacle, EllipsoidObstacle, and plist::RGBColor< T >.
Definition at line 737 of file plistCollections.h.
Referenced by HierarchicalObstacle::collides().
const_iterator plist::DictionaryOf< PO, Alloc >::end | ( | ) | const |
return the one-past-end const_iterator (note implicit conversion to specialized const_iterator)
Reimplemented from plist::DictionaryBase.
Reimplemented in PhysicsWorld.
Definition at line 626 of file plistCollections.h.
Referenced by InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::create(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::destroy(), KinematicJoint::doSaveXMLNode(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::getInstance(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::loadXML(), plist::DictionaryOf< PO, Alloc >::operator=(), ConfigurationEditor::AddCollectionEntry::refresh(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::registerInstance(), plist::DictionaryOf< PO, Alloc >::set(), Config::setValue(), and XWalkMC::updateOutputsWalking().
const_iterator plist::DictionaryOf< PO, Alloc >::findEntry | ( | const std::string & | name | ) | const |
returns an iterator the <key, value> pair with the specified key (returns end() if not found)
Reimplemented from plist::DictionaryBase.
Definition at line 621 of file plistCollections.h.
Referenced by InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::create(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::destroy(), KinematicJoint::doSaveXMLNode(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::getInstance(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::loadXML(), InstanceTracker< FamilyT, ClassNameT, FactoryBaseT, FactoryT >::registerInstance(), and Config::setValue().
entryRet_t& plist::DictionaryOf< PO, Alloc >::getEntry | ( | const std::string & | name | ) | [virtual] |
returns a reference to the entry with the specified name, creating it if it doesn't exist
Implements plist::DictionaryBase.
Reimplemented in OutputConfig< T >, and OutputConfig< plist::Primitive< float > >.
Definition at line 607 of file plistCollections.h.
Referenced by plist::DictionaryOf< plist::Point >::operator[]().
bool plist::DictionaryOf< PO, Alloc >::loadXMLNode | ( | const std::string & | name, | |
xmlNode * | val, | |||
const std::string & | comment | |||
) | [protected, virtual] |
called with each node being loaded so subclass can handle appropriately
Implements plist::DictionaryBase.
Reimplemented in ConfigDictionary, OutputConfig< T >, and OutputConfig< plist::Primitive< float > >.
Definition at line 740 of file plistCollections.h.
DictionaryOf< PO, Alloc > & plist::DictionaryOf< PO, Alloc >::operator= | ( | const DictionaryOf< PO, Alloc > & | a | ) |
assignment (don't assign listeners); subclass should call fireEntriesChanged after calling this (and updating its own storage)
Definition at line 859 of file plistCollections.h.
Referenced by plist::DictionaryOf< PO, Alloc >::set().
entryRet_t& plist::DictionaryOf< PO, Alloc >::operator[] | ( | const std::string & | name | ) | [virtual] |
returns a reference to the entry with the specified name, creating it if it doesn't exist
Implements plist::DictionaryBase.
Definition at line 619 of file plistCollections.h.
void plist::DictionaryOf< PO, Alloc >::set | ( | const DictionaryBase & | a | ) | [virtual] |
handles actual setting of one dictionary to another, similar to operator=(DictionaryOf), but allows for polymorphic conversion to the template type
Definition at line 782 of file plistCollections.h.
virtual void plist::DictionaryOf< 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 578 of file plistCollections.h.
void plist::DictionaryOf< PO, Alloc >::setEntry | ( | const std::string & | name, | |
PO * | val, | |||
bool | warnExists = false | |||
) | [virtual] |
Replaces the entry with the specified key, optionally warns as it does so. If you simply want to set the *value* of the specified entry, try getEntry() and assignment...
By passing a pointer to the entry, you indicate you wish the dictionary to assume responsibility for deallocation
Definition at line 690 of file plistCollections.h.
void plist::DictionaryOf< PO, Alloc >::setEntry | ( | const std::string & | name, | |
PO & | val, | |||
bool | warnExists = false | |||
) | [virtual] |
Replaces the entry with the specified key, optionally warns as it does so. If you simply want to set the *value* of the specified entry, try getEntry() and assignment...
By passing a reference to the entry, you indicate you will retain responsibility for deallocation
Definition at line 646 of file plistCollections.h.
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:25 2016 by Doxygen 1.6.3 |