API 4.4.1-2022-10-19-2c4045e59
For MATLAB, Python, Java, and C++ users
|
ValueArrayDictionary represents an associative array mapping from a string to an AbstractValueArray. More...
Public Member Functions | |
bool | hasKey (const std::string &key) const |
Does a key-value pair corresponding to the given key currently exist ? More... | |
const AbstractValue & | getValueForKey (const std::string &key) const |
Get the first entry of the array corresponding to the given key. More... | |
template<typename ValueType > | |
bool | setValueForKey (const std::string &key, const ValueType &value) |
Set the value corresponding to a given key. More... | |
const AbstractValueArray & | getValueArrayForKey (const std::string &key) const |
Get the array corresponding to a given key. More... | |
bool | setValueArrayForKey (const std::string &key, const AbstractValueArray &abstractValueArray) |
Set the array corresponding to a given key. More... | |
AbstractValueArray & | updValueArrayForKey (const std::string &key) |
Get a writable reference to the array corresponding to a given key. More... | |
void | removeValueForKey (const std::string &key) |
Remove a key and its associated array. More... | |
void | removeValueArrayForKey (const std::string &key) |
Remove a key and its associated array. More... | |
std::vector< std::string > | getKeys () const |
Get all the existing keys as a std::vector. More... | |
Dictionary::const_iterator | getKeyValueBegin () const |
Get begin iterator to the associative array. More... | |
Dictionary::const_iterator | getKeyValueEnd () const |
Get begin iterator to the associative array. More... | |
std::string | getValueAsString (const std::string &key) const |
Get value corresponding to the given key as string. More... | |
ValueArrayDictionary represents an associative array mapping from a string to an AbstractValueArray.
using OpenSim::ValueArrayDictionary::AbstractValue = SimTK::AbstractValue |
|
inline |
Get all the existing keys as a std::vector.
Referenced by OpenSim::DataTable_< ETX, ETY >::DataTable_(), and OpenSim::DataTable_< ETX, ETY >::validateDependentsMetaData().
|
inline |
Get begin iterator to the associative array.
|
inline |
Get begin iterator to the associative array.
|
inline |
Get the array corresponding to a given key.
KeyNotFound | If key is not found. |
References hasKey().
Referenced by OpenSim::DataTable_< ETX, ETY >::appendRow(), and OpenSim::DataTable_< ETX, ETY >::validateDependentsMetaData().
|
inline |
Get value corresponding to the given key as string.
KeyNotFound | If key is not found. |
References hasKey().
|
inline |
Get the first entry of the array corresponding to the given key.
KeyNotFound | If key is not found. |
References hasKey().
Referenced by OpenSim::DataTable_< ETX, ETY >::validateIndependentMetaData().
|
inline |
Does a key-value pair corresponding to the given key currently exist ?
Referenced by OpenSim::DataTable_< ETX, ETY >::appendRow(), getValueArrayForKey(), getValueAsString(), getValueForKey(), updValueArrayForKey(), and OpenSim::DataTable_< ETX, ETY >::validateDependentsMetaData().
|
inline |
|
inline |
Remove a key and its associated array.
|
inline |
Set the array corresponding to a given key.
Value array is set only if the key does not already exist.
true | If the value was set for the given key. |
false | If the value was not set because key already present. |
References OpenSim::AbstractValueArray::clone().
|
inline |
Set the value corresponding to a given key.
Value is set only if the key does not already exist.
true | If the value was set for the given key. |
false | If the value was not set because key already present. |
References OpenSim::ValueArray< T >::upd().
Referenced by OpenSim::DelimFileAdapter< T >::extendRead().
|
inline |
Get a writable reference to the array corresponding to a given key.
KeyNotFound | If key is not found. |
References hasKey().
Referenced by OpenSim::DataTable_< ETX, ETY >::DataTable_().