Top | ![]() |
![]() |
![]() |
![]() |
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
);
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
);
void gebr_geoxml_document_set_parent_id (GebrGeoXmlDocument *document
,const gchar *parent_id
);
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.
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_parent_id (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()
.
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
.
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.
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.
GebrGeoXmlDocument *
gebr_geoxml_document_ref (GebrGeoXmlDocument *self
);
gboolean gebr_geoxml_document_type_contains (GebrGeoXmlDocumentType base
,GebrGeoXmlDocumentType type
);
This method simply returns if the base
type of document contains the type
type of document.
For instance, projects contain projects, lines and flows; lines contains
lines and flows; flows contains only flows.