#include <BVariant.h>

Public Member Functions | |
| BVariant (const BStringVector &val) | |
| Constructs a BVariant that holds a collection of BString values. | |
| BVariant (char **pVals) | |
| Constructs a BVariant that holds a collection of BString values. | |
| BVariant (const DoubleVector &val) | |
| Constructs a BVariant that holds a collection of floating-point values. | |
| BVariant (const double *pVals, int count) | |
| Constructs a BVariant that holds a collection of floating-point values. | |
| BVariant (const Int32Vector &val) | |
| Constructs a BVariant that holds a collection of integers. | |
| BVariant (const int *pVals, int count) | |
| Constructs a BVariant that holds a collection of integers. | |
| BVariant (const BPoint &val) | |
| Constructs a BVariant that holds a BPoint. | |
| BVariant (Int64 val) | |
| Constructs a BVariant that holds an integer value. | |
| BVariant (bool val) | |
| Constructs a BVariant that holds a boolean value. | |
| BVariant (float val) | |
| Constructs a BVariant that holds a floating-point value. | |
| BVariant (Int32 val) | |
| Constructs a BVariant that holds an integer value. | |
| BVariant (double val) | |
| Constructs a BVariant that holds a floating-point value. | |
| BVariant (const wchar_t *val, int maxLength=0) | |
| Constructs a BVariant that holds a BString. | |
| BVariant (const char *val, int maxLength=0) | |
| Constructs a BVariant that holds a BString. | |
| BVariant (const BString *val, int maxLength=0) | |
| Constructs a BVariant that holds a BString. | |
| BVariant (const BString &val, int maxLength=0) | |
| Constructs a BVariant that holds a BString. | |
| BVariant (const BVariant &var) | |
| Copy constructor. | |
| BVariant () | |
| Default constructor. | |
| void | Clear (void) |
| Resets this BVariant to an uninitialized state. | |
| BVariant * | Clone (void) const |
| Creates a deep-copy of this object. | |
| 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. | |
| EVariantType | GetType (void) const |
| Gets the data type for this BVariant. | |
| bool | GetValueAsBoolean (bool defVal=false) const |
| Returns the contents of this BVariant expressed as a boolean. | |
| double | GetValueAsDouble (double defVal=0.0) const |
| Returns the contents of this BVariant expressed as a double. | |
| DoubleVector | GetValueAsDoubleList () const |
| Returns the contents of this BVariant formatted as a double list. | |
| float | GetValueAsFloat (float defVal=0.0) const |
| Returns the contents of this BVariant expressed as a float. | |
| Int32 | GetValueAsInteger (Int32 defVal=0) const |
| Returns the contents of this BVariant expressed as an integer. | |
| Int64 | GetValueAsInteger64 (Int64 defVal=0) const |
| Returns the contents of this BVariant expressed as a 64-bit integer. | |
| Int32Vector | GetValueAsIntegerList () const |
| Returns the contents of this BVariant formatted as an integer list. | |
| BPoint | GetValueAsPoint () const |
| Returns the contents of this BVariant formatted as a BPoint. | |
| BString | GetValueAsString () const |
| Returns the contents of this BVariant formatted as a BString. | |
| BStringVector | GetValueAsStringList () const |
| Returns the contents of this BVariant formatted as a BString list. | |
| bool | IsList (void) const |
| Gets an indicator of whether or not this BVariant contains a list of values. | |
| bool | operator!= (const BVariant &rhs) const |
| Inequality operator. | |
| BVariant & | operator= (const BVariant &rhs) |
| Assignment operator. | |
| bool | operator== (const BVariant &rhs) const |
| Equality operator. | |
| void | SetType (const EVariantType type) |
| Sets the data type for this BVariant. | |
| void | SetValue (const BStringVector &val) |
| Sets the value of this BVariant to a BString list. | |
| void | SetValue (char **pVals) |
| Sets the value of this BVariant to a BString list. | |
| void | SetValue (const DoubleVector &val) |
| Sets the value of this BVariant to a double list. | |
| void | SetValue (const double *pVals, int count) |
| Sets the value of this BVariant to a double list. | |
| void | SetValue (const Int32Vector &val) |
| Sets the value of this BVariant to an integer list. | |
| void | SetValue (const Int32 *pVals, int count) |
| Sets the value of this BVariant to an integer list. | |
| void | SetValue (const BPoint &val) |
| Sets the value of this BVariant to a BPoint. | |
| void | SetValue (const Int64 val) |
| Sets the value of this BVariant to a 64-bit integer. | |
| void | SetValue (const bool val) |
| Sets the value of this BVariant to a boolean. | |
| void | SetValue (const float val) |
| Sets the value of this BVariant to a float. | |
| void | SetValue (const double val) |
| Sets the value of this BVariant to a double. | |
| void | SetValue (const Int32 val) |
| Sets the value of this BVariant to an integer. | |
| void | SetValue (const wchar_t *val, size_t maxLength=0) |
| Set the value of this BVariant to a BString. | |
| void | SetValue (const char *val, size_t maxLength=0) |
| Set the value of this BVariant to a BString. | |
| void | SetValue (const BString *val, size_t maxLength=0) |
| Set the value of this BVariant to a BString. | |
| void | SetValue (const BString &val, size_t maxLength=0) |
| Set the value of this BVariant to a BString. | |
| virtual BByteArray | ToByteArray (void) const |
| Stores this object in a BByteArray. | |
| virtual | ~BVariant () |
| Destructor. | |
Static Public Member Functions | |
| static BString | GetDoubleListSeperator () |
| Gets the seperator used when returning a double list as a string. | |
| static BString | GetFalseStringValue () |
| Gets the string value to use for false when converting from a boolean. | |
| static BString | GetIntegerListSeperator () |
| Gets the seperator used when returning an integer list as a string. | |
| static BString | GetStringListSeperator () |
| Gets the seperator used when returning a string list as a single string. | |
| static BString | GetTrueStringValue () |
| Gets the string value used for true when converting from a boolean. | |
| static void | SetDoubleListSeperator (const BString &seperator) |
| Sets the seperator used when returning a double list as a string. | |
| static void | SetFalseStringValue (const BString &falseValue) |
| Sets the string value to use for false when converting from a boolean. | |
| static void | SetIntegerListSeperator (const BString &seperator) |
| Sets the seperator used when returning an integer list as a string. | |
| static void | SetStringListSeperator (const BString &seperator) |
| Sets the seperator used when returning a string list as a single string. | |
| static void | SetTrueStringValue (const BString &trueValue) |
| Sets the string value to use for true when converting from a boolean. | |
Classes | |
| union | ValueUnion |
| Union to hold scalar values. | |
| BVariant | ( | const char * | val, | |
| int | maxLength = 0 | |||
| ) | [inline] |
| BVariant | ( | const wchar_t * | val, | |
| int | maxLength = 0 | |||
| ) | [inline] |
| BVariant | ( | double | val | ) | [inline] |
| BVariant | ( | float | val | ) | [inline] |
| BVariant | ( | bool | val | ) | [inline] |
| BVariant | ( | Int64 | val | ) | [inline] |
| BVariant | ( | const int * | pVals, | |
| int | count | |||
| ) | [inline] |
Constructs a BVariant that holds a collection of integers.
| pVals | An array of values. | |
| count | The number of values in the array. |
| BVariant | ( | const Int32Vector & | val | ) | [inline] |
| BVariant | ( | const double * | pVals, | |
| int | count | |||
| ) | [inline] |
Constructs a BVariant that holds a collection of floating-point values.
| pVals | An array of values. | |
| count | The number of values in the array. |
| BVariant | ( | const DoubleVector & | val | ) | [inline] |
Constructs a BVariant that holds a collection of floating-point values.
| val | A collection of values. |
| BVariant | ( | char ** | pVals | ) | [inline] |
| BVariant | ( | const BStringVector & | val | ) | [inline] |
| virtual ~BVariant | ( | ) | [virtual] |
Destructor.
| void Clear | ( | void | ) |
Resets this BVariant to an uninitialized state.
| BVariant* Clone | ( | void | ) | const [inline] |
Creates a deep-copy of this object.
| 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.
| static BString GetDoubleListSeperator | ( | ) | [static] |
Gets the seperator used when returning a double list as a string.
When a double list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator returned by this method.
| static BString GetFalseStringValue | ( | ) | [static] |
Gets the string value to use for false when converting from a boolean.
When a boolean is converted into a string its value is false, this value will be returned.
| static BString GetIntegerListSeperator | ( | ) | [static] |
Gets the seperator used when returning an integer list as a string.
When an integer list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator returned by this method.
| static BString GetStringListSeperator | ( | ) | [static] |
Gets the seperator used when returning a string list as a single string.
When a string list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator returned by this method.
| static BString GetTrueStringValue | ( | ) | [static] |
Gets the string value used for true when converting from a boolean.
When a boolean is converted into a string and its value is true, this value will be returned.
| EVariantType GetType | ( | void | ) | const [inline] |
| bool GetValueAsBoolean | ( | bool | defVal = false |
) | const |
Returns the contents of this BVariant expressed as a boolean.
| defVal | The value that will be returned if this BVariant cannot be expressed as a boolean. |
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as a boolean. |
| double GetValueAsDouble | ( | double | defVal = 0.0 |
) | const |
Returns the contents of this BVariant expressed as a double.
| defVal | The value that will be returned if this BVariant cannot be expressed as a double. |
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as a double. |
| DoubleVector GetValueAsDoubleList | ( | ) | const |
Returns the contents of this BVariant formatted as a double list.
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as an double list. |
| float GetValueAsFloat | ( | float | defVal = 0.0 |
) | const |
Returns the contents of this BVariant expressed as a float.
| defVal | The value that will be returned if this BVariant cannot be expressed as a float. |
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as a float. |
Returns the contents of this BVariant expressed as an integer.
If this BVariant contains a floating-point value, then this will return the greatest integer that is less than the floating-point value.
| defVal | The value that will be returned if this BVariant cannot be expressed as an integer. |
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as an integer. |
| Int64 GetValueAsInteger64 | ( | Int64 | defVal = 0 |
) | const |
Returns the contents of this BVariant expressed as a 64-bit integer.
If this BVariant contains a floating-point value, then this will return the greatest integer that is less than the floating-point value.
| defVal | The value that will be returned if this BVariant cannot be expressed as an integer. |
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as a 64-bit integer. |
| Int32Vector GetValueAsIntegerList | ( | ) | const |
Returns the contents of this BVariant formatted as an integer list.
| BAttributeDataException | This exception will be thrown if the value of this BVariant cannot be expressed as an integer list. |
| BPoint GetValueAsPoint | ( | ) | const |
| BString GetValueAsString | ( | ) | const |
| BStringVector GetValueAsStringList | ( | ) | const |
| bool IsList | ( | void | ) | const [inline] |
| bool operator!= | ( | const BVariant & | rhs | ) | const [inline] |
| bool operator== | ( | const BVariant & | rhs | ) | const |
| static void SetDoubleListSeperator | ( | const BString & | seperator | ) | [static] |
Sets the seperator used when returning a double list as a string.
When a double list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator specified by this method.
| seperator | The seperator to use. |
| static void SetFalseStringValue | ( | const BString & | falseValue | ) | [static] |
Sets the string value to use for false when converting from a boolean.
When a boolean is converted into a string & is false, this value will be returned.
| falseValue | The string value for boolean false. |
| static void SetIntegerListSeperator | ( | const BString & | seperator | ) | [static] |
Sets the seperator used when returning an integer list as a string.
When an integer list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator specified by this method.
| seperator | The seperator to use to separate integers. |
| static void SetStringListSeperator | ( | const BString & | seperator | ) | [static] |
Sets the seperator used when returning a string list as a single string.
When a string list is retrieved as a string, it will concatonate all the values into a single string. When it concatonates, it will seperate the values using the seperator specified by this method.
| seperator | The seperator to use. |
| static void SetTrueStringValue | ( | const BString & | trueValue | ) | [static] |
Sets the string value to use for true when converting from a boolean.
When a boolean is converted into a string & is true, this value will be returned.
| trueValue | The string value for boolean true. |
| void SetType | ( | const EVariantType | type | ) | [inline] |
| void SetValue | ( | const BStringVector & | val | ) |
| void SetValue | ( | char ** | pVals | ) |
| void SetValue | ( | const DoubleVector & | val | ) |
| void SetValue | ( | const double * | pVals, | |
| int | count | |||
| ) |
Sets the value of this BVariant to a double list.
| pVals | A collection of data values. | |
| count | The number of values in the collection. |
| void SetValue | ( | const Int32Vector & | val | ) |
| void SetValue | ( | const Int32 * | pVals, | |
| int | count | |||
| ) |
Sets the value of this BVariant to an integer list.
| pVals | A collection of data values. | |
| count | The number of values in the collection. |
| void SetValue | ( | const BPoint & | val | ) |
| void SetValue | ( | const Int64 | val | ) |
| void SetValue | ( | const bool | val | ) |
| void SetValue | ( | const float | val | ) |
| void SetValue | ( | const double | val | ) |
| void SetValue | ( | const Int32 | val | ) |
| void SetValue | ( | const wchar_t * | val, | |
| size_t | maxLength = 0 | |||
| ) |
| void SetValue | ( | const char * | val, | |
| size_t | maxLength = 0 | |||
| ) |
| void SetValue | ( | const BString * | val, | |
| size_t | maxLength = 0 | |||
| ) | [inline] |
| void SetValue | ( | const BString & | val, | |
| size_t | maxLength = 0 | |||
| ) |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Implements BByteStreamable.