#include <BAttributes.h>

Public Member Functions | |
| void | Add (const BAttribute &attr) |
| Adds a BAttribute to this BAttributes. | |
| void | Add (const BString &name, const BVariant &val) |
| Adds a BAttribute to this BAttributes. | |
| BAttributes (const BAttributes &attrs) | |
| Copy constructor. | |
| BAttributes () | |
| Default constructor, which creates an empty collection. | |
| void | Clear (void) |
| Removes all BAttribute objects from this BAttributes. | |
| 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 BVariant & | Get (const BString &name) const |
| Gets the value of the BAttribute with the specified name in this BAttributes. | |
| BVariant & | Get (const BString &name) |
| Gets the value of the BAttribute with the specified name in this BAttributes. | |
| BAttribute & | GetAt (size_t index) |
| Gets the BAttribute at the specified index in this BAttributes. | |
| const BAttribute & | GetAt (size_t index) const |
| Gets the BAttribute at the specified index in this BAttributes. | |
| size_t | GetCount (void) const |
| Gets the number of BAttribute objects in this BAttributes. | |
| BString | GetNameAt (size_t index) const |
| Gets the name of the BAttribute at the specified index in this BAttributes. | |
| BVariant & | GetValueAt (size_t index) |
| Gets the value of the BAttribute at the specified index in this BAttributes. | |
| const BVariant & | GetValueAt (size_t index) const |
| Gets the value of the BAttribute at the specified index in this BAttributes. | |
| bool | HasAttribute (const BAttribute &attr) const |
| Indicates whether or not this BAttributes contains the specified BAttribute. | |
| bool | HasAttribute (const BString &name, const BVariant &val) const |
| Indicates whether or not this BAttributes contains a BAttribute with the specified name and the specified value. | |
| bool | HasAttribute (const BString &name) const |
| Indicates whether or not this BAttributes contains a BAttribute with the specified name. | |
| BAttributes & | operator= (const BAttributes &rhs) |
| Assignment operator. | |
| void | Remove (size_t index) |
| Remove a BAttribute from this collection. | |
| void | Remove (const BString &name) |
| Remove a BAttribute from this collection. | |
| void | Reserve (size_t size) |
| Reserves space in the collection for the specified number of objects. | |
| void | SetReadCache (bool val) |
| virtual BByteArray | ToByteArray (void) const |
| Stores this object in a BByteArray. | |
| virtual | ~BAttributes () |
| Destructor. | |
| BAttributes | ( | ) | [inline] |
Default constructor, which creates an empty collection.
| BAttributes | ( | const BAttributes & | attrs | ) |
| virtual ~BAttributes | ( | ) | [inline, virtual] |
Destructor.
| void Add | ( | const BAttribute & | attr | ) |
Adds a BAttribute to this BAttributes.
A new BAttribute will be constructed with the specified name and value.
| name | The name of the BAttribute. | |
| val | The value of the BAttribute. |
| void Clear | ( | void | ) | [inline] |
Removes all BAttribute objects from this BAttributes.
| 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 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.
Gets the value of the BAttribute with the specified name in this BAttributes.
| name | The name of the desired BAttribute value. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute with the specified name in this BAttributes. |
Gets the value of the BAttribute with the specified name in this BAttributes.
| name | The name of the desired BAttribute value. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute with the specified name in this BAttributes. |
| BAttribute& GetAt | ( | size_t | index | ) |
Gets the BAttribute at the specified index in this BAttributes.
| index | The zero-based index of the desired BAttribute. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute at the specified index in this BAttributes. |
| const BAttribute& GetAt | ( | size_t | index | ) | const |
Gets the BAttribute at the specified index in this BAttributes.
| index | The zero-based index of the desired BAttribute. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute at the specified index in this BAttributes. |
| size_t GetCount | ( | void | ) | const [inline] |
Gets the number of BAttribute objects in this BAttributes.
| BString GetNameAt | ( | size_t | index | ) | const |
Gets the name of the BAttribute at the specified index in this BAttributes.
| index | The zero-based index of the desired BAttribute name. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute at the specified index in this BAttributes. |
| BVariant& GetValueAt | ( | size_t | index | ) | [inline] |
Gets the value of the BAttribute at the specified index in this BAttributes.
| index | The zero-based index of the desired BAttribute value. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute at the specified index in this BAttributes. |
| const BVariant& GetValueAt | ( | size_t | index | ) | const [inline] |
Gets the value of the BAttribute at the specified index in this BAttributes.
| index | The zero-based index of the desired BAttribute value. |
| BAttributeDataException | This exception will be thrown if there does not exist a BAttribute at the specified index in this BAttributes. |
| bool HasAttribute | ( | const BAttribute & | attr | ) | const |
Indicates whether or not this BAttributes contains the specified BAttribute.
| attr | The BAttribute to check for containment. |
Indicates whether or not this BAttributes contains a BAttribute with the specified name and the specified value.
| name | The name to check for containment. | |
| val | The value to check for containment. |
| bool HasAttribute | ( | const BString & | name | ) | const |
Indicates whether or not this BAttributes contains a BAttribute with the specified name.
| name | The name to check for containment. |
| BAttributes& operator= | ( | const BAttributes & | rhs | ) | [inline] |
Assignment operator.
| rhs | The BAttributes whose value will be copied into this one. |
| void Remove | ( | size_t | index | ) |
Remove a BAttribute from this collection.
If there does not exist a BAttribute at the specified index in this BAttributes, an exception will be thrown.
| index | The zero-based index of BAttribute to be removed. |
| BAttributeDataException | This exception will be thrown if the specified index does not correspond to an element in this BAttributes collection. |
| void Remove | ( | const BString & | name | ) |
Remove a BAttribute from this collection.
If there does not exist a BAttribute in this BAttributes with the specified name, then this BAttributes will not be changed.
| name | The name of the BAttribute to be removed. |
| void Reserve | ( | size_t | size | ) | [inline] |
Reserves space in the collection for the specified number of objects.
| size | The number of objects to reserve space for. |
| void SetReadCache | ( | bool | val | ) | [inline] |
| virtual BByteArray ToByteArray | ( | void | ) | const [virtual] |
Stores this object in a BByteArray.
Implements BByteStreamable.