#include <BxDataObject.h>
Inheritance diagram for BxDataObject:

Public Member Functions | |
| BxDataObject () | |
| BxDataObject (const BxDataObject ©) | |
| virtual BxDataObject * | clone () const |
| virtual char * | varName () const |
| virtual void | setBinaryFilePtr (BxBinaryFile *fp) |
| virtual long | locate () const |
| bx_byte8 | getByte () |
| bx_ubyte8 | getUnsignedByte () |
| bx_char8 | getChar () |
| bx_short16 | getShort () |
| bx_int32 | getInt () |
| bx_long64 | getLong () |
| bx_float32 | getFloat () |
| bx_double64 | getDouble () |
| bx_ushort16 | getUnsignedShort () |
| bx_uint32 | getUnsignedInt () |
| bx_ulong64 | getUnsignedLong () |
| void | setVarName (char *vname) |
| void | setByte (bx_byte8 b) |
| void | setChar (bx_char8 c) |
| void | setShort (bx_short16 s) |
| void | setInt32 (bx_int32 i) |
| void | setLong64 (bx_long64 l) |
| void | setFloat (bx_float32 f) |
| void | setDouble (bx_double64 d) |
| void | setUnsignedByte (bx_ubyte8 ub) |
| void | setUnsignedShort (bx_ushort16 us) |
| void | setUnsignedInt32 (bx_uint32 ui) |
| void | setUnsignedLong64 (bx_ulong64 ul) |
|
|
Default constructor.
Constructs an instance of the class BxDataObject. The primary data value stored by this instance is not set by this constructor. The primary data value and the metadata describing properties of the data value, such as byte order and size, msut be set by the derived class, specific to the data type.
typeName_ = NULL;
varName_ = NULL;
testValue_ = NULL;
sizeInBytes_ = 0;
sizeInAll_ = 0;
blockSize_ = 0;
bfile_ = NULL;
byteOrder_ = BX_UNSPECIFIED;
offsetInFile_ = 0;
loaded_ = false;
|
|
|
Construct a BxDataObject instance by copying a specified BxDataObject instance. Constructs and initialises an instance of the class BxDataObject. This constructor should be overridden by each derived class.
|
|
|
Get the file pointer for the associated binary data file. This value is NULL if no file is associated with the object, or the file is not open.
|
|
|
Get the block alignment factor, specifying the required alignment for the primary data value in the binary data file.
|
|
|
Get the byte order identifier, indicating little endian or big endian byte order for data values in the associated binary data file.
|
|
|
Get the number of bytes used to store the primary data value of this object.
|
|
|
Create a duplicate instance of this BxDataObject instance.
Uses the constructor to create a instance having the same attribute values as the instance it was cloned from.
|
|
|
Get the class ID of the BinX primitive data type stored in this object.
|
|
|
Get the primary data value for this BxByte8 object.
If this object is a BxByte8 object and a primary data value has been assigned to this object, then return a single signed byte value of type bx_byte8. If no primary data value has been assigned to this object, then the derived class BxByte8 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a single byte value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxCharacter8 object.
If this object is a BxCharacter8 object and a primary data value has been assigned to this object, then return a character value of type bx_char8. If no primary data value has been assigned to this object, then the derived class BxCharacter8 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a single character value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value, which was read from a binary data file, or will be written to a binary data file.
|
|
|
Get the primary data value for this BxDouble64 object.
If this object is a BxDouble64 object and a primary data value has been assigned to this object, then return a double precision floating point number of type bx_double64. If no primary data value has been assigned to this object, then the derived class BxDouble64 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a double precision floating point number is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxFloat32 object.
If this object is a BxFloat32 object and a primary data value has been assigned to this object, then return a single precision floating point number of type bx_float32. If no primary data value has been assigned to this object, then the derived class BxFloat32 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a single precision floating point number is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxInteger32 object.
If this object is a BxInteger32 object and a primary data value has been assigned to this object, then return an integer value of type bx_int32. If no primary data value has been assigned to this object, then the derived class BxInteger32 is invoked to read a data value from the associated binary data file. If a value is successfully read, then an integer value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxLong64 object.
|
|
|
Get the primary data value for this BxShort16 object.
If this object is a BxShort16 object and a primary data value has been assigned to this object, then return a short integer value of type bx_short16. If no primary data value has been assigned to this object, then the derived class BxShort16 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a short integer value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxUnsignedByte8 object.
If this object is a BxUnsignedByte8 object and a primary data value has been assigned to this object, then return a single unsigned byte value of type bx_ubyte8. If no primary data value has been assigned to this object, then the derived class BxUnsignedByte8 is invoked to read a data value from the associated binary data file. If a value is successfully read, then a single byte value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxUnsignedInteger32 object.
If this object is a BxUnsignedInteger32 object and a primary data value has been assigned to this object, then return an unsigned integer value of type bx_uint32. If no primary data value has been assigned to this object, then the derived class BxUnsignedInteger32 is invoked to read a data value from the associated binary data file. If a value is successfully read, then an unsigned integer value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxUnsignedLong64 object.
If this object is a BxUnsignedLong64 object and a primary data value has been assigned to this object, then return an unsigned long integer value of type bx_ulong64. If no primary data value has been assigned to this object, then the derived class BxUnsignedLong64 is invoked to read a data value from the associated binary data file. If a value is successfully read, then an unsigned long integer value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get the primary data value for this BxUnsignedShort16 object.
If this object is a BxUnsignedShort16 object and a primary data value has been assigned to this object, then return an unsigned short integer value of type bx_ushort16. If no primary data value has been assigned to this object, then the derived class BxUnsignedShort16 is invoked to read a data value from the associated binary data file. If a value is successfully read, then an unsigned short integer value is returned. If a value can not be read from the associated binary data file, then the value zero is returned.
|
|
|
Get an indicator stating whether the primary data value for this object is currently set.
|
|
|
Position a binary file pointer to the first byte of a value for this data object. Due to the use of padding and headers in binary data files, it may be necessary to position a binary file pointer before reading or writing the data value for an object. Based on the object type, this method positions the file pointer in the associated binary file in preparation for reading or writing a value. This method returns the resulting file offset, expressed as a byte count relative to the beginning of the file.
|
|
|
Get the relative byte offset of the primary data value in the associated binary data file.
|
|
|
Associate a specified binary data file with this object.
The binary data file must be represented by an instance of class BxBinaryFile or one of its derived classes, BxBinaryFileReader and BxBinaryFileWriter. This means that the binary data file must be open for reading or writing.
Reimplemented in BxArrayVariable. |
|
|
Set the block alignment factor for the primary data value in the binary data file. Valid range is [0, 128].
|
|
|
Set the primary data value for this object to a specified byte value. This method should be applied only to an object of type BxByte8. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input byte value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the byte order identifier for the associated binary file. Valid values are: BX_BIG_ENDIAN, BX_LITTLE_ENDIAN, BX_UNSPECIFIED.
Reimplemented in BxArray. |
|
|
Set the primary data value for this object to a specified character value. This method should be applied only to an object of type BxCharacter8. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input character value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified double precision floating point number. This method should be applied only to an object of type BxDouble64. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input double precision floating point number. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified single precision floating point number. This method should be applied only to an object of type BxFloat32. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input single precision floating point number. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified integer value. This method should be applied only to an object of type BxInteger32. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified long integer value. This method should be applied only to an object of type BxLong64. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input long integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified short integer value. This method should be applied only to an object of type BxShort16. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input short integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified byte value. This method should be applied only to an object of type BxUnsignedByte8. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input byte value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified unsigned integer value. This method should be applied only to an object of type BxUnsignedInteger32. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input unsigned integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified unsigned long integer value. This method should be applied only to an object of type BxUnsignedLong64. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input unsigned long integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the primary data value for this object to a specified unsigned short integer value. This method should be applied only to an object of type BxUnsignedShort16. The method does not check the BinX data type of this object. The primary data value of this object is assigned the input unsigned short integer value. The load status of this object is also updated to indicate that a primary data value has been assigned to this object.
|
|
|
Set the BinX XML variable name value for this object to a specified string.
If the variable name has been previously set for this object, then the specified input value replaces the previously stored variable name value. Memory allocated for the old variable name value is released.
|
|
|
Get the number of bytes used to store the primary data value in the associated binary data file.
|
|
|
Get the user-defined type name for this object. Returns a value only for user-defined abstract types.
|
|
|
Get the value of the BinX XML variable name associated with this object.
The BinX XML schema defines an optional XML attribute called "varname". This attribute can be associated with several types of primitive and abstract data types. The BinX document file describing the binary data file that provides the primary data value for this object, also defines the value of the associated variable name.
|
1.3.3