#include <BAttribute.h>

A BAttribute consists of a name and a value.
Public Member Functions | |
| BAttribute (const BAttribute &attr) | |
| Copy constructor. | |
| BAttribute (const BString &name, const BVariant &val) | |
| Constructor that sets the name and value for this BAttribute. | |
| BAttribute () | |
| Default constructor. | |
| 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. | |
| const BString & | GetName (void) const |
| Gets the current name of this BAttribute. | |
| BVariant & | GetValue (void) |
| Gets the current value of this BAttribute. | |
| const BVariant & | GetValue (void) const |
| Gets the current value of this BAttribute. | |
| bool | operator!= (const BAttribute &rhs) const |
| Inequality operator. | |
| BAttribute & | operator= (const BAttribute &rhs) |
| Assignment operator. | |
| bool | operator== (const BAttribute &rhs) const |
| Equality operator. | |
| void | SetName (const BString &name) |
| Sets the name of this BAttribute. | |
| void | SetValue (const BVariant &val) |
| Sets the value of this BAttribute. | |
| virtual BByteArray | ToByteArray (void) const |
| Stores this object in a BByteArray. | |
| virtual | ~BAttribute () |
| Destructor. | |
| BAttribute | ( | ) | [inline] |
Default constructor.
Then name and value of this BAttribute will be blank.
| BAttribute | ( | const BString & | name, | |
| const BVariant & | val | |||
| ) | [inline] |
Constructor that sets the name and value for this BAttribute.
| name | The name for the BAttribute. | |
| val | The value for the BAttribute. |
| BAttribute | ( | const BAttribute & | attr | ) | [inline] |
| virtual ~BAttribute | ( | ) | [inline, virtual] |
Destructor.
| virtual size_t ComputeSize | ( | void | ) | const [inline, virtual] |
Computes the size of the BByteArray required to store this object.
Implements BByteStreamable.
| virtual void FromByteArray | ( | const BByteArray & | bytes, | |
| size_t & | startPos | |||
| ) | [inline, virtual] |
Initializes an instance of this object from a BByteArray.
| bytes | The BByteArray containing the byte representation for this 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.
| const BString& GetName | ( | void | ) | const [inline] |
| BVariant& GetValue | ( | void | ) | [inline] |
| const BVariant& GetValue | ( | void | ) | const [inline] |
| bool operator!= | ( | const BAttribute & | rhs | ) | const [inline] |
Inequality operator.
| rhs | The BAttribute to compare to this one. |
| BAttribute& operator= | ( | const BAttribute & | rhs | ) | [inline] |
Assignment operator.
| rhs | The BAttribute whose value will be copied into this one. |
| bool operator== | ( | const BAttribute & | rhs | ) | const [inline] |
Equality operator.
| rhs | The BAttribute to compare to this one. |
| void SetName | ( | const BString & | name | ) | [inline] |
| void SetValue | ( | const BVariant & | val | ) | [inline] |
| virtual BByteArray ToByteArray | ( | void | ) | const [inline, virtual] |
Stores this object in a BByteArray.
Implements BByteStreamable.