#include <propertylist.h>
Public Types | |
typedef std::map< key_type, Property > | map_type |
typedef map_type::value_type | value_type |
typedef map_type::iterator | iterator |
typedef map_type::const_iterator | const_iterator |
Public Member Functions | |
PropertyList () | |
PropertyList (const PropertyList &) | |
~PropertyList () | |
void | toStream (std::ostream &os) const |
Set/Add values | |
void | addProperty (const std::string &name, const std::string &type, const std::string &default_value="", const std::string &description="", const Property::StringPairList &possible_values=Property::StringPairList(), bool enable_empty_default=false) |
void | addProperty (const Property &p) |
template<class propertyT> | |
void | setProperty (const std::string &name, const propertyT &value) |
Value retrieval | |
template<class propertyT> | |
const propertyT & | getProperty (const std::string &name) const |
Property & | get (const std::string &name) |
const Property & | get (const std::string &name) const |
bool | exists (const std::string &name) const |
Standard Container Methods | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
bool | empty () const |
size_t | size () const |
bool | remove (const std::string &name) |
This is the complete list of properties that exist in a particular device, and can be used to configure this device in a concrete simulation setup. Each property has a name and a value and some more characteristics, and the value adjusts the actual behaviour of the Device at run time.
In this property list you can look up any property, iterate through all of them, change their values, or add new ones.
|
Type of the internal map. |
|
Type of the values in the map -- that's probably a |
|
Iterator. |
|
Const iterator. |
|
Constructor. |
|
Copy Constructor. Creates a deep (by-value) copy. Expensive for long lists. |
|
Destructor. |
|
Create a new property in the list. If a property with that name already exists, an exception will be thrown.
|
|
Add a property in the list. If a property with the same name already exists, an exception will be thrown. |
|
Set a property to the given value of type T. This will only work if this property already exists (created by addProperty()), otherwise it will throw an error. Also, if the type in the template function does not match the type of this property.
|
|
Returns the value of the specified property, of type T. Throws an error if the property doesn't exist, or if the type in the template function does not match the type of this property.
|
|
Returns the specified property. Throws an error if it doesn't exist. |
|
Returns the specified property. Throws an error if it doesn't exist. |
|
Returns true when a property with the specified name exists.
|
|
Returns an iterator. |
|
Returns an iterator. |
|
Returns an iterator. |
|
Returns an iterator. |
|
Returns true if this list is empty. |
|
Returns the size of this list. |
|
Removes the property of the given name from this PropertyList. Returns true if a property was removed, or false if none of this name has been found. |
|
Writes all properties of this list to the specified output stream, formatted for usage in the simthetic debugging output. Output includes name, type, and value of each property. |