GXmlGomBaseProperty

GXmlGomBaseProperty — Base class for properties implementing GXmlGomProperty interface.

Functions

gboolean gxml_gom_base_property_validate_value ()
gchar * gxml_gom_base_property_get_value ()
void gxml_gom_base_property_set_value ()
GXmlGomString * gxml_gom_string_new ()
gchar ** gxml_gom_array_string_get_values ()
void gxml_gom_array_string_initialize_strings ()
gboolean gxml_gom_array_string_is_valid_value ()
void gxml_gom_array_string_select ()
gboolean gxml_gom_array_string_search ()
GXmlGomArrayString * gxml_gom_array_string_new ()
void gxml_gom_xsd_array_string_load ()
GXmlGomXsdArrayString * gxml_gom_xsd_array_string_new ()
const gchar * gxml_gom_xsd_array_string_get_simple_type ()
void gxml_gom_xsd_array_string_set_simple_type ()
GFile * gxml_gom_xsd_array_string_get_source ()
void gxml_gom_xsd_array_string_set_source ()
gdouble gxml_gom_double_get_double ()
void gxml_gom_double_set_double ()
GXmlGomDouble * gxml_gom_double_new ()
guint gxml_gom_double_get_decimals ()
void gxml_gom_double_set_decimals ()
gfloat gxml_gom_float_get_float ()
void gxml_gom_float_set_float ()
GXmlGomFloat * gxml_gom_float_new ()
gint gxml_gom_int_get_integer ()
void gxml_gom_int_set_integer ()
GXmlGomInt * gxml_gom_int_new ()
gboolean gxml_gom_boolean_get_boolean ()
void gxml_gom_boolean_set_boolean ()
GXmlGomBoolean * gxml_gom_boolean_new ()
void gxml_gom_enum_initialize_enum ()
gint gxml_gom_enum_get_enum ()
void gxml_gom_enum_set_enum ()
GXmlGomEnum * gxml_gom_enum_new ()
GType gxml_gom_enum_get_enum_type ()
void gxml_gom_enum_set_enum_type ()
void gxml_gom_date_get_date ()
void gxml_gom_date_set_date ()
GXmlGomDate * gxml_gom_date_new ()
GDateTime * gxml_gom_date_time_get_datetime ()
void gxml_gom_date_time_set_datetime ()
GXmlGomDateTime * gxml_gom_date_time_new ()
const gchar * gxml_gom_date_time_get_format ()
void gxml_gom_date_time_set_format ()
gboolean gxml_gom_property_validate_value ()
gchar * gxml_gom_property_get_value ()
void gxml_gom_property_set_value ()

Types and Values

Description

Functions

gxml_gom_base_property_validate_value ()

gboolean
gxml_gom_base_property_validate_value (GXmlGomBaseProperty *self,
                                       const gchar *val);

Takes a string and check if it can be valid for this property.

Parameters

self

the GXmlGomBaseProperty instance

 

val

 

 

gxml_gom_base_property_get_value ()

gchar *
gxml_gom_base_property_get_value (GXmlGomBaseProperty *self);

Get and return the current value of the "value" property.

Attribute's value in the parent GXmlDomElement using a string.

Implementation should take care to validate value before to set or parse from XML document.

Parameters

self

the GXmlGomBaseProperty instance to query

 

Returns

the value of the "value" property


gxml_gom_base_property_set_value ()

void
gxml_gom_base_property_set_value (GXmlGomBaseProperty *self,
                                  const gchar *value);

Set the value of the "value" property to value .

Attribute's value in the parent GXmlDomElement using a string.

Implementation should take care to validate value before to set or parse from XML document.

Parameters

self

the GXmlGomBaseProperty instance to modify

 

value

the new value of the "value" property

 

gxml_gom_string_new ()

GXmlGomString *
gxml_gom_string_new (void);

gxml_gom_array_string_get_values ()

gchar **
gxml_gom_array_string_get_values (GXmlGomArrayString *self,
                                  int *result_length1);

Parameters

self

the GXmlGomArrayString instance

 

Returns

.

[array length=result_length1][transfer none]


gxml_gom_array_string_initialize_strings ()

void
gxml_gom_array_string_initialize_strings
                               (GXmlGomArrayString *self,
                                gchar **strs,
                                int strs_length1);

Convenient method to initialize array of values from an array of strings. Values are taken and should not be freed after call initialization.

Parameters

self

the GXmlGomArrayString instance

 

strs_length1

length of the strs array

 

strs

 

 

gxml_gom_array_string_is_valid_value ()

gboolean
gxml_gom_array_string_is_valid_value (GXmlGomArrayString *self);

Returns true if current value in attribute is included in the array of values.

Parameters

self

the GXmlGomArrayString instance

 

gxml_gom_array_string_select ()

void
gxml_gom_array_string_select (GXmlGomArrayString *self,
                              gint index);

Select one string from array at index:

Parameters

self

the GXmlGomArrayString instance

 

index

 

 

gxml_gom_array_string_search ()

gboolean
gxml_gom_array_string_search (GXmlGomArrayString *self,
                              const gchar *str);

Check if string is in array

Parameters

self

the GXmlGomArrayString instance

 

str

 

 

gxml_gom_array_string_new ()

GXmlGomArrayString *
gxml_gom_array_string_new (void);

gxml_gom_xsd_array_string_load ()

void
gxml_gom_xsd_array_string_load (GXmlGomXsdArrayString *self,
                                GError **error);

Load list of strings from a GFile, parsing using an GXmlGomXsdSchema object and searching for GXmlIXsdSimpleType definition with name "simple-type".

Parameters

self

the GXmlGomXsdArrayString instance

 

error

location to store the error occuring, or NULL to ignore

 

gxml_gom_xsd_array_string_new ()

GXmlGomXsdArrayString *
gxml_gom_xsd_array_string_new (void);

gxml_gom_xsd_array_string_get_simple_type ()

const gchar *
gxml_gom_xsd_array_string_get_simple_type
                               (GXmlGomXsdArrayString *self);

Get and return the current value of the "simple-type" property.

Name of GXmlIXsdSimpleType to use as source.

Parameters

self

the GXmlGomXsdArrayString instance to query

 

Returns

the value of the "simple-type" property


gxml_gom_xsd_array_string_set_simple_type ()

void
gxml_gom_xsd_array_string_set_simple_type
                               (GXmlGomXsdArrayString *self,
                                const gchar *value);

Set the value of the "simple-type" property to value .

Name of GXmlIXsdSimpleType to use as source.

Parameters

self

the GXmlGomXsdArrayString instance to modify

 

value

the new value of the "simple-type" property

 

gxml_gom_xsd_array_string_get_source ()

GFile *
gxml_gom_xsd_array_string_get_source (GXmlGomXsdArrayString *self);

Get and return the current value of the "source" property.

A GFile source to read from, simple type definitions in an XSD file type.

Parameters

self

the GXmlGomXsdArrayString instance to query

 

Returns

the value of the "source" property


gxml_gom_xsd_array_string_set_source ()

void
gxml_gom_xsd_array_string_set_source (GXmlGomXsdArrayString *self,
                                      GFile *value);

Set the value of the "source" property to value .

A GFile source to read from, simple type definitions in an XSD file type.

Parameters

self

the GXmlGomXsdArrayString instance to modify

 

value

the new value of the "source" property

 

gxml_gom_double_get_double ()

gdouble
gxml_gom_double_get_double (GXmlGomDouble *self);

Retrive current value.

Parameters

self

the GXmlGomDouble instance

 

gxml_gom_double_set_double ()

void
gxml_gom_double_set_double (GXmlGomDouble *self,
                            gdouble value);

Sets current value.

Parameters

self

the GXmlGomDouble instance

 

value

 

 

gxml_gom_double_new ()

GXmlGomDouble *
gxml_gom_double_new (void);

gxml_gom_double_get_decimals ()

guint
gxml_gom_double_get_decimals (GXmlGomDouble *self);

Get and return the current value of the "decimals" property.

Set number of decimals to write out as GXmlGomElement's property. Default is 4.

Parameters

self

the GXmlGomDouble instance to query

 

Returns

the value of the "decimals" property


gxml_gom_double_set_decimals ()

void
gxml_gom_double_set_decimals (GXmlGomDouble *self,
                              guint value);

Set the value of the "decimals" property to value .

Set number of decimals to write out as GXmlGomElement's property. Default is 4.

Parameters

self

the GXmlGomDouble instance to modify

 

value

the new value of the "decimals" property

 

gxml_gom_float_get_float ()

gfloat
gxml_gom_float_get_float (GXmlGomFloat *self);

Retrive current value.

Parameters

self

the GXmlGomFloat instance

 

gxml_gom_float_set_float ()

void
gxml_gom_float_set_float (GXmlGomFloat *self,
                          gfloat value);

Sets current value.

Parameters

self

the GXmlGomFloat instance

 

value

 

 

gxml_gom_float_new ()

GXmlGomFloat *
gxml_gom_float_new (void);

gxml_gom_int_get_integer ()

gint
gxml_gom_int_get_integer (GXmlGomInt *self);

Retrive current value.

Parameters

self

the GXmlGomInt instance

 

gxml_gom_int_set_integer ()

void
gxml_gom_int_set_integer (GXmlGomInt *self,
                          gint value);

Sets current value.

Parameters

self

the GXmlGomInt instance

 

value

 

 

gxml_gom_int_new ()

GXmlGomInt *
gxml_gom_int_new (void);

gxml_gom_boolean_get_boolean ()

gboolean
gxml_gom_boolean_get_boolean (GXmlGomBoolean *self);

Retrive current value.

Parameters

self

the GXmlGomBoolean instance

 

gxml_gom_boolean_set_boolean ()

void
gxml_gom_boolean_set_boolean (GXmlGomBoolean *self,
                              gboolean value);

Sets current value.

Parameters

self

the GXmlGomBoolean instance

 

value

 

 

gxml_gom_boolean_new ()

GXmlGomBoolean *
gxml_gom_boolean_new (void);

gxml_gom_enum_initialize_enum ()

void
gxml_gom_enum_initialize_enum (GXmlGomEnum *self,
                               GType enum_type);

Convenient method to initialize internal enum type.

Parameters

self

the GXmlGomEnum instance

 

enum_type

 

 

gxml_gom_enum_get_enum ()

gint
gxml_gom_enum_get_enum (GXmlGomEnum *self);

Retrive current value.

Parameters

self

the GXmlGomEnum instance

 

gxml_gom_enum_set_enum ()

void
gxml_gom_enum_set_enum (GXmlGomEnum *self,
                        gint value);

Sets current value.

Parameters

self

the GXmlGomEnum instance

 

value

 

 

gxml_gom_enum_new ()

GXmlGomEnum *
gxml_gom_enum_new (void);

gxml_gom_enum_get_enum_type ()

GType
gxml_gom_enum_get_enum_type (GXmlGomEnum *self);

Get and return the current value of the "enum-type" property.

Enum type used by property.

Parameters

self

the GXmlGomEnum instance to query

 

Returns

the value of the "enum-type" property


gxml_gom_enum_set_enum_type ()

void
gxml_gom_enum_set_enum_type (GXmlGomEnum *self,
                             GType value);

Set the value of the "enum-type" property to value .

Enum type used by property.

Parameters

self

the GXmlGomEnum instance to modify

 

value

the new value of the "enum-type" property

 

gxml_gom_date_get_date ()

void
gxml_gom_date_get_date (GXmlGomDate *self,
                        GDate *result);

Retrives current value.

Parameters

self

the GXmlGomDate instance

 

gxml_gom_date_set_date ()

void
gxml_gom_date_set_date (GXmlGomDate *self,
                        GDate *date);

Sets current value.

Parameters

self

the GXmlGomDate instance

 

date

 

 

gxml_gom_date_new ()

GXmlGomDate *
gxml_gom_date_new (void);

gxml_gom_date_time_get_datetime ()

GDateTime *
gxml_gom_date_time_get_datetime (GXmlGomDateTime *self);

Retrives current value.

Parameters

self

the GXmlGomDateTime instance

 

gxml_gom_date_time_set_datetime ()

void
gxml_gom_date_time_set_datetime (GXmlGomDateTime *self,
                                 GDateTime *dt);

Sets current value.

Parameters

self

the GXmlGomDateTime instance

 

dt

 

 

gxml_gom_date_time_new ()

GXmlGomDateTime *
gxml_gom_date_time_new (void);

gxml_gom_date_time_get_format ()

const gchar *
gxml_gom_date_time_get_format (GXmlGomDateTime *self);

Get and return the current value of the "format" property.

Parameters

self

the GXmlGomDateTime instance to query

 

Returns

the value of the "format" property


gxml_gom_date_time_set_format ()

void
gxml_gom_date_time_set_format (GXmlGomDateTime *self,
                               const gchar *value);

Set the value of the "format" property to value .

Parameters

self

the GXmlGomDateTime instance to modify

 

value

the new value of the "format" property

 

gxml_gom_property_validate_value ()

gboolean
gxml_gom_property_validate_value (GXmlGomProperty *self,
                                  const gchar *val);

Takes a string and check if it is a valid value for property

Parameters

self

the GXmlGomProperty instance

 

val

 

 

gxml_gom_property_get_value ()

gchar *
gxml_gom_property_get_value (GXmlGomProperty *self);

Get and return the current value of the "value" property.

Attribute's value in the parent GXmlDomElement using a string.

Implementation should take care to validate value before to set or parse from XML document.

Parameters

self

the GXmlGomProperty instance to query

 

Returns

the value of the "value" property


gxml_gom_property_set_value ()

void
gxml_gom_property_set_value (GXmlGomProperty *self,
                             const gchar *value);

Set the value of the "value" property to value .

Attribute's value in the parent GXmlDomElement using a string.

Implementation should take care to validate value before to set or parse from XML document.

Parameters

self

the GXmlGomProperty instance to modify

 

value

the new value of the "value" property

 

Types and Values

GXML_TYPE_GOM_BASE_PROPERTY

#define GXML_TYPE_GOM_BASE_PROPERTY (gxml_gom_base_property_get_type ())

The type for GXmlGomBaseProperty.


struct GXmlGomBaseProperty

struct GXmlGomBaseProperty {
	GObject parent_instance;
	GXmlGomBasePropertyPrivate * priv;
};

Base class for properties implementing GXmlGomProperty interface.


struct GXmlGomBasePropertyClass

struct GXmlGomBasePropertyClass {
	GObjectClass parent_class;
	gboolean (*validate_value) (GXmlGomBaseProperty* self, const gchar* val);
	gchar* (*get_value) (GXmlGomBaseProperty* self);
	void (*set_value) (GXmlGomBaseProperty* self, const gchar* value);
};

The class structure for GXML_TYPE_GOM_BASE_PROPERTY. All the fields in this structure are private and should never be accessed directly.

Members

validate_value ()

virtual method called by gxml_gom_base_property_validate_value()

 

get_value ()

getter method for the abstract property "value"

 

set_value ()

setter method for the abstract property "value"

 

GXML_TYPE_GOM_STRING

#define GXML_TYPE_GOM_STRING (gxml_gom_string_get_type ())

The type for GXmlGomString.


struct GXmlGomString

struct GXmlGomString {
	GXmlGomBaseProperty parent_instance;
	GXmlGomStringPrivate * priv;
	gchar* _value;
};

Convenient class to handle GXmlGomElement's attributes using validated string using Regular Expressions.


struct GXmlGomStringClass

struct GXmlGomStringClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_STRING. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_ARRAY_STRING

#define GXML_TYPE_GOM_ARRAY_STRING (gxml_gom_array_string_get_type ())

The type for GXmlGomArrayString.


struct GXmlGomArrayString

struct GXmlGomArrayString {
	GXmlGomBaseProperty parent_instance;
	GXmlGomArrayStringPrivate * priv;
	gchar* _value;
	gchar** _values;
	gint _values_length1;
};

Convenient class to handle a GXmlGomElement's attribute using a list of pre-defined and unmutable values.


struct GXmlGomArrayStringClass

struct GXmlGomArrayStringClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_ARRAY_STRING. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_XSD_ARRAY_STRING

#define GXML_TYPE_GOM_XSD_ARRAY_STRING (gxml_gom_xsd_array_string_get_type ())

The type for GXmlGomXsdArrayString.


struct GXmlGomXsdArrayString

struct GXmlGomXsdArrayString {
	GXmlGomArrayString parent_instance;
	GXmlGomXsdArrayStringPrivate * priv;
	GFile* _source;
	gchar* _simple_type;
};

Convenient class to handle a GXmlGomElement's attribute using a list of pre-defined and unmutable values, taken from an GXmlIXsdSimpleType definition


struct GXmlGomXsdArrayStringClass

struct GXmlGomXsdArrayStringClass {
	GXmlGomArrayStringClass parent_class;
};

The class structure for GXML_TYPE_GOM_XSD_ARRAY_STRING. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_DOUBLE

#define GXML_TYPE_GOM_DOUBLE (gxml_gom_double_get_type ())

The type for GXmlGomDouble.


struct GXmlGomDouble

struct GXmlGomDouble {
	GXmlGomBaseProperty parent_instance;
	GXmlGomDoublePrivate * priv;
	gdouble _value;
};

Convenient class to handle GXmlGomElement's attributes using double pressition floats as sources of values.

Property is represented as a string.


struct GXmlGomDoubleClass

struct GXmlGomDoubleClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_DOUBLE. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_FLOAT

#define GXML_TYPE_GOM_FLOAT (gxml_gom_float_get_type ())

The type for GXmlGomFloat.


struct GXmlGomFloat

struct GXmlGomFloat {
	GXmlGomDouble parent_instance;
	GXmlGomFloatPrivate * priv;
};

Convenient class to handle GXmlGomElement's attributes using floats as sources of values.

Property is represented as a string.


struct GXmlGomFloatClass

struct GXmlGomFloatClass {
	GXmlGomDoubleClass parent_class;
};

The class structure for GXML_TYPE_GOM_FLOAT. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_INT

#define GXML_TYPE_GOM_INT (gxml_gom_int_get_type ())

The type for GXmlGomInt.


struct GXmlGomInt

struct GXmlGomInt {
	GXmlGomBaseProperty parent_instance;
	GXmlGomIntPrivate * priv;
	gint _value;
};

Convenient class to handle GXmlGomElement's attributes using a integers as sources of values.

Property is represented as a string.


struct GXmlGomIntClass

struct GXmlGomIntClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_INT. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_BOOLEAN

#define GXML_TYPE_GOM_BOOLEAN (gxml_gom_boolean_get_type ())

The type for GXmlGomBoolean.


struct GXmlGomBoolean

struct GXmlGomBoolean {
	GXmlGomBaseProperty parent_instance;
	GXmlGomBooleanPrivate * priv;
	gboolean _value;
};

Convenient class to handle GXmlGomElement's attributes using a boolean ('true' and 'false') as sources of values.

Property is represented as a string, using 'true' or 'false'.


struct GXmlGomBooleanClass

struct GXmlGomBooleanClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_BOOLEAN. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_ENUM

#define GXML_TYPE_GOM_ENUM (gxml_gom_enum_get_type ())

The type for GXmlGomEnum.


struct GXmlGomEnum

struct GXmlGomEnum {
	GXmlGomBaseProperty parent_instance;
	GXmlGomEnumPrivate * priv;
	gint _value;
	GType _enum_type;
};

Convenient class to handle GXmlGomElement's attributes using a G_TYPE_ENUM as a source of values.

Enumeration is represented as a string, using its name, independent of value possition in enumeration.


struct GXmlGomEnumClass

struct GXmlGomEnumClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_ENUM. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_DATE

#define GXML_TYPE_GOM_DATE (gxml_gom_date_get_type ())

The type for GXmlGomDate.


struct GXmlGomDate

struct GXmlGomDate {
	GXmlGomBaseProperty parent_instance;
	GXmlGomDatePrivate * priv;
	GDate _value;
};

Convenient class to handle GXmlGomElement's attributes using a GDate as sources of values.

Property is represented as a string using a Y-m-d format


struct GXmlGomDateClass

struct GXmlGomDateClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_DATE. All the fields in this structure are private and should never be accessed directly.

Members


GXML_TYPE_GOM_DATE_TIME

#define GXML_TYPE_GOM_DATE_TIME (gxml_gom_date_time_get_type ())

The type for GXmlGomDateTime.


struct GXmlGomDateTime

struct GXmlGomDateTime {
	GXmlGomBaseProperty parent_instance;
	GXmlGomDateTimePrivate * priv;
	GDateTime* _value;
};

Convenient class to handle GXmlGomElement's attributes using a GDateTime as sources of values.

Timestamp is considered in local time.

Property is represented as a string using a "format" and g_date_time_format() method. If "format" is not set 'FT%T' format is used by default.


struct GXmlGomDateTimeClass

struct GXmlGomDateTimeClass {
	GXmlGomBasePropertyClass parent_class;
};

The class structure for GXML_TYPE_GOM_DATE_TIME. All the fields in this structure are private and should never be accessed directly.

Members


GXmlGomProperty

typedef struct _GXmlGomProperty GXmlGomProperty;

An interface for GXmlGomObject's properties translated to GXmlDomElement attributes. If object is instantiated it is written, if not is just ingnored.


struct GXmlGomPropertyIface

struct GXmlGomPropertyIface {
	GTypeInterface parent_iface;
	gboolean (*validate_value) (GXmlGomProperty* self, const gchar* val);
	gchar* (*get_value) (GXmlGomProperty* self);
	void (*set_value) (GXmlGomProperty* self, const gchar* value);
};

Interface for creating GXmlGomProperty implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

validate_value ()

virtual method called by gxml_gom_property_validate_value()

 

get_value ()

getter method for the abstract property "value"

 

set_value ()

setter method for the abstract property "value"