![]() |
![]() |
![]() |
libgebr Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void gebr_geoxml_init (void
); void gebr_geoxml_finalize (void
); int gebr_geoxml_document_load (GebrGeoXmlDocument **document
,const gchar *path
,gboolean validate
,GebrGeoXmlDiscardMenuRefCallback discard_menu_ref
); int gebr_geoxml_document_load_buffer (GebrGeoXmlDocument **document
,const gchar *xml
); void gebr_geoxml_document_free (GebrGeoXmlDocument *document
); GebrGeoXmlDocument * gebr_geoxml_document_clone (GebrGeoXmlDocument *source
); GebrGeoXmlDocumentType gebr_geoxml_document_get_type (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_version (GebrGeoXmlDocument *document
); int gebr_geoxml_document_validate (const gchar *filename
); int gebr_geoxml_document_save (GebrGeoXmlDocument *document
,const gchar *path
,gboolean compress
); int gebr_geoxml_document_to_string (GebrGeoXmlDocument *document
,gchar **xml_string
); void gebr_geoxml_document_set_filename (GebrGeoXmlDocument *document
,const gchar *filename
); void gebr_geoxml_document_set_title (GebrGeoXmlDocument *document
,const gchar *title
); void gebr_geoxml_document_set_author (GebrGeoXmlDocument *document
,const gchar *author
); void gebr_geoxml_document_set_email (GebrGeoXmlDocument *document
,const gchar *email
); GebrGeoXmlParameters * gebr_geoxml_document_get_dict_parameters (GebrGeoXmlDocument *document
); void gebr_geoxml_document_set_date_created (GebrGeoXmlDocument *document
,const gchar *created
); void gebr_geoxml_document_set_date_modified (GebrGeoXmlDocument *document
,const gchar *created
); void gebr_geoxml_document_set_description (GebrGeoXmlDocument *document
,const gchar *description
); void gebr_geoxml_document_set_help (GebrGeoXmlDocument *document
,const gchar *help
); const gchar * gebr_geoxml_document_get_filename (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_title (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_author (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_email (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_date_created (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_date_modified (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_description (GebrGeoXmlDocument *document
); gchar * gebr_geoxml_document_get_help (GebrGeoXmlDocument *document
); void gebr_geoxml_document_merge_dicts (GebrValidator *validator
,GebrGeoXmlDocument *first
,...
); gboolean gebr_geoxml_document_split_dict (GebrGeoXmlDocument *first
,...
); GebrGeoXmlParameter * gebr_geoxml_document_set_dict_keyword (GebrGeoXmlDocument *doc
,GebrGeoXmlParameterType type
,const gchar *keyword
,const gchar *value
); GebrGeoXmlSequence * gebr_geoxml_document_get_dict_parameter (GebrGeoXmlDocument *doc
); void gebr_geoxml_document_set_dtd_dir (const gchar *path
); gboolean gebr_geoxml_document_canonize_dict_parameters (GebrGeoXmlDocument *document
,GHashTable **vars_list
); GebrGeoXmlDocument * gebr_geoxml_document_ref (GebrGeoXmlDocument *self
); void gebr_geoxml_document_unref (GebrGeoXmlDocument *self
);
int gebr_geoxml_document_load (GebrGeoXmlDocument **document
,const gchar *path
,gboolean validate
,GebrGeoXmlDiscardMenuRefCallback discard_menu_ref
);
int gebr_geoxml_document_load_buffer (GebrGeoXmlDocument **document
,const gchar *xml
);
GebrGeoXmlDocument * gebr_geoxml_document_clone (GebrGeoXmlDocument *source
);
GebrGeoXmlDocumentType gebr_geoxml_document_get_type (GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_version (GebrGeoXmlDocument *document
);
int gebr_geoxml_document_save (GebrGeoXmlDocument *document
,const gchar *path
,gboolean compress
);
int gebr_geoxml_document_to_string (GebrGeoXmlDocument *document
,gchar **xml_string
);
void gebr_geoxml_document_set_filename (GebrGeoXmlDocument *document
,const gchar *filename
);
void gebr_geoxml_document_set_title (GebrGeoXmlDocument *document
,const gchar *title
);
void gebr_geoxml_document_set_author (GebrGeoXmlDocument *document
,const gchar *author
);
void gebr_geoxml_document_set_email (GebrGeoXmlDocument *document
,const gchar *email
);
GebrGeoXmlParameters * gebr_geoxml_document_get_dict_parameters
(GebrGeoXmlDocument *document
);
Retrieves from document
the parameters dictionary for use with program's parameters.
If \p document is NULL returns NULL.
|
a GebrGeoXmlDocument |
void gebr_geoxml_document_set_date_created (GebrGeoXmlDocument *document
,const gchar *created
);
void gebr_geoxml_document_set_date_modified (GebrGeoXmlDocument *document
,const gchar *created
);
void gebr_geoxml_document_set_description (GebrGeoXmlDocument *document
,const gchar *description
);
void gebr_geoxml_document_set_help (GebrGeoXmlDocument *document
,const gchar *help
);
const gchar * gebr_geoxml_document_get_filename (GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_title (GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_author (GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_email (GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_date_created
(GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_date_modified
(GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_description
(GebrGeoXmlDocument *document
);
gchar * gebr_geoxml_document_get_help (GebrGeoXmlDocument *document
);
void gebr_geoxml_document_merge_dicts (GebrValidator *validator
,GebrGeoXmlDocument *first
,...
);
Merges all dictionaries into first
separating them with a special
parameter. After applying this function, no one should use first
before
calling gebr_geoxml_document_split_dict()
.
|
Uses validator to omit parameters with error, if NULL is passed all parameters are merged. |
|
The GebrGeoXmlDocument that will contain all dictionary parameters. |
|
A NULL -terminated list of GebrGeoXmlDocument that will be merged
into first . |
gboolean gebr_geoxml_document_split_dict (GebrGeoXmlDocument *first
,...
);
If first
has dictionary parameters separated by the function
gebr_geoxml_document_merge_dicts()
, make sure the list @... have enough
documents to hold them. If that is not the case, the function returns
FALSE
.
|
The GebrGeoXmlDocument containing dictionary parameters (or not). |
|
A NULL -terminated list of GebrGeoXmlDocument that will be filled
with first 's dictionary parameters. |
Returns : |
TRUE if the document list was large enough to hold first 's
dictionary parameters, FALSE otherwise. |
GebrGeoXmlParameter * gebr_geoxml_document_set_dict_keyword (GebrGeoXmlDocument *doc
,GebrGeoXmlParameterType type
,const gchar *keyword
,const gchar *value
);
Creates a new variable in the dictionary variables buffer.
|
A GebrGeoXmlDocument |
|
The type of the variable |
|
The name of the variable |
|
The value of the variable |
Returns : |
The dictionary variable GebrGeoXmlParameter. |
GebrGeoXmlSequence * gebr_geoxml_document_get_dict_parameter
(GebrGeoXmlDocument *doc
);
gboolean gebr_geoxml_document_canonize_dict_parameters (GebrGeoXmlDocument *document
,GHashTable **vars_list
);
This function canonizes a document dictionary, changing invalid variable names to a valid form.
The list to variable names/values is freed every time you canonize a new project.
This fuction also converts the variable type to the current supported types (e.g. int to float)
Ex: "CDP EM METROS (M)" becomes "cdp_em_metros_m_".
Important: You should not free the pointer list_copy.
|
Document (flow/line/project) that will have its parameters canonized. |
|
A hash table pointer to access the keywords -> canonized list. |
Returns : |
TRUE if everything when fine, FALSE otherwise. |
GebrGeoXmlDocument * gebr_geoxml_document_ref (GebrGeoXmlDocument *self
);