X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Fgom.html;h=857e7452eaa63b7b539fffdebdc94ef05e9f33ab;hb=e64a3ac05141381579c407b779d6db66ecdb367d;hp=4ab405a46e50422fdcca56d0358c7863772566b7;hpb=ae72fcc7930fb4dcb554dac037610d5905b7b418;p=gedcom-parse.git diff --git a/doc/gom.html b/doc/gom.html index 4ab405a..857e745 100644 --- a/doc/gom.html +++ b/doc/gom.html @@ -24,7 +24,12 @@
@@ -126,11 +131,7 @@ 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.