QbDatumClass is derived from the QbBaseClass and contains a pointer to a byte string, the length of the byte string, and a character description of the format. The Get and Set methods allow you to get and set the pointer and size variables. The GetFormatInfo and SetFormatInfo methods allow you to access format information.
This class supports marking of allocated memory so it can be deleted, freed, or left alone in the destructor, or reassigned using Set. It also has an assignment operator.
QbDatumClass derives from QbBaseClass and stores key-value pairs.
This method contains the following protected member variables:
QbDatumClass &operator = (const QbDatumClass &in);
You can see coding examples in Appendix C, "Sample Code" on page 185. Other programs are located in the qbic/QbicApi directory.
This is the constructor for the class. It sets size to zero and storageEnum type to leaveAlone.
QbDatumClass( void )
This is the destructor for the class.
virtual ~QbDatumClass( void )
This method retrieves the byte string and the size of an object. This method has three overloaded functions.
virtual void Get( unsigned long &n, unsigned char *&p ) virtual void Get( unsigned long &n, char *&p ) virtual void Get( unsigned long &n, void *&p )
This method returns a string containing the format information that was set up by the SetFormatInfo method.
virtual const char * GetFormatInfo( void )
A pointer to a constant char that describes the format information.
This method returns the interface type defined in the base class.
virtual const QbInterfaceType Itype( void )
DatumInterfaceType of QbInterfaceType defined in the QbBaseClass. See page 49.
This method cleans up any data already in the object, then reinitializes the object based on the input values. This method deletes storage that is pointed to by the variable pArg if its storageType enum is not leaveAlone.
virtual void Set( const unsigned long nArg, unsigned char *pArg, const storageEnum storageType = leaveAlone )
This method sets format information which can be used, for example, to describe the format of a byte string or feature type.
virtual void SetFormatInfo( char *f, const storageEnum storageType = leaveAlone )
This method returns a constant string of the class name.
virtual const char * Type( void )
A constant string, QbDatumClass