Top | ![]() |
![]() |
![]() |
![]() |
GXmlSerializableEnumGXmlSerializableEnum — Represent any value as string but a list of enum values by default to select from. property to be added as a GXmlAttribute to a GXmlElement. |
#define | GXML_TYPE_SERIALIZABLE_ENUM |
struct | GXmlSerializableEnum |
struct | GXmlSerializableEnumClass |
enum | GXmlSerializableEnumError |
This class makes easy to create enumerations with its representation to string, but limited to the actual values of the enumeration, making it flexible for values not supported now but possible because some extensions. Can be added an extension element in the enumeration and return it when the supported values are not met with the string representation in the property.
void gxml_serializable_enum_set_enum_type (GXmlSerializableEnum *self
,GType type
);
GType
gxml_serializable_enum_get_enum_type (GXmlSerializableEnum *self
);
void gxml_serializable_enum_parse (GXmlSerializableEnum *self
,const gchar *str
,GError **error
);
self |
the GXmlSerializableEnum instance |
|
str |
|
|
error |
location to store the error occuring, or |
void gxml_serializable_enum_parse_integer (GXmlSerializableEnum *self
,gint v
,GError **error
);
self |
the GXmlSerializableEnum instance |
|
v |
|
|
error |
location to store the error occuring, or |
gint gxml_serializable_enum_to_integer (GXmlSerializableEnum *self
,GError **error
);
self |
the GXmlSerializableEnum instance |
|
error |
location to store the error occuring, or |
gchar *
gxml_serializable_enum_to_string (GXmlSerializableEnum *self
);
GXmlSerializableEnum *
gxml_serializable_enum_new_with_enum (GType type
);
#define GXML_TYPE_SERIALIZABLE_ENUM (gxml_serializable_enum_get_type ())
The type for GXmlSerializableEnum.
struct GXmlSerializableEnum { GObject parent_instance; GXmlSerializableEnumPrivate * priv; gchar* _val; GType _enumtype; };
Represent any value as string but a list of enum values by default to select from. property to be added as a GXmlAttribute to a GXmlElement.
This class makes easy to create enumerations with its representation to string, but limited to the actual values of the enumeration, making it flexible for values not supported now but possible because some extensions. Can be added an extension element in the enumeration and return it when the supported values are not met with the string representation in the property.
struct GXmlSerializableEnumClass { GObjectClass parent_class; };
The class structure for GXML_TYPE_SERIALIZABLE_ENUM
. All the fields in this structure are private and should never be accessed directly.
Errors when de/serializing enumerations as a set of string when using GXmlSerializableEnum