Header Header

gxVariant Class Reference

List of all members.


Detailed Description

Class for the VARIANT functions.


Public Member Functions

 gxVariant (gxVARIANT source)
 Copy constructor from variant structure.
 gxVariant ()
 Constructor.
 gxVariant (gxVariant &source)
 Copy constructor.
 ~gxVariant () throw (gxError)
 Destructor.
void Dispose (void)
 It disposes the class.
bool Ref (void) throw (gxError)
 References the variant.
bool Unref (void) throw (gxError)
 Unreferences the variant.
gxVariant & operator= (gxVariant source) throw (gxError)
 Copy operator.
bool Create (int id, int type, int size, int nitems, const void *data) throw (gxError)
 Creates a new variant structure.
bool CreateEmpty (int id, int type) throw (gxError)
 Creates an empty variant structure.
bool Create (int id, const void *data, int size) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxi8 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxi16 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxi32 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxi64 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxu8 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxu16 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxu32 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxu64 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxf32 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, gxf64 data) throw (gxError)
 Creates a new variant structure.
bool Create (int id, const char *ascii) throw (gxError)
 Creates a new variant structure (ASCII version).
bool Create (int id, const wchar_t *unicode) throw (gxError)
 Creates a new variant structure (Unicode version).
bool Create (int id, gxInAStr ascii) throw (gxError)
 Creates a new variant structure (ASCII version).
bool Create (int id, gxInStr unicode) throw (gxError)
 Creates a new variant structure (Unicode version).
bool Create (int id, gxPG4 frame) throw (gxError)
 Creates a new variant structure.
bool CreateArray (int id, const gxi8 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxi16 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxi32 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxi64 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxu8 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxu16 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxu32 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxu64 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxf32 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateArray (int id, const gxf64 *array, int nitems) throw (gxError)
 Creates a new variant array structure.
bool CreateEmptyList (int id) throw (gxError)
 Creates an empty variant list structure.
bool Create (gxVARIANT source) throw (gxError)
 Creates a new variant structure from an existing variant.
bool Create (gxVariant &source) throw (gxError)
 Creates a new variant structure from an existing variant.
int GetID (void) throw (gxError)
 Returns the variant's id.
int GetType (void) throw (gxError)
 Returns the variant's type.
int GetSize (void) throw (gxError)
 Returns the variant's size.
int GetNItems (void) throw (gxError)
 Returns the variant's number of items.
int GetNChildren (void) throw (gxError)
 Returns the variant's number of children.
int GetInt (void) throw (gxError)
 Returns the variant's data as an integer number.
unsigned int GetUInt (void) throw (gxError)
 Returns the variant's data as an unsigned integer number.
gxu64 GetULInt (void) throw (gxError)
 Returns the variant's data as an unsigned integer number.
double GetFloat (void) throw (gxError)
 Returns the variant's data as a float number.
int GetASCII (char *target, int tgtlen) throw (gxError)
 Gets the variant's data as a string (ASCII version).
int GetUnicode (wchar_t *target, int tgtlen) throw (gxError)
 Gets the variant's data as a string (Unicode version).
gxOutStr GetUnicode (int tgtlen) throw (gxError)
 Returns the variant's data as a string (Unicode version).
gxOutAStr GetASCII (int tgtlen) throw (gxError)
 Returns the variant's data as a string (ASCII version).
int Convert (int type, int *size, int *nitems, void *target, int tgtlen) throw (gxError)
 Returns the variant's data converted to the specified type.
bool GetItem (gxVariant &target, int flags, int id, int ix) throw (gxError)
 Returns the requested item from the variant list.
bool CutItem (gxVariant &target, int flags, int id, int ix) throw (gxError)
 Cuts and returns the requested item from the variant list.
int FindItem (gxVariant &item)
 Searches for a variant in the items list.
bool AddItem (int flags, int id, int ix, gxVariant &item)
 Adds a new item to the items list.
bool RemoveItem (int flags, int id, int ix) throw (gxError)
 Unreferences and deletes the item from the items list.
bool GetChild (gxVariant &target, int flags, int id, int ix) throw (gxError)
 Returns a child from the children list.
bool CutChild (gxVariant &target, int flags, int id, int ix) throw (gxError)
 Cuts a child from the children list.
int FindChild (gxVariant &item)
 Searches for a child in the children list.
bool AddChild (int flags, int id, int ix, gxVariant &item)
 Adds a child to the children list.
bool RemoveChild (int flags, int id, int ix) throw (gxError)
 Removes a child from the children list.
bool CreateList (int id,...) throw (gxError)
 Creates a list type variant.
 operator gxVARIANT & () throw (gxError)
 Reference operator.
bool GetIntValue (int ix, int nitems, int *target) throw (gxError)
 Returns the requested variant value from the array.
bool GetUIntValue (int ix, int nitems, unsigned int *target) throw (gxError)
 Returns the requested variant value from the array.
bool GetFloatValue (int ix, int nitems, double *target) throw (gxError)
 Returns the requested variant value from the array.
bool CutIntValue (int ix, int nitems, int *target) throw (gxError)
 Returns and removes the requested variant value from the array.
bool CutUIntValue (int ix, int nitems, unsigned int *target) throw (gxError)
 Returns and removes the requested variant value from the array.
bool CutFloatValue (int ix, int nitems, double *target) throw (gxError)
 Returns and removes the requested variant value from the array.
bool AddIntValue (int ix, int nitems, const int *data) throw (gxError)
 Inserts one or more values into the array.
bool AddUIntValue (int ix, int nitems, const unsigned int *data) throw (gxError)
 Inserts one or more values into the array.
bool AddFloatValue (int ix, int nitems, const double *data) throw (gxError)
 Inserts one or more values into the array.
bool RemoveValue (int ix, int nitems) throw (gxError)
 Removes one or more values from the array.
gxPG4 GetGxPG4 () throw (gxError)
 Returns the variant value as a gxPG4 structure.
bool GetItemByPath (gxVariant &target, const wchar_t *path) throw (gxError)
 Returns a variant from a tree.
bool GetItemByPath (gxVariant &target, const char *path) throw (gxError)
 Returns a variant from a tree.
bool GetItemByPath (gxVariant &target, gxInStr path) throw (gxError)
 Returns a variant from a tree.
bool GetItemByPath (gxVariant &target, gxInAStr path) throw (gxError)
 Returns a variant from a tree.


Constructor & Destructor Documentation

gxVariant ( gxVARIANT  source  )  [inline, explicit]

Copy constructor from variant structure.

Parameters:
source Source variant.

References gx_refvariant().

gxVariant (  )  [inline]

Constructor.

gxVariant ( gxVariant &  source  )  [inline]

Copy constructor.

Parameters:
source Source variant.

References gx_refvariant().

~gxVariant (  )  throw (gxError) [inline]

Destructor.


Member Function Documentation

void Dispose ( void   )  [inline]

It disposes the class.

no base class.

bool Ref ( void   )  throw (gxError) [inline]

References the variant.

Returns:
On error false is returned or an exception is thrown.

References gx_refvariant().

bool Unref ( void   )  throw (gxError) [inline]

Unreferences the variant.

Returns:
On error false is returned or an exception is thrown.

References gx_unrefvariant().

gxVariant& operator= ( gxVariant  source  )  throw (gxError) [inline]

Copy operator.

Parameters:
source Source variant to copy from.
Returns:
Returns a reference to the variant class.

References gx_poperror(), gx_pusherror(), gx_refvariant(), and gx_unrefvariant().

bool Create ( int  id,
int  type,
int  size,
int  nitems,
const void *  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
type Type of the new variant.
size Size of the new variant.
nitems Number of items in the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool CreateEmpty ( int  id,
int  type 
) throw (gxError) [inline]

Creates an empty variant structure.

Parameters:
id Id of the new variant.
type Type of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool Create ( int  id,
const void *  data,
int  size 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
size Size of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_BINARY.

bool Create ( int  id,
gxi8  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INT.

bool Create ( int  id,
gxi16  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INT.

bool Create ( int  id,
gxi32  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INT.

bool Create ( int  id,
gxi64  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INT.

bool Create ( int  id,
gxu8  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UINT.

bool Create ( int  id,
gxu16  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UINT.

bool Create ( int  id,
gxu32  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UINT.

bool Create ( int  id,
gxu64  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UINT.

bool Create ( int  id,
gxf32  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_FLOAT.

bool Create ( int  id,
gxf64  data 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
data Binary data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_FLOAT.

bool Create ( int  id,
const char *  ascii 
) throw (gxError) [inline]

Creates a new variant structure (ASCII version).

Parameters:
id Id of the new variant.
ascii String data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_ASCII.

bool Create ( int  id,
const wchar_t *  unicode 
) throw (gxError) [inline]

Creates a new variant structure (Unicode version).

Parameters:
id Id of the new variant.
unicode String data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UNICODE.

bool Create ( int  id,
gxInAStr  ascii 
) throw (gxError) [inline]

Creates a new variant structure (ASCII version).

Parameters:
id Id of the new variant.
ascii String data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_ASCII.

bool Create ( int  id,
gxInStr  unicode 
) throw (gxError) [inline]

Creates a new variant structure (Unicode version).

Parameters:
id Id of the new variant.
unicode String data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_UNICODE.

bool Create ( int  id,
gxPG4  frame 
) throw (gxError) [inline]

Creates a new variant structure.

Parameters:
id Id of the new variant.
frame Frame data of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INTARRAY.

bool CreateArray ( int  id,
const gxi8 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INTARRAY.

bool CreateArray ( int  id,
const gxi16 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INTARRAY.

bool CreateArray ( int  id,
const gxi32 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INTARRAY.

bool CreateArray ( int  id,
const gxi64 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_INTARRAY.

bool CreateArray ( int  id,
const gxu8 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool CreateArray ( int  id,
const gxu16 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool CreateArray ( int  id,
const gxu32 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool CreateArray ( int  id,
const gxu64 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant().

bool CreateArray ( int  id,
const gxf32 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_FLOATARRAY.

bool CreateArray ( int  id,
const gxf64 *  array,
int  nitems 
) throw (gxError) [inline]

Creates a new variant array structure.

Parameters:
id Id of the new variant array.
array Binary data of the new variant array.
nitems Number of items in the new variant array.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_FLOATARRAY.

bool CreateEmptyList ( int  id  )  throw (gxError) [inline]

Creates an empty variant list structure.

Parameters:
id Id of the new variant list.
Returns:
On error false is returned or an exception is thrown.

References gx_createvariant(), and GX_VARIANT_LIST.

bool Create ( gxVARIANT  source  )  throw (gxError) [inline]

Creates a new variant structure from an existing variant.

Parameters:
source Source variant structure to duplicate.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant().

bool Create ( gxVariant &  source  )  throw (gxError) [inline]

Creates a new variant structure from an existing variant.

Parameters:
source Source variant structure to duplicate.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant().

int GetID ( void   )  throw (gxError) [inline]

Returns the variant's id.

References gx_getvariant().

int GetType ( void   )  throw (gxError) [inline]

Returns the variant's type.

References gx_getvariant().

int GetSize ( void   )  throw (gxError) [inline]

Returns the variant's size.

References gx_getvariant().

int GetNItems ( void   )  throw (gxError) [inline]

Returns the variant's number of items.

References gx_getvariant().

int GetNChildren ( void   )  throw (gxError) [inline]

Returns the variant's number of children.

References gx_getvariant().

int GetInt ( void   )  throw (gxError) [inline]

Returns the variant's data as an integer number.

References gx_convertvariant(), and GX_VARIANT_INT.

unsigned int GetUInt ( void   )  throw (gxError) [inline]

Returns the variant's data as an unsigned integer number.

References gx_convertvariant(), and GX_VARIANT_UINT.

gxu64 GetULInt ( void   )  throw (gxError) [inline]

Returns the variant's data as an unsigned integer number.

References gx_convertvariant(), and GX_VARIANT_UINT.

double GetFloat ( void   )  throw (gxError) [inline]

Returns the variant's data as a float number.

References gx_convertvariant(), and GX_VARIANT_FLOAT.

int GetASCII ( char *  target,
int  tgtlen 
) throw (gxError) [inline]

Gets the variant's data as a string (ASCII version).

Parameters:
target Preallocated buffer for the result.
tgtlen Size of the preallocated buffer.
Returns:
Returns the number of characters in the string.

References gx_convertvariant(), and GX_VARIANT_ASCII.

int GetUnicode ( wchar_t *  target,
int  tgtlen 
) throw (gxError) [inline]

Gets the variant's data as a string (Unicode version).

Parameters:
target Preallocated buffer for the result.
tgtlen Size of the preallocated buffer.
Returns:
Returns the number of characters in the string.

References gx_convertvariant(), and GX_VARIANT_UNICODE.

gxOutStr GetUnicode ( int  tgtlen  )  throw (gxError) [inline]

Returns the variant's data as a string (Unicode version).

Parameters:
tgtlen Maximum number of characters to return.
Returns:
The variant's data as a string.

References gx_convertvariant(), gx_globalalloc(), gx_globalfree(), and GX_VARIANT_UNICODE.

gxOutAStr GetASCII ( int  tgtlen  )  throw (gxError) [inline]

Returns the variant's data as a string (ASCII version).

Parameters:
tgtlen Maximum number of characters to return.
Returns:
The variant's data as a string.

References gx_convertvariant(), gx_globalalloc(), gx_globalfree(), and GX_VARIANT_ASCII.

int Convert ( int  type,
int *  size,
int *  nitems,
void *  target,
int  tgtlen 
) throw (gxError) [inline]

Returns the variant's data converted to the specified type.

Parameters:
type Type to convert to.
size Buffer for the size
nitems Buffer for the number of items.
target Preallocated buffer for the resulted data.
tgtlen Size of the preallocated buffer.
Returns:
Returns the number of items of the variant.

References gx_convertvariant().

bool GetItem ( gxVariant &  target,
int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Returns the requested item from the variant list.

Note:
Depending on the flags the index specifies the index of the requested item itself or the starting index for searching for the item with the specified id.
Parameters:
target Buffer for the result.
flags Indexing flag ( see GX_VARIANT_FLAGS )
id Id of the requested item.
ix Index of the requested item.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantitem().

bool CutItem ( gxVariant &  target,
int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Cuts and returns the requested item from the variant list.

Note:
Depending on the flags the index specifies the index of the requested item itself or the starting index for searching for the item with the specified id.
Parameters:
target Buffer for the result.
flags Indexing flag ( see GX_VARIANT_FLAGS )
id The id of the requested to remove.
ix Thi index of the requested item in the variable list.
Returns:
On error false is returned or an exception is thrown.

References gx_cutvariantitem(), and gx_duplicatevariant().

int FindItem ( gxVariant &  item  )  [inline]

Searches for a variant in the items list.

Parameters:
item Variant item to search for.
Returns:
The index of the item or -1 if not found.

References gx_findvariantitem().

bool AddItem ( int  flags,
int  id,
int  ix,
gxVariant &  item 
) [inline]

Adds a new item to the items list.

Parameters:
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the item located on the position where to insert or append the new item.
ix The index of the position where to insert or append the new item.
item The new item to add to the list.
Returns:
On error false is returned or an exception is thrown.

References gx_addvariantitem().

bool RemoveItem ( int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Unreferences and deletes the item from the items list.

Parameters:
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the item to remove.
ix The index of the item to remove.
Returns:
On error false is returned or an exception is thrown.

References gx_removevariantitem().

bool GetChild ( gxVariant &  target,
int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Returns a child from the children list.

Parameters:
target Preinitialized variant structure to return the result.
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the child.
ix The index of the child.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantchild().

bool CutChild ( gxVariant &  target,
int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Cuts a child from the children list.

Parameters:
target Preinitialized variant structure to return the result.
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the child.
ix The index of the child.
Returns:
On error false is returned or an exception is thrown.

References gx_cutvariantchild(), and gx_duplicatevariant().

int FindChild ( gxVariant &  item  )  [inline]

Searches for a child in the children list.

Parameters:
item The child to search for.
Returns:
The index of the child in the children list or -1 if not found.

References gx_findvariantchild().

bool AddChild ( int  flags,
int  id,
int  ix,
gxVariant &  item 
) [inline]

Adds a child to the children list.

Parameters:
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the item located on the position where to insert or append the new child.
ix The index of the position where to insert or append the new child.
item The new child to add to the children's list.
Returns:
On error false is returned or an exception is thrown.

References gx_addvariantchild().

bool RemoveChild ( int  flags,
int  id,
int  ix 
) throw (gxError) [inline]

Removes a child from the children list.

Parameters:
flags Indexing flag ( see GX_VARIANT_FLAGS ).
id The id of the child.
ix The index of the position where the child is.
Returns:
On error false is returned or an exception is thrown.

References gx_removevariantitem().

bool CreateList ( int  id,
  ... 
) throw (gxError) [inline]

Creates a list type variant.

Note:
Usage: CreateList(id, [ itype, iid, isize, initems, idata ], -1)
Parameters:
id The id of the new variant.
Returns:
On error false is returned or an exception is thrown.

References gx_addvariantitem(), gx_createvariant(), GX_VARIANT_LAST, and GX_VARIANT_LIST.

operator gxVARIANT & (  )  throw (gxError) [inline]

Reference operator.

bool GetIntValue ( int  ix,
int  nitems,
int *  target 
) throw (gxError) [inline]

Returns the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_getvariantvalue(), and GX_VARIANT_INT.

bool GetUIntValue ( int  ix,
int  nitems,
unsigned int *  target 
) throw (gxError) [inline]

Returns the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_getvariantvalue(), and GX_VARIANT_UINT.

bool GetFloatValue ( int  ix,
int  nitems,
double *  target 
) throw (gxError) [inline]

Returns the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_getvariantvalue(), and GX_VARIANT_FLOAT.

bool CutIntValue ( int  ix,
int  nitems,
int *  target 
) throw (gxError) [inline]

Returns and removes the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_cutvariantvalue(), and GX_VARIANT_INT.

bool CutUIntValue ( int  ix,
int  nitems,
unsigned int *  target 
) throw (gxError) [inline]

Returns and removes the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_cutvariantvalue(), and GX_VARIANT_UINT.

bool CutFloatValue ( int  ix,
int  nitems,
double *  target 
) throw (gxError) [inline]

Returns and removes the requested variant value from the array.

Parameters:
ix Index of the first value.
nitems Number of values.
target Preallocated buffer for the result.

References gx_cutvariantvalue(), and GX_VARIANT_FLOAT.

bool AddIntValue ( int  ix,
int  nitems,
const int *  data 
) throw (gxError) [inline]

Inserts one or more values into the array.

Parameters:
ix Index of the first value.
nitems Number of values.
data Pointer to the source data.

References gx_addvariantvalue(), and GX_VARIANT_INT.

bool AddUIntValue ( int  ix,
int  nitems,
const unsigned int *  data 
) throw (gxError) [inline]

Inserts one or more values into the array.

Parameters:
ix Index of the first value.
nitems Number of values.
data Pointer to the source data.

References gx_addvariantvalue(), and GX_VARIANT_UINT.

bool AddFloatValue ( int  ix,
int  nitems,
const double *  data 
) throw (gxError) [inline]

Inserts one or more values into the array.

Parameters:
ix Index of the first value.
nitems Number of values.
data Pointer to the source data.

References gx_addvariantvalue(), and GX_VARIANT_FLOAT.

bool RemoveValue ( int  ix,
int  nitems 
) throw (gxError) [inline]

Removes one or more values from the array.

Parameters:
ix Index of the first value.
nitems Number of values.

References gx_removevariantvalue().

gxPG4 GetGxPG4 (  )  throw (gxError) [inline]

Returns the variant value as a gxPG4 structure.

References gx_convertvariant(), GX_VARIANT_INTARRAY, gxPG4::x1, gxPG4::x2, gxPG4::x3, gxPG4::x4, gxPG4::y1, gxPG4::y2, gxPG4::y3, and gxPG4::y4.

bool GetItemByPath ( gxVariant &  target,
const wchar_t *  path 
) throw (gxError) [inline]

Returns a variant from a tree.

The variant data type can constitute a tree structure: every item in the tree is also a variant, and in turn can have child items. The item in the tree can be obtained by the path string, which has the following format:

condition[=value][,condition[=value]][/condition[=value][,condition[=value]]]

  • 1. the / character separates the levels of items in the tree
  • 2. the , character separates the search conditions
  • 3. the = character means the equality condition
  • 4. the C character selects a child item
  • 5. the L character selects a list item
  • 6. the X character means the index of the item
  • 7. the D character means the id of the item
  • 8. the V character means the value of the item
for example:
 // get MRZ_NAME field from passport reader document object
 swprintf(path,L"C,D=%i/L,D=%i,V=%i",PRV_FIELDLIST,PRV_FIELD,PR_DF_MRZ_NAME);

Parameters:
target Buffer for the result.
path The path string.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantbypath().

bool GetItemByPath ( gxVariant &  target,
const char *  path 
) throw (gxError) [inline]

Returns a variant from a tree.

The variant data type can constitute a tree structure: every item in the tree is also a variant, and in turn can have child items. The item in the tree can be obtained by the path string, which has the following format:

condition[=value][,condition[=value]][/condition[=value][,condition[=value]]]

  • 1. the / character separates the levels of items in the tree
  • 2. the , character separates the search conditions
  • 3. the = character means the equality condition
  • 4. the C character selects a child item
  • 5. the L character selects a list item
  • 6. the X character means the index of the item
  • 7. the D character means the id of the item
  • 8. the V character means the value of the item
for example:
 // get MRZ_NAME field from passport reader document object
 sprintf(path,"C,D=%i/L,D=%i,V=%i",PRV_FIELDLIST,PRV_FIELD,PR_DF_MRZ_NAME);

Parameters:
target Buffer for the result.
path The path string.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantbypath().

bool GetItemByPath ( gxVariant &  target,
gxInStr  path 
) throw (gxError) [inline]

Returns a variant from a tree.

The variant data type can constitute a tree structure: every item in the tree is also a variant, and in turn can have child items. The item in the tree can be obtained by the path string, which has the following format:

condition[=value][,condition[=value]][/condition[=value][,condition[=value]]]

  • 1. the / character separates the levels of items in the tree
  • 2. the , character separates the search conditions
  • 3. the = character means the equality condition
  • 4. the C character selects a child item
  • 5. the L character selects a list item
  • 6. the X character means the index of the item
  • 7. the D character means the id of the item
  • 8. the V character means the value of the item
for example:
 // get MRZ_NAME field from passport reader document object
 path=String.Format("C,D=%i/L,D=%i,V=%i",PRV_FIELDLIST,PRV_FIELD,PR_DF_MRZ_NAME);

Parameters:
target Buffer for the result.
path The path string.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantbypath().

bool GetItemByPath ( gxVariant &  target,
gxInAStr  path 
) throw (gxError) [inline]

Returns a variant from a tree.

The variant data type can constitute a tree structure: every item in the tree is also a variant, and in turn can have child items. The item in the tree can be obtained by the path string, which has the following format:

condition[=value][,condition[=value]][/condition[=value][,condition[=value]]]

  • 1. the / character separates the levels of items in the tree
  • 2. the , character separates the search conditions
  • 3. the = character means the equality condition
  • 4. the C character selects a child item
  • 5. the L character selects a list item
  • 6. the X character means the index of the item
  • 7. the D character means the id of the item
  • 8. the V character means the value of the item
for example:
 // get MRZ_NAME field from passport reader document object
 path=String.Format("C,D=%i/L,D=%i,V=%i",PRV_FIELDLIST,PRV_FIELD,PR_DF_MRZ_NAME);

Parameters:
target Buffer for the result.
path The path string.
Returns:
On error false is returned or an exception is thrown.

References gx_duplicatevariant(), and gx_getvariantbypath().


Generated  for GX
(c) ARH Inc.