C API Documentation
|
This class is frozen, no new features A dictionary interface that objects can implement. These are automatically mapped to python dictionaries. More...
#include <Dictionary.h>
Public Member Functions | |
virtual void | setItem (const std::string &key, const rr::Variant &value)=0 |
virtual Variant | getItem (const std::string &key) const =0 |
virtual bool | hasKey (const std::string &key) const =0 |
virtual size_t | deleteItem (const std::string &key)=0 |
virtual std::vector< std::string > | getKeys () const =0 |
virtual | ~Dictionary () |
This class is frozen, no new features A dictionary interface that objects can implement. These are automatically mapped to python dictionaries.
|
inlinevirtual |
Pure virtual interface, you should never have to delete an instance of this type directly.
|
pure virtual |
remove a value
Implemented in rr::BasicDictionary, rr::LoadSBMLOptions, rr::NLEQ2Interface, and rr::NLEQ1Interface.
|
pure virtual |
Get a value. Variants are POD. If the key does not exist, an std::exception will be thrown.
The Variant object has the assigment operator overloaded so it will automatically convert to any native C++ object. If the Variant can not be converted, it will raise an exception, i.e.
Implemented in rr::BasicDictionary, rr::LoadSBMLOptions, rr::NLEQ2Interface, and rr::NLEQ1Interface.
|
pure virtual |
list of keys in this object.
Implemented in rr::BasicDictionary, rr::LoadSBMLOptions, rr::NLEQ2Interface, and rr::NLEQ1Interface.
|
pure virtual |
is there a key matching this name.
Implemented in rr::BasicDictionary, rr::LoadSBMLOptions, rr::NLEQ2Interface, and rr::NLEQ1Interface.
|
pure virtual |
Set the value for an arbitrary key.
The Variant object has a large number of creation operators so you only have to give the value as native C++ object i.e.
Implemented in rr::BasicDictionary, rr::SimulateOptions, rr::LoadSBMLOptions, rr::NLEQ2Interface, and rr::NLEQ1Interface.