Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GVariant Class Reference

A class that can be different types. More...

#include <GVariant.h>

Inheritance diagram for GVariant:

MMetaData List of all members.

Public Member Functions

 GVariant ()
 Constructor to null.
 GVariant (int i)
 Constructor for int.
 GVariant (int64 i)
 Constructor for int.
 GVariant (double i)
 Constructor for double.
 GVariant (char *s)
 Constructor for string.
 GVariant (void *p)
 Constructor for ptr.
 GVariant (GDom *p)
 Constructor for DOM ptr.
 GVariant (GDateTime *d)
 Constructor for date.
GVariantoperator= (int i)
 Assign int value.
GVariantoperator= (bool i)
 Assign bool value.
GVariantoperator= (int64 i)
 Assign int value.
GVariantoperator= (double i)
 Assign double value.
GVariantoperator= (char *s)
 Assign string value (makes a copy).
GVariantoperator= (GVariant &i)
 Assign another variant value.
GVariantoperator= (void *p)
 Assign value to a void ptr.
GVariantoperator= (GDom *p)
 Assign value to DOM ptr.
GVariantoperator= (GDateTime *d)
 Assign value to be a date/time.
bool SetBinary (int Len, void *Data)
 Sets the value to block of binary data.
bool SetList (List< GVariant > *Lst=0)
 Sets the value to a list of variants.
char * Str ()
 Returns the string if valid.
void Empty ()
 Sets the variant to NULL.
int GetItems ()
 Get the items in the list or 0 if not a list.
bool IsInt ()
 True if currently a int.
bool IsBool ()
 True if currently a bool.
bool IsDouble ()
 True if currently a double.
bool IsString ()
 True if currently a string.
bool IsBinary ()
 True if currently a binary block.
bool IsNull ()
 True if currently null.
int32 CastInt32 ()
 Casts the value to int, from whatever source type.
char * CastString ()
 Cast to a string from whatever source type.

Public Attributes

GVariantType Type
 The type of the variant.
short Id
 The indentifier.
bool * Dirty
 A pointer to a bool to be set when the variant changes.
union {
   int   Int
 Valid when Type == GV_INT32.
   bool   Bool
 Valid when Type == GV_BOOL.
   int64   Int64
 Valid when Type == GV_INT64.
   double   Dbl
 Valid when Type == GV_DOUBLE.
   char *   String
 Valid when Type == GV_STRING.
   GDom *   Dom
 Valid when Type == GV_DOM.
   void *   Ptr
 Valid when Type == GV_VOID_PTR.
   struct _Binary {
   }   Binary
 Valid when Type == GV_BINARY.
   List< GVariant > *   Lst
 Valid when Type == GV_LIST.
   GDateTime *   Date
 Valid when Type == GV_DATETIME.
Value
 The value of the variant.

Detailed Description

A class that can be different types.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:47:04 2005 for Lgi by  doxygen 1.4.1