Page 13 out of 26 total pages


QbDatumClass


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);

This chapter describes the following methods:

QbDatumClass method

This is the constructor for the class. It sets size to zero and storageEnum type to leaveAlone.

Syntax

QbDatumClass( void )

Parameters

None

~QbDatumClass method

This is the destructor for the class.

Syntax

virtual ~QbDatumClass( void )

Parameters

None

Get method

This method retrieves the byte string and the size of an object. This method has three overloaded functions.

Syntax

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 )

Parameters

Input

Output

None

GetFormatInfo method

This method returns a string containing the format information that was set up by the SetFormatInfo method.

Syntax

virtual const char * GetFormatInfo( void )

Parameters

Input

None

Output

A pointer to a constant char that describes the format information.

Itype method

This method returns the interface type defined in the base class.

Syntax

virtual const QbInterfaceType Itype( void )

Parameters

Input

None

Output

DatumInterfaceType of QbInterfaceType defined in the QbBaseClass. See page 49.

Set method

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.

Syntax

virtual void Set( const unsigned long nArg, unsigned char *pArg, const 
storageEnum storageType = leaveAlone )

Parameters

Input

Output

None

SetFormatInfo method

This method sets format information which can be used, for example, to describe the format of a byte string or feature type.

Syntax

virtual void SetFormatInfo( char *f, const storageEnum storageType = 
leaveAlone )

Parameters

Input

Output

None

Type method

This method returns a constant string of the class name.

Syntax

virtual const char * Type( void )

Parameters

Input

None

Output

A constant string, QbDatumClass




Page 13 out of 26 total pages


xzhu@almaden.ibm.com or tedl@almaden.ibm.com
Copyright © 1998, IBM Corporation. All rights reserved.