From 2f0e54c1172a417b5a458aea67d7e78c39b37644 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 1 Sep 2002 14:11:57 +0000 Subject: [PATCH] Use XREF_ANY when the type of an xref is not defined yet (e.g. in associations). Added function gedcom_get_by_xref. --- doc/interface.html | 64 +++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/doc/interface.html b/doc/interface.html index 68cea05..5cc72cb 100644 --- a/doc/interface.html +++ b/doc/interface.html @@ -825,9 +825,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP
-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
STRING
@@ -915,9 +914,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP
-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
STRING
@@ -929,7 +927,14 @@ element start callback.
REC_INDI
- XREF_PTR(INDI)
+ XREF_PTR(FAM),
+XREF_PTR(INDI),
+XREF_PTR(NOTE),
+XREF_PTR(OBJE),
+XREF_PTR(REPO),
+XREF_PTR(SOUR),
+XREF_PTR(SUBM),
+XREF_PTR(SUBN)

@@ -1047,8 +1052,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
STRING
@@ -1064,10 +1069,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP
-
-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
DATE
@@ -1083,9 +1086,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP

-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
AGE
@@ -1101,9 +1103,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP

-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
STRING
@@ -1119,9 +1120,8 @@ element start callback.
ELT_SUB_INDIV_RESI,
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
- ELT_SUB_INDIV_ADOP

-
-
+ ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN
STRING
@@ -1466,6 +1466,7 @@ element start callback.
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN,
ELT_SUB_SOUR
NULL
@@ -1519,6 +1520,7 @@ element start callback.
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN,
ELT_SUB_LIO_BAPL,
ELT_SUB_LIO_SLGC,
ELT_SUB_LSS_SLGS,
@@ -1642,6 +1644,7 @@ element start callback.
ELT_SUB_INDIV_BIRT,
ELT_SUB_INDIV_GEN,
ELT_SUB_INDIV_ADOP,
+ELT_SUB_INDIV_EVEN,
ELT_SUB_LIO_BAPL,
ELT_SUB_LIO_SLGC,
ELT_SUB_LSS_SLGS,
@@ -2200,7 +2203,9 @@ be one of:
  • XREF_REPO
  • XREF_SOUR
  • XREF_SUBM
  • -
  • XREF_SUBN
  • +
  • XREF_SUBN
  • XREF_ANY (if the type is not known, see below)
    +
  • +
  • XREF_USER (for application-specific cross-references)
  • @@ -2211,6 +2216,10 @@ can be filled by the application with an object (of any type) that corresponds with the cross-reference, and then later extracted when the cross-reference is used or defined again in the file.  This relieves the application from the burden of maintaining the mapping between cross-references and objects.
    +
    +The value XREF_ANY is used when the type of the object is not +immediately known: it has to come from further information.  This is +the case in an association (ELT_SUB_ASSO): the type is then given by the TYPE subtag.

    The parser checks whether all cross-references that are used are defined (if not, an error is produced) and whether all cross-references that are @@ -2219,11 +2228,18 @@ the type of the cross-reference is the same on definition and use (if not, an error is produced).  The first two checks are done at the end of the parsing, because cross-references can be defined after their usage in GEDCOM.
    -
    +
    +An xref_value can also be retrieved by its key via the following function:
    + +
    struct xref_value* gedcom_get_by_xref (char *key)
    +
    +The function returns NULL if the given key isn't used.

    $Id$
    $Name$


    +
    +
    \ No newline at end of file -- 2.30.2