BAttribute Class Reference

#include <BAttribute.h>

Inheritance diagram for BAttribute:

Inheritance graph
[legend]

List of all members.


Detailed Description

Provides a definition for an element of data that can be attached to a BFeature.

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 BStringGetName (void) const
 Gets the current name of this BAttribute.
BVariantGetValue (void)
 Gets the current value of this BAttribute.
const BVariantGetValue (void) const
 Gets the current value of this BAttribute.
bool operator!= (const BAttribute &rhs) const
 Inequality operator.
BAttributeoperator= (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.


Constructor & Destructor Documentation

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.

Parameters:
name The name for the BAttribute.
val The value for the BAttribute.

BAttribute ( const BAttribute attr  )  [inline]

Copy constructor.

Parameters:
attr The BAttribute to copy.

virtual ~BAttribute (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual size_t ComputeSize ( void   )  const [inline, virtual]

Computes the size of the BByteArray required to store this object.

Returns:
The size of the BByteArray.

Implements BByteStreamable.

virtual void FromByteArray ( const BByteArray bytes,
size_t &  startPos 
) [inline, virtual]

Initializes an instance of this object from a BByteArray.

Parameters:
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]

Gets the current name of this BAttribute.

Returns:
Then name of this BAttribute.

BVariant& GetValue ( void   )  [inline]

Gets the current value of this BAttribute.

Returns:
The value of this BAttribute.

const BVariant& GetValue ( void   )  const [inline]

Gets the current value of this BAttribute.

Returns:
The value of this BAttribute.

bool operator!= ( const BAttribute rhs  )  const [inline]

Inequality operator.

Parameters:
rhs The BAttribute to compare to this one.
Returns:
True if the two BAttribute objects do not have the same value and false otherwise.

BAttribute& operator= ( const BAttribute rhs  )  [inline]

Assignment operator.

Parameters:
rhs The BAttribute whose value will be copied into this one.
Returns:
A reference to this BAttribute object.

bool operator== ( const BAttribute rhs  )  const [inline]

Equality operator.

Parameters:
rhs The BAttribute to compare to this one.
Returns:
True if the two BAttribute objects have the same value and false otherwise.

void SetName ( const BString name  )  [inline]

Sets the name of this BAttribute.

Parameters:
name The new name for this BAttribute.

void SetValue ( const BVariant val  )  [inline]

Sets the value of this BAttribute.

Parameters:
val The new value for this BAttribute.

virtual BByteArray ToByteArray ( void   )  const [inline, virtual]

Stores this object in a BByteArray.

Returns:
A BByteArray that stores the contents of this object.

Implements BByteStreamable.


The documentation for this class was generated from the following file:

GeoTranslate 5.0 From Blue Marble Geographics