Basic Types and Enumerations

Name

Basic Types and Enumerations -- Description of basic types, classes and enumeration for "Core" modules.

Synopsis



enum        GdomeNodeType;
enum        GdomeExceptionCode;
enum        GdomeAccessType;
enum        GdomeLoadingCode;
enum        GdomeSavingCode;

typedef     GdomeBoolean;
typedef     GdomeDOMTimeStamp;
typedef     GdomeException;
struct      GdomeEntitiesTableEntry;

#define     GDOME_A                         (node)
#define     GDOME_C                         (node)
#define     GDOME_CD                        (node)
#define     GDOME_CDS                       (node)
#define     GDOME_DF                        (node)
#define     GDOME_DOC                       (node)
#define     GDOME_DT                        (node)
#define     GDOME_EL                        (node)
#define     GDOME_ENT                       (node)
#define     GDOME_ER                        (node)
#define     GDOME_N                         (node)
#define     GDOME_NOT                       (node)
#define     GDOME_PI                        (node)
#define     GDOME_T                         (node)
#define     GDOME_EVNTT                     (node)

#define     GDOME_EXCEPTION_TYPE            (exc)
#define     GDOME_EXCEPTION_CODE            (exc)
enum        GdomeExceptionMasks;
enum        GdomeExceptionType;

struct      GdomeDOMString;
GdomeDOMString* gdome_str_mkref             (const gchar *str);
GdomeDOMString* gdome_str_mkref_own         (gchar *str);
GdomeDOMString* gdome_str_mkref_dup         (const gchar *str);
void        gdome_str_ref                   (GdomeDOMString *self);
void        gdome_str_unref                 (GdomeDOMString *self);
GdomeBoolean gdome_str_equal                (GdomeDOMString *self,
                                             GdomeDOMString *str);
GdomeBoolean gdome_str_equalIgnoreCase      (GdomeDOMString *self,
                                             GdomeDOMString *str);
gchar       gdome_str_charAt                (GdomeDOMString *self,
                                             int index);
GdomeDOMString* gdome_str_concat            (GdomeDOMString *self,
                                             GdomeDOMString *str);
GdomeBoolean gdome_str_endsWith             (GdomeDOMString *self,
                                             GdomeDOMString *suffix);
GdomeBoolean gdome_str_isEmpty              (GdomeDOMString *self);
int         gdome_str_length                (GdomeDOMString *self);
GdomeBoolean gdome_str_startsWith           (GdomeDOMString *self,
                                             GdomeDOMString *prefix);

Description

Details

enum GdomeNodeType

typedef enum {
	GDOME_ELEMENT_NODE = 1,
	GDOME_ATTRIBUTE_NODE = 2,
	GDOME_TEXT_NODE = 3,
	GDOME_CDATA_SECTION_NODE = 4,
	GDOME_ENTITY_REFERENCE_NODE = 5,
	GDOME_ENTITY_NODE = 6,
	GDOME_PROCESSING_INSTRUCTION_NODE = 7,
	GDOME_COMMENT_NODE = 8,
	GDOME_DOCUMENT_NODE = 9,
	GDOME_DOCUMENT_TYPE_NODE = 10,
	GDOME_DOCUMENT_FRAGMENT_NODE = 11,
	GDOME_NOTATION_NODE = 12,
	GDOME_XPATH_NAMESPACE_NODE = 13
} GdomeNodeType;


enum GdomeExceptionCode

typedef enum {
  GDOME_NOEXCEPTION_ERR = 0,
	GDOME_INDEX_SIZE_ERR = 1,
	GDOME_DOMSTRING_SIZE_ERR = 2,
	GDOME_HIERARCHY_REQUEST_ERR = 3,
	GDOME_WRONG_DOCUMENT_ERR = 4,
	GDOME_INVALID_CHARACTER_ERR = 5,
	GDOME_NO_DATA_ALLOWED_ERR = 6,
	GDOME_NO_MODIFICATION_ALLOWED_ERR = 7,
	GDOME_NOT_FOUND_ERR = 8,
	GDOME_NOT_SUPPORTED_ERR = 9,
	GDOME_INUSE_ATTRIBUTE_ERR = 10,
	GDOME_INVALID_STATE_ERR = 11,
	GDOME_SYNTAX_ERR = 12,
	GDOME_INVALID_MODIFICATION_ERR = 13,
	GDOME_NAMESPACE_ERR = 14,
	GDOME_INVALID_ACCESS_ERR = 15,
	GDOME_NULL_POINTER_ERR = 100
} GdomeExceptionCode;


enum GdomeAccessType

typedef enum {
	GDOME_READONLY_NODE = 0,
	GDOME_READWRITE_NODE = 1
} GdomeAccessType;


enum GdomeLoadingCode

typedef enum {
	GDOME_LOAD_PARSING = 0,
	GDOME_LOAD_VALIDATING = 1,
	GDOME_LOAD_RECOVERING = 2,
	GDOME_LOAD_SUBSTITUTE_ENTITIES = 4,
	GDOME_LOAD_COMPLETE_ATTRS = 8
} GdomeLoadingCode;


enum GdomeSavingCode

typedef enum {
	GDOME_SAVE_STANDARD = 0,
	GDOME_SAVE_LIBXML_INDENT = 1
} GdomeSavingCode;


GdomeBoolean

typedef int GdomeBoolean;


GdomeDOMTimeStamp

typedef long long GdomeDOMTimeStamp;


GdomeException

typedef guint32 GdomeException;


struct GdomeEntitiesTableEntry

struct GdomeEntitiesTableEntry {
	gchar *name;
	gchar *value;
	gchar *publicID;
	gchar *systemID;
};


GDOME_A()

#define GDOME_A(node) gdome_cast_a((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeAttr one.

node : Node Object ref


GDOME_C()

#define GDOME_C(node) gdome_cast_c((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeComment one.

node : Node Object ref


GDOME_CD()

#define GDOME_CD(node) gdome_cast_cd((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeCharacterData one.

node : Node Object ref


GDOME_CDS()

#define GDOME_CDS(node) gdome_cast_cds((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeCDATASection one.

node : Node Object ref


GDOME_DF()

#define GDOME_DF(node) gdome_cast_df((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeDocumentFragment one.

node : Node Object ref


GDOME_DOC()

#define GDOME_DOC(node) gdome_cast_doc((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeDocument one.

node : Node Object ref


GDOME_DT()

#define GDOME_DT(node) gdome_cast_dt((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeDocumentType one.

node : Node Object ref


GDOME_EL()

#define GDOME_EL(node) gdome_cast_el((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeElement one.

node : Node Object ref


GDOME_ENT()

#define GDOME_ENT(node) gdome_cast_ent((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeEntity one.

node : Node Object ref


GDOME_ER()

#define GDOME_ER(node) gdome_cast_er((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeEntityReference one.

node : Node Object ref


GDOME_N()

#define GDOME_N(node) gdome_cast_n((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeNode one.

node : Node Object ref


GDOME_NOT()

#define GDOME_NOT(node) gdome_cast_not((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeNotation one.

node : Node Object ref


GDOME_PI()

#define GDOME_PI(node) gdome_cast_pi((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeProcessingInstruction one.

node : Node Object ref


GDOME_T()

#define GDOME_T(node) gdome_cast_t((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeText one.

node : Node Object ref


GDOME_EVNTT()

#define GDOME_EVNTT(node) gdome_cast_evntt((GdomeNode *)node)

Cast a ganeral GdomeNode reference to a GdomeEventTarget one.

node : Node Object ref


GDOME_EXCEPTION_TYPE()

#define GDOME_EXCEPTION_TYPE(exc) ((exc) & GDOME_EXCEPTION_TYPE_MASK)

exc : 


GDOME_EXCEPTION_CODE()

#define GDOME_EXCEPTION_CODE(exc) ((exc) & GDOME_EXCEPTION_CODE_MASK)

exc : 


enum GdomeExceptionMasks

typedef enum {
	GDOME_EXCEPTION_TYPE_MASK = 0x00FF0000,
	GDOME_EXCEPTION_CODE_MASK = 0x0000FFFF
} GdomeExceptionMasks;


enum GdomeExceptionType

typedef enum {
	GDOME_CORE_EXCEPTION = 0 << 16,
	GDOME_EVENT_EXCEPTION = 1 << 16,
	GDOME_XPATH_EXCEPTION = 2 << 16
} GdomeExceptionType;


struct GdomeDOMString

struct GdomeDOMString {
	gchar *str;
	gint refcnt;
	void (*unref) (GdomeDOMString *self);
};


gdome_str_mkref ()

GdomeDOMString* gdome_str_mkref             (const gchar *str);

Creates a GdomeDOMString from a statically allocated string.

str : a NULL terminated string
Returns : the new DOMString object.


gdome_str_mkref_own ()

GdomeDOMString* gdome_str_mkref_own         (gchar *str);

Creates a GdomeDOMString from a dynamically allocated gchar buffer.

str : a NULL terminated string
Returns : the new DOMString object.


gdome_str_mkref_dup ()

GdomeDOMString* gdome_str_mkref_dup         (const gchar *str);

Creates a GdomeDOMString from a static or dynamically allocated gchar buffer, but a copy of the initializing string is done before construction.

str : a NULL terminated string
Returns : the new DOMString object.


gdome_str_ref ()

void        gdome_str_ref                   (GdomeDOMString *self);

Increase the reference count of the specified GdomeDOMString.

self : DOMString Object ref


gdome_str_unref ()

void        gdome_str_unref                 (GdomeDOMString *self);

Decrease the reference count of the specified GdomeDOMString. Free the structure if the object will have zero reference.

self : DOMString Object ref


gdome_str_equal ()

GdomeBoolean gdome_str_equal                (GdomeDOMString *self,
                                             GdomeDOMString *str);

self : DOMString Object ref
str : DOMString to be compared
Returns : TRUE if the strings are equal, FALSE otherwise.


gdome_str_equalIgnoreCase ()

GdomeBoolean gdome_str_equalIgnoreCase      (GdomeDOMString *self,
                                             GdomeDOMString *str);

self : DOMString Object ref
str : DOMString to be compared
Returns : TRUE if the strings are equal ignoring case, FALSE otherwise.


gdome_str_charAt ()

gchar       gdome_str_charAt                (GdomeDOMString *self,
                                             int index);

self : DOMString Object ref
index : the index of the character wanted
Returns : the index -th character in the specified string


gdome_str_concat ()

GdomeDOMString* gdome_str_concat            (GdomeDOMString *self,
                                             GdomeDOMString *str);

self : DOMString Object ref
str : DOMString to be appended
Returns : a new GdomeDOMString that is the concatenation of this string with str. If str is NULL a new reference to this string is returned.


gdome_str_endsWith ()

GdomeBoolean gdome_str_endsWith             (GdomeDOMString *self,
                                             GdomeDOMString *suffix);

self : DOMString Object ref
suffix : DOMString to check
Returns : TRUE if this string ends with str.


gdome_str_isEmpty ()

GdomeBoolean gdome_str_isEmpty              (GdomeDOMString *self);

self : DOMString Object ref
Returns : TRUE if this string is empty, FALSE otherwise.


gdome_str_length ()

int         gdome_str_length                (GdomeDOMString *self);

self : DOMString Object ref
Returns : the length of this string.


gdome_str_startsWith ()

GdomeBoolean gdome_str_startsWith           (GdomeDOMString *self,
                                             GdomeDOMString *prefix);

self : DOMString Object ref
prefix : DOMString to check
Returns : TRUE if this string starts with str.