X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Fgom.html;h=857e7452eaa63b7b539fffdebdc94ef05e9f33ab;hb=e64a3ac05141381579c407b779d6db66ecdb367d;hp=a0829bcf474a82f829f455a8bd8faae82412df98;hpb=8c784f82961c03c9e7d209a4249f2590cfaaf4c9;p=gedcom-parse.git diff --git a/doc/gom.html b/doc/gom.html index a0829bc..857e745 100644 --- a/doc/gom.html +++ b/doc/gom.html @@ -22,12 +22,18 @@
-@@ -125,7 +131,8 @@ tags is. Each element of the linked list has:struct XXX* gom_get_first_XXX();
-struct XXX* gom_get_XXX_by_xref(char* xref);
+struct XXX* gom_get_XXX_by_xref(const char* xref);
NULL
if you're not interested. The function returns NULL
if an error occurred (e.g. if the given string is not a valid string for
the current locale); in that case the target data variable is not modified.+ + +Thestruct XXX* gom_new_XXX(const char* xref);
+int gom_delete_XXX(struct XXX* obj);
+
XXX
stands for one of the following: family,
individual, multimedia, note, repository, source, submitter, user_rec
.gom_delete_submission()
has no parameters (since there can be only one such object anyway).gom_write_file
when something is missing.struct xref_value
, the following function is available:+This function modifies thestruct xref_value* gom_set_xref(struct xref_value** data, const char* xref);
+
data
variable to point to the given xref
, taking care of unreferencing the old value, and referencing the new value. If an error occurs, NULL
is returned (and the data
variable is not changed). If xref is NULL
, the data is set to NULL
.struct xref_list
, the following functions are available:+The first function adds the givenstruct xref_list* gom_add_xref(struct xref_list** data, const char* xref);
+int gom_remove_xref(struct xref_list** data, const char* xref);
+int gom_move_xref(Gom_direction dir,struct xref_list** data, const char* xref);
+
xref
to the end of the data
list. The second function removes the given xref
from the data
list (if present; if not present an error is generated and 1 is returned).xref
up or down the data
list, depending on the dir
parameter, which can be:MOVE_UP
MOVE_DOWN
+This is the case forstruct XXX* gom_set_new_XXX(struct XXX** data);
+int gom_delete_XXX(struct XXX** data);
+
XXX
equal to address
, change_date
or place
. The first function creates a new substructure and assigns it to data
(NULL
is returned if there was already a value). The second function deletes the value from data
.change_date
structs there is also the following short-cut function, which updates the date and time directly:int gom_update_timestamp (struct change_date** obj, time_t tval);
+For struct members that are a list (as described here), the following functions are available:+ +This is the case for allstruct XXX* gom_add_new_XXX(struct XXX** data);
+int gom_remove_XXX(struct XXX** data, struct XXX* obj);
+int gom_move_XXX(Gom_direction dir, struct XXX** data, struct XXX* obj);
+
XXX
structs that have a next
and previous
member. The first function creates a new substructure and adds it to the end of the data
list. The second function deletes the object from the data
list (if present; if not present, an error is generated and 1 is returned).obj
up or down the data
list, depending on the dir
parameter, similar to the xref functions above.int gom_write_file (const char* filename, int* total_conv_fails);
+This writes the model to the file filename
. The second parameter can return the total number of conversion failures (pass NULL
if you're not interested). The functions in this section can be used before gom_write_file
to control some settings.int gom_header_update_timestamp (time_t tval);
+This sets the date
and time
fields of the header to the time indicated by tval
.
+ The function returns 0 on success, non-zero if an error occurred. Typically,
+the function would be used as follows, to set the current time in the timestamp:+int result;
+result = gom_header_update_timestamp(time(NULL));
+
$Id$@@ -183,4 +266,8 @@ the current locale); in that case the target data variable is not modified.
$Name$