Rhino C++ API
8.14
|
#include <rhinoSdkUiProfileContext.h>
Public Member Functions | |
CRhinoStringDictionary () | |
int | Add (const wchar_t *key, const wchar_t *value) |
int | Count () const |
bool | Delete (const wchar_t *key) |
bool | Delete (int index) |
void | Empty () |
int | IndexOf (const wchar_t *key) const |
const wchar_t * | Key (int index) const |
const ON_ClassArray< ON_wString > & | Keys () const |
const wchar_t * | operator[] (const wchar_t *key) |
bool | Set (const wchar_t *key, const wchar_t *value) |
const wchar_t * | Value (const wchar_t *key) const |
const wchar_t * | Value (int index) const |
const ON_ClassArray< ON_wString > & | Values () const |
Friends | |
class | CRhSettingsHooks |
Description: A collection of key value string pairs, each key name must be unique, key names are case sensitive.
CRhinoStringDictionary::CRhinoStringDictionary | ( | ) |
Description: Constructor
int CRhinoStringDictionary::Add | ( | const wchar_t * | key, |
const wchar_t * | value | ||
) |
Description: Call this method to add or replace a key in the dictionary. The key name is case sensitive. If there is currently a matching key then the value for that key is replaced with the new value. Parameters: key - [in] Case sensitive key name value - [in] Value associated with the specified key Returns: Returns the index of the item added or modified if successful or -1 on error.
int CRhinoStringDictionary::Count | ( | ) | const |
Description: Call this method to get the number of items in the dictionary. Returns: Returns the number of items in the dictionary
bool CRhinoStringDictionary::Delete | ( | const wchar_t * | key | ) |
Description: Call this method to delete a specific key, the key name is case sensitive. Parameters: key - [in] Case sensitive key name Returns: Returns true if the key was found in the dictionary and successfully deleted or false on error.
bool CRhinoStringDictionary::Delete | ( | int | index | ) |
Description: Call this method to delete the key value pair at the specified index. Parameters: index - [in] Zero based index Returns: Returns true if the index was valid and the key value pair was successfully deleted otherwise; returns false on error.
void CRhinoStringDictionary::Empty | ( | ) |
Description: Call this method to clear the dictionary and set its count to 0.
int CRhinoStringDictionary::IndexOf | ( | const wchar_t * | key | ) | const |
Description: Call this method to get the 0 based index of the specified key. Parameters: key - [in] Case sensitive key name Returns: Returns a value greater than 0 and less than Count() if successful otherwise; returns -1.
const wchar_t* CRhinoStringDictionary::Key | ( | int | index | ) | const |
Description: Call this method to get a key name at a specific index. Parameters: index - [in] Zero based index Returns: Returns the key name string if the index is greater than 0 and less than Count().
const ON_ClassArray<ON_wString>& CRhinoStringDictionary::Keys | ( | ) | const |
Description: Call this method to gain direct access to the list of keys in the dictionary. Returns: Returns a const reference to the key list.
const wchar_t* CRhinoStringDictionary::operator[] | ( | const wchar_t * | key | ) |
Description: Array operator that allows access to key values Parameters: key - [in] Case sensitive key name Returns: Returns the value if found or NULL on error.
bool CRhinoStringDictionary::Set | ( | const wchar_t * | key, |
const wchar_t * | value | ||
) |
Description: Call this method to modify the value associated with the specified key, the key is case sensitive. Parameters: key - [in] Case sensitive key name value - [in] New value Returns: Returns true if the key was found and the value was successfully set.
const wchar_t* CRhinoStringDictionary::Value | ( | const wchar_t * | key | ) | const |
Description: Call this method to get the value for the specified key name, the key name string is case sensitive. Parameters: key - [in] Case sensitive key name Returns: Returns the value string if the key name is found in the dictionary otherwise; returns NULL.
const wchar_t* CRhinoStringDictionary::Value | ( | int | index | ) | const |
Description: Call this method to get a value at a specific index. Parameters: index - [in] Zero based index Returns: Returns the value string if the index is greater than 0 and less than Count().
const ON_ClassArray<ON_wString>& CRhinoStringDictionary::Values | ( | ) | const |
Description: Call this method to gain direct access to the list of values in the dictionary. Returns: Returns a const reference to the value list.
|
friend |