Main Page   Modules   Namespace List   Data Structures   File List   Data Fields   Examples  

Variant.h

00001 /*
00002  * libsgml -- SGML state machine parsing library.
00003  *                                                                  
00004  * Copyright (c) 2002 Uninformed Research (http://www.uninformed.org)
00005  * All rights reserved.
00006  *
00007  * skape
00008  * [email protected]
00009  */
00021 #ifndef _LIBSGML_VARIANT_H
00022 #define _LIBSGML_VARIANT_H
00023 
00027 enum VariantType {
00028 
00032         VARIANT_TYPE_UNKNOWN = 0,
00033 
00037         VARIANT_TYPE_STRING,
00043         VARIANT_TYPE_MULTI_STRING,
00044 
00048         VARIANT_TYPE_SIGNED_INTEGER,
00052         VARIANT_TYPE_UNSIGNED_INTEGER,
00053 
00057         VARIANT_TYPE_SIGNED_SHORT,
00061         VARIANT_TYPE_UNSIGNED_SHORT,
00062 
00068         VARIANT_TYPE_FLOAT,
00074         VARIANT_TYPE_DOUBLE,
00075 
00079         VARIANT_TYPE_CHAR,
00080 
00089         VARIANT_TYPE_BINARY_B64
00090 
00091 };
00092 
00098 typedef struct _variant_value {
00099 
00103         float         flt;
00107         double        dbl;
00111         unsigned char *binary;
00112 
00116         unsigned long length;
00117 
00118 } VARIANT_VALUE;
00119 
00129 void variantSet(enum VariantType type, void *value, unsigned long valueSize, void *userParam, void (*setter)(void *userParam, const char *string));
00160 void *variantGet(enum VariantType type, const char *string);
00161 
00169 void variantFree(VARIANT_VALUE *value);
00170 
00175 #endif

Generated on Tue Mar 25 19:49:04 2003 for libsgml by doxygen1.3-rc3