PropertyMap Class Reference
Bare-bones map used throughout Milton for holding custom initialization parameters/options/information. More...
#include <PropertyMap.h>

Public Member Functions | |
| template<> | |
| unsigned & | getValue (const std::string &key, const unsigned &defaultValue) |
| template<> | |
| real_t & | getValue (const std::string &key, const real_t &defaultValue) |
Constructors | |
| PropertyMap () | |
| PropertyMap (const PropertyMap ©) | |
| virtual | ~PropertyMap () |
Main usage interface | |
| void | clear () |
| virtual void | inherit (const PropertyMap &m, bool overwrite=true) |
| bool | contains (const std::string &key) const |
| template<typename T> | |
| void | insert (const std::string &key, const T &value) |
| template<typename T> | |
| T & | getValue (const std::string &key) |
| template<typename T> | |
| T & | getValue (const std::string &key, const T &defaultValue) |
| boost::any & | operator[] (const std::string &key) |
Protected Member Functions | |
| DECLARE_STL_TYPEDEF2 (std::map< std::string, boost::any >, STLPropertyMap) | |
Protected Attributes | |
| STLPropertyMap | m_propertyMap |
| Internal std::map. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const PropertyMap &m) |
| Prints a PropertyMap to an output stream for debugging purposes. | |
Detailed Description
Bare-bones map used throughout Milton for holding custom initialization parameters/options/information.
- Date:
- Fall 2008
Definition at line 21 of file PropertyMap.h.
Constructor & Destructor Documentation
| PropertyMap::PropertyMap | ( | ) | [inline] |
Definition at line 29 of file PropertyMap.h.
| PropertyMap::PropertyMap | ( | const PropertyMap & | copy | ) | [inline] |
Definition at line 32 of file PropertyMap.h.
| virtual PropertyMap::~PropertyMap | ( | ) | [inline, virtual] |
Definition at line 41 of file PropertyMap.h.
Member Function Documentation
| PropertyMap::DECLARE_STL_TYPEDEF2 | ( | std::map< std::string, boost::any > | , | |
| STLPropertyMap | ||||
| ) | [protected] |
| void PropertyMap::clear | ( | ) |
Resets all properties to their default values
Reimplemented in ShapeSet.
Definition at line 16 of file PropertyMap.cpp.
| virtual void PropertyMap::inherit | ( | const PropertyMap & | m, | |
| bool | overwrite = true | |||
| ) | [inline, virtual] |
Definition at line 54 of file PropertyMap.h.
| bool PropertyMap::contains | ( | const std::string & | key | ) | const [inline] |
- Returns:
- whether or not this map contains a value for the given key
Definition at line 66 of file PropertyMap.h.
| void PropertyMap::insert | ( | const std::string & | key, | |
| const T & | value | |||
| ) | [inline] |
Inserts the given key, value pair into this map
Definition at line 76 of file PropertyMap.h.
| T& PropertyMap::getValue | ( | const std::string & | key | ) | [inline] |
- Returns:
- a reference to the value associated with the given key
Definition at line 86 of file PropertyMap.h.
| T& PropertyMap::getValue | ( | const std::string & | key, | |
| const T & | defaultValue | |||
| ) | [inline] |
- Returns:
- a reference to the value associated with the given key or the given defaultValue if no custom value exists
Definition at line 105 of file PropertyMap.h.
| boost::any& PropertyMap::operator[] | ( | const std::string & | key | ) | [inline] |
- Returns:
- a reference to the variant wrapper around the value associated with the given key
Definition at line 116 of file PropertyMap.h.
| unsigned& PropertyMap::getValue | ( | const std::string & | key, | |
| const unsigned & | defaultValue | |||
| ) | [inline] |
Definition at line 131 of file PropertyMap.h.
| real_t& PropertyMap::getValue | ( | const std::string & | key, | |
| const real_t & | defaultValue | |||
| ) | [inline] |
Definition at line 147 of file PropertyMap.h.
Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const PropertyMap & | m | |||
| ) | [friend] |
Prints a PropertyMap to an output stream for debugging purposes.
Definition at line 21 of file PropertyMap.cpp.
Member Data Documentation
STLPropertyMap PropertyMap::m_propertyMap [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6