#include <BKeyValuePairs.h>

Public Member Functions | |
| void | Add (const BString &key, const BPoint &val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, Int64 val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, bool val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, float val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, Int32 val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, double val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, const wchar_t val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, const char *val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, const BString *val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, const BString &val) |
| Adds a key / value pair to this collection. | |
| void | Add (const BString &key, const BVariant &val) |
| Adds a key / value pair to this collection. | |
| BKeyValuePairs (const BKeyValuePairs &kvPairs) | |
| Copy constructor. | |
| BKeyValuePairs () | |
| Default constructor. | |
| void | Clear (void) |
| Removes all pairs from this collection. | |
| virtual size_t | ComputeSize (void) const |
| Computes the size of the BByteArray required to store this object. | |
| virtual void | FromByteArray (const BByteArray &bytes, size_t &startPos) |
| Initializes an instance of this object from a BByteArray. | |
| bool | GetBoolean (const BString &key, bool defVal=false) const |
| Gets the requested value from this collection. | |
| BoolVector | GetBooleans (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| size_t | GetCount (void) const |
| Gets the number of pairs in this collection. | |
| double | GetDouble (const BString &key, double defVal=0.0) const |
| Gets the requested value from this collection. | |
| DoubleVector | GetDoubles (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| float | GetFloat (const BString &key, float defVal=0.0) const |
| Gets the requested value from this collection. | |
| FloatVector | GetFloats (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| Int32 | GetInteger (const BString &key, Int32 defVal=0) const |
| Gets the requested value from this collection. | |
| Int64 | GetInteger64 (const BString &key, Int64 defVal=0) const |
| Gets the requested value from this collection. | |
| Int64Vector | GetInteger64s (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| Int32Vector | GetIntegers (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| BPoint | GetPoint (const BString &key) const |
| Gets the requested value from this collection. | |
| void | GetPropertyNames (BStringVector &names) const |
| Gets a list of all key names in the collection. | |
| BString | GetString (const BString &key) const |
| Gets the requested value from this collection. | |
| BStringVector | GetStrings (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| bool | GetValue (const BString &key, BPoint &val) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, Int64 &val, Int64 defVal=0) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, bool &val, bool defVal) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, float &val, float defVal=0.0) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, Int32 &val, Int32 defVal=0) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, double &val, double defVal=0.0) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, BString &val) const |
| Gets the requested value from this collection. | |
| bool | GetValue (const BString &key, BVariant &val) const |
| Gets the requested value from this collection. | |
| bool | GetValues (const BString &key, Int64Vector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, BoolVector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, FloatVector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, Int32Vector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, DoubleVector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, BStringVector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValues (const BString &key, BVariantVector &vals) const |
| Gets all values that correspond to the specified key from this collection. | |
| bool | GetValueType (const BString &key, EVariantType &type) const |
| Gets the data type associated with the specified key. | |
| EVariantType | GetValueType (const BString &key) const |
| Returns the data type associated with the specified key. | |
| BVariant | GetVariant (const BString &key) const |
| Gets the requested value from this collection. | |
| BVariantVector | GetVariants (const BString &key) const |
| Gets all values that correspond to the specified key. | |
| bool | HasProperty (const BString &key) const |
| Returns an indication of whether or not the requested key name exists in this collection. | |
| BKeyValuePairs & | operator= (const BKeyValuePairs &rhs) |
| Assignment operator. | |
| void | Remove (const BString &key) |
| Removes all pairs with the specified key from this collection. | |
| void | SetValue (const BString &key, const BPoint &val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, Int64 val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, bool val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, float val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, Int32 val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, double val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, const wchar_t *val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, const char *val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, const BString *val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, const BString &val) |
| Updates a key / value pair in this collection. | |
| void | SetValue (const BString &key, const BVariant &val) |
| Updates a key / value pair in this collection. | |
| virtual BByteArray | ToByteArray (void) const |
| Stores this object in a BByteArray. | |
| virtual | ~BKeyValuePairs () |
| Destructor. | |
Protected Attributes | |
| BStringToAttributeMap | m_keyValPairs |
| The collection of key / value pairs. | |
| BKeyValuePairs | ( | ) | [inline] |
Default constructor.
This constructor creates an empty collection.
| BKeyValuePairs | ( | const BKeyValuePairs & | kvPairs | ) |
| virtual ~BKeyValuePairs | ( | ) | [inline, virtual] |
Destructor.
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| Int64 | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| bool | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| float | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| double | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| const wchar_t | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Add | ( | const BString & | key, | |
| const char * | val | |||
| ) | [inline] |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
Adds a key / value pair to this collection.
If there already exists a pair with the specified key, the existing pair will be unchanged and a new pair will be added.
| key | The new key. | |
| val | The new value. |
| void Clear | ( | void | ) | [inline] |
Removes all pairs from this collection.
| virtual size_t ComputeSize | ( | void | ) | const [virtual] |
Computes the size of the BByteArray required to store this object.
Implements BByteStreamable.
| virtual void FromByteArray | ( | const BByteArray & | bytes, | |
| size_t & | startPos | |||
| ) | [virtual] |
Initializes an instance of this object from a BByteArray.
| bytes | The BByteArray containing the byte representation of the object. | |
| startPos | The position in the BByteArray where the byte representation begins. This value will be updated to point to the byte past the end of this object in the byte array. |
Implements BByteStreamable.
| bool GetBoolean | ( | const BString & | key, | |
| bool | defVal = false | |||
| ) | const |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. | |
| defVal | The default value for the returned boolean. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a boolean. |
| BoolVector GetBooleans | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a boolean. |
| size_t GetCount | ( | void | ) | const [inline] |
Gets the number of pairs in this collection.
| double GetDouble | ( | const BString & | key, | |
| double | defVal = 0.0 | |||
| ) | const |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. | |
| defVal | The default value for the returned double. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a double. |
| DoubleVector GetDoubles | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a double. |
| float GetFloat | ( | const BString & | key, | |
| float | defVal = 0.0 | |||
| ) | const |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. | |
| defVal | The default value for the returned float. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a float. |
| FloatVector GetFloats | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a float. |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. | |
| defVal | The default value for the returned integer. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not an integer. |
| Int64 GetInteger64 | ( | const BString & | key, | |
| Int64 | defVal = 0 | |||
| ) | const |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. | |
| defVal | The default value for the returned Int64. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not an Int64. |
| Int64Vector GetInteger64s | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not an Int64. |
| Int32Vector GetIntegers | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not an integer. |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a BPoint. |
| void GetPropertyNames | ( | BStringVector & | names | ) | const |
Gets a list of all key names in the collection.
| names | The collection in which the key names will be placed. |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. | |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a BString. |
| BStringVector GetStrings | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a BString. |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a BPoint. |
| bool GetValue | ( | const BString & | key, | |
| Int64 & | val, | |||
| Int64 | defVal = 0 | |||
| ) | const |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. | |
| defVal | The default value for the returned Int64. If there are not any pairs with the specified key, then val will be set to this value. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not an Int64. |
| bool GetValue | ( | const BString & | key, | |
| bool & | val, | |||
| bool | defVal | |||
| ) | const |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. | |
| defVal | The default value for the returned bool. If there are not any pairs with the specified key, then val will be set to this value. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a bool. |
| bool GetValue | ( | const BString & | key, | |
| float & | val, | |||
| float | defVal = 0.0 | |||
| ) | const |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. | |
| defVal | The default value for the returned float. If there are not any pairs with the specified key, then val will be set to this value. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a float. |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. | |
| defVal | The default value for the returned integer. If there are not any pairs with the specified key, then val will be set to this value. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not an integer. |
| bool GetValue | ( | const BString & | key, | |
| double & | val, | |||
| double | defVal = 0.0 | |||
| ) | const |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. | |
| defVal | The default value for the returned double. If there are not any pairs with the specified key, then val will be set to this value. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a double. |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. |
| BAttributeDataException | This exception will be thrown if the value that corresponds to the specified key is not a BString. |
Gets the requested value from this collection.
| key | The key that corresponds to the desired value. | |
| val | After the method returns, this parameter will hold the value associated with the specified key. |
| bool GetValues | ( | const BString & | key, | |
| Int64Vector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not an Int64. |
| bool GetValues | ( | const BString & | key, | |
| BoolVector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a bool. |
| bool GetValues | ( | const BString & | key, | |
| FloatVector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a float. |
| bool GetValues | ( | const BString & | key, | |
| Int32Vector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not an integer. |
| bool GetValues | ( | const BString & | key, | |
| DoubleVector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a double. |
| bool GetValues | ( | const BString & | key, | |
| BStringVector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| BAttributeDataException | This exception will be thrown if a value that corresponds to the specified key is not a BString. |
| bool GetValues | ( | const BString & | key, | |
| BVariantVector & | vals | |||
| ) | const |
Gets all values that correspond to the specified key from this collection.
| key | The key that corresponds to the desired values. | |
| vals | After this method returns, this parameter will hold all values associated with the specified key. |
| bool GetValueType | ( | const BString & | key, | |
| EVariantType & | type | |||
| ) | const |
Gets the data type associated with the specified key.
| key | The key name. | |
| type | After this method returns, this will hold he data type that corresponds to the specified key. |
| EVariantType GetValueType | ( | const BString & | key | ) | const |
Returns the data type associated with the specified key.
This method will throw an exception if the specified key does not exist.
| key | The key name. |
| BKeyNotFoundException | This exception will be thrown if there does not exist an element with the specified key. |
Gets the requested value from this collection.
If there is more than one pair with the specified key, the value of the first pair will be returned.
| key | The key that corresponds to the desired value. |
| BKeyNotFoundException | This exception will be thrown if there does not exist a pair with the specified key. |
| BVariantVector GetVariants | ( | const BString & | key | ) | const |
Gets all values that correspond to the specified key.
| key | The key that corresponds to the desired values. |
| bool HasProperty | ( | const BString & | key | ) | const |
Returns an indication of whether or not the requested key name exists in this collection.
| key | The key to test for containment. |
| BKeyValuePairs& operator= | ( | const BKeyValuePairs & | rhs | ) |
Assignment operator.
| rhs | The BKeyValuePairs object whose value will be copied into this one. |
| void Remove | ( | const BString & | key | ) | [inline] |
Removes all pairs with the specified key from this collection.
| key | The key that identifies the pair(s) to be removed. |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| Int64 | val | |||
| ) |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| bool | val | |||
| ) |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| float | val | |||
| ) |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| double | val | |||
| ) |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| const wchar_t * | val | |||
| ) | [inline] |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| void SetValue | ( | const BString & | key, | |
| const char * | val | |||
| ) | [inline] |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
Updates a key / value pair in this collection.
If a pair with the specified key does not exist, it will be added. If there are multiple pairs with the specified key, they will all be removed and replaced by this one.
| key | The new key. | |
| val | The new value |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Implements BByteStreamable.
BStringToAttributeMap m_keyValPairs [protected] |
The collection of key / value pairs.