Main Page | Class Hierarchy | Compound List | File List | Compound Members

BxUnsignedLong64 Class Reference

Class implementing the BinX data type 64-bit unsigned integer. More...

#include <BxUnsignedLong64.h>

Inheritance diagram for BxUnsignedLong64:

BxInteger BxDataObject BxObject List of all members.

Public Member Functions

 BxUnsignedLong64 ()
 BxUnsignedLong64 (const BxUnsignedLong64 &)
 BxUnsignedLong64 (const bx_ulong64)
virtual bool equals (const BxDataObject &) const
virtual char * toString (bool xml)
virtual bool parseValue (const char *)
BxUnsignedLong64operator= (const bx_ulong64)

Detailed Description

Instances of this class hold and perform operations on the BinX XML Schema type <unsignedLong-64>. The class provides manipulations such as:
The BinX primitive data type 64-bit unsigned integer is treated in accordance with the XSD definition of this data type. Hence, an instance of this class must have a value from 0 to (2**64 - 1).
Since: BinX version 1.0.


Constructor & Destructor Documentation

BxUnsignedLong64::BxUnsignedLong64  ) 
 

Default constructor.

Constructs and initialises an instance of the class BxUnsignedLong64. Default attribute values are assigned as follows:

       sizeInBits_ = 64;
       sizeInBytes_ = 8; 
       sizeInAll_ = 8; 
       unsigned_ = true;
   

BxUnsignedLong64::BxUnsignedLong64 const BxUnsignedLong64 copy  ) 
 

Construct a BxUnsignedLong64 instance by copying a specified BxUnsignedLong64 instance.

Constructs and initialises an instance of the class BxUnsignedLong64.

Parameters:
copy A reference to the BxUnsignedLong64 instance to copy.

BxUnsignedLong64::BxUnsignedLong64 const bx_ulong64  ul  ) 
 

Construct a BxUnsignedLong64 instance and assign it a specified 64-bit signed integer value.

Constructs and initialises an instance of the class BxUnsignedLong64.

Parameters:
ul A 64-bit unsigned integer value to initialise the new BxUnsignedLong64 object.


Member Function Documentation

bool BxUnsignedLong64::equals const BxDataObject dataObj  )  const [virtual]
 

Compares the value of a specified data object with the value of this object.

In this method, two objects are considered to be equal if they are of the same BinX object type and if they store the same data value. Also, only primitive BinX data types implement this method.
Note: that byte order differences are not compensated for in this test. Hence, two unsigned 64-bit integers that are equal in value, but represented in different byte orders would be found to be unequal.

Parameters:
dataObj A reference to another data object to be compared with this object.
Returns:
true If the data type and value of the two objects are equal,
false If the objects differ in type or value.

Reimplemented from BxDataObject.

BxUnsignedLong64 & BxUnsignedLong64::operator= const bx_ulong64  ul  ) 
 

Overloaded operator = assigns a 64-bit unsigned integer from a specified source to a BxUnsignedLong64 destination object.

Parameters:
ul A 64-bit signed integer value to be assigned to a BxUnsignedLong64 object.
Returns:
A reference to this BxUnsignedLong64 object after the assignment has been performed.

bool BxUnsignedLong64::parseValue const char *  strVal  )  [virtual]
 

Extract a 64-bit unsigned integer value from a specified string and assign the value to this object.

The data contained in the input string is assumed to be in ASCII representation, and to contain an unsigned long integer represented in decimal or hexadecimal (i.e., base 10 or base 16). A hexademinal string must begin with the characters 0x. The input string must not contain commas, periods, or other symbols (such as a minus symbol). The input string must be null-terminated. All bytes of the input string are used in the conversion process. The input bytes are converted to integer representation, in conformance with the definiton of a BxUnsignedLong64 object value. The converted value is stored as the value of this object. Only primitive BinX data types implement this method.

Parameters:
strVal A pointer to an ASCII string containing an unsigned long integer value.
Returns:
true If value conversion was successful,
false If the input string is NULL.

Reimplemented from BxDataObject.

char * BxUnsignedLong64::toString bool  xml  )  [virtual]
 

Return a string containing the DataBinX XML element (or printable value only ) for the value of this BxUnsignedLong64 object.

The DataBinx representation of a BxUnsignedLong64 object value consists of:

  • The BinX XML tags, <undignedLong-64> and </unsignedLong-64>
  • The binary data value of this object, converted to a printable representation

Example Return Result:
       <unsignedLong-64>972972154154</unsignedLong-64>
   

This method allocates memory to hold the returned string. The caller is responsible for releasing the memory when the string is no longer needed.
If the BinX XML tags are not required, then the input boolean flag can be used to request that only the converted binary data value be included in the result string.
Only BinX primitive data types implement this method.
Parameters:
xml A boolean indicating whether to include BinX XML tags or not.
Returns:
A string buffer containing the DataBinX representation of the value of this object, if the input flag is true,
A string buffer containing the printable representation of the value of this object, if the input flag is false.

Reimplemented from BxDataObject.


The documentation for this class was generated from the following files:
Generated on Fri May 6 13:36:20 2005 for edikt::BinX by doxygen 1.3.3