document

document

Synopsis

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);

Description

Details

gebr_geoxml_init ()

void                gebr_geoxml_init                    (void);

gebr_geoxml_finalize ()

void                gebr_geoxml_finalize                (void);

gebr_geoxml_document_load ()

int                 gebr_geoxml_document_load           (GebrGeoXmlDocument **document,
                                                         const gchar *path,
                                                         gboolean validate,
                                                         GebrGeoXmlDiscardMenuRefCallback discard_menu_ref);

gebr_geoxml_document_load_buffer ()

int                 gebr_geoxml_document_load_buffer    (GebrGeoXmlDocument **document,
                                                         const gchar *xml);

gebr_geoxml_document_free ()

void                gebr_geoxml_document_free           (GebrGeoXmlDocument *document);

gebr_geoxml_document_clone ()

GebrGeoXmlDocument * gebr_geoxml_document_clone         (GebrGeoXmlDocument *source);

gebr_geoxml_document_get_type ()

GebrGeoXmlDocumentType  gebr_geoxml_document_get_type   (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_version ()

gchar *             gebr_geoxml_document_get_version    (GebrGeoXmlDocument *document);

gebr_geoxml_document_validate ()

int                 gebr_geoxml_document_validate       (const gchar *filename);

gebr_geoxml_document_save ()

int                 gebr_geoxml_document_save           (GebrGeoXmlDocument *document,
                                                         const gchar *path,
                                                         gboolean compress);

gebr_geoxml_document_to_string ()

int                 gebr_geoxml_document_to_string      (GebrGeoXmlDocument *document,
                                                         gchar **xml_string);

gebr_geoxml_document_set_filename ()

void                gebr_geoxml_document_set_filename   (GebrGeoXmlDocument *document,
                                                         const gchar *filename);

gebr_geoxml_document_set_title ()

void                gebr_geoxml_document_set_title      (GebrGeoXmlDocument *document,
                                                         const gchar *title);

gebr_geoxml_document_set_author ()

void                gebr_geoxml_document_set_author     (GebrGeoXmlDocument *document,
                                                         const gchar *author);

gebr_geoxml_document_set_email ()

void                gebr_geoxml_document_set_email      (GebrGeoXmlDocument *document,
                                                         const gchar *email);

gebr_geoxml_document_get_dict_parameters ()

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.

document :

a GebrGeoXmlDocument

gebr_geoxml_document_set_date_created ()

void                gebr_geoxml_document_set_date_created
                                                        (GebrGeoXmlDocument *document,
                                                         const gchar *created);

gebr_geoxml_document_set_date_modified ()

void                gebr_geoxml_document_set_date_modified
                                                        (GebrGeoXmlDocument *document,
                                                         const gchar *created);

gebr_geoxml_document_set_description ()

void                gebr_geoxml_document_set_description
                                                        (GebrGeoXmlDocument *document,
                                                         const gchar *description);

gebr_geoxml_document_set_help ()

void                gebr_geoxml_document_set_help       (GebrGeoXmlDocument *document,
                                                         const gchar *help);

gebr_geoxml_document_get_filename ()

const gchar *       gebr_geoxml_document_get_filename   (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_title ()

gchar *             gebr_geoxml_document_get_title      (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_author ()

gchar *             gebr_geoxml_document_get_author     (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_email ()

gchar *             gebr_geoxml_document_get_email      (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_date_created ()

gchar *             gebr_geoxml_document_get_date_created
                                                        (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_date_modified ()

gchar *             gebr_geoxml_document_get_date_modified
                                                        (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_description ()

gchar *             gebr_geoxml_document_get_description
                                                        (GebrGeoXmlDocument *document);

gebr_geoxml_document_get_help ()

gchar *             gebr_geoxml_document_get_help       (GebrGeoXmlDocument *document);

gebr_geoxml_document_merge_dicts ()

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().

validator :

Uses validator to omit parameters with error, if NULL is passed all parameters are merged.

first :

The GebrGeoXmlDocument that will contain all dictionary parameters.

... :

A NULL-terminated list of GebrGeoXmlDocument that will be merged into first.

gebr_geoxml_document_split_dict ()

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.

first :

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.

gebr_geoxml_document_set_dict_keyword ()

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.

doc :

A GebrGeoXmlDocument

type :

The type of the variable

keyword :

The name of the variable

value :

The value of the variable

Returns :

The dictionary variable GebrGeoXmlParameter.

gebr_geoxml_document_get_dict_parameter ()

GebrGeoXmlSequence * gebr_geoxml_document_get_dict_parameter
                                                        (GebrGeoXmlDocument *doc);

gebr_geoxml_document_set_dtd_dir ()

void                gebr_geoxml_document_set_dtd_dir    (const gchar *path);

gebr_geoxml_document_canonize_dict_parameters ()

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 :

Document (flow/line/project) that will have its parameters canonized.

list_copy :

A hash table pointer to access the keywords -> canonized list.

Returns :

TRUE if everything when fine, FALSE otherwise.

gebr_geoxml_document_ref ()

GebrGeoXmlDocument * gebr_geoxml_document_ref           (GebrGeoXmlDocument *self);

gebr_geoxml_document_unref ()

void                gebr_geoxml_document_unref          (GebrGeoXmlDocument *self);