1(* $Id: gwdb.mli,v 5.102 2007-03-02 11:44:13 ddr Exp $ *) 2(* Copyright (c) 1998-2007 INRIA *) 3 4open Adef; 5 6type istr = 'abstract; 7 8type person = 'abstract; 9type family = 'abstract; 10 11type relation = Def.gen_relation iper istr; 12type title = Def.gen_title istr; 13 14type string_person_index = 'abstract; 15 16type base = 'abstract; 17 18value open_base : string -> base; 19value close_base : base -> unit; 20 21value eq_istr : istr -> istr -> bool; 22value is_empty_string : istr -> bool; 23value is_quest_string : istr -> bool; 24value empty_person : base -> iper -> person; 25 26value get_access : person -> Def.access; 27value get_aliases : person -> list istr; 28value get_baptism : person -> codate; 29value get_baptism_place : person -> istr; 30value get_baptism_src : person -> istr; 31value get_birth : person -> codate; 32value get_birth_place : person -> istr; 33value get_birth_src : person -> istr; 34value get_burial : person -> Def.burial; 35value get_burial_place : person -> istr; 36value get_burial_src : person -> istr; 37value get_death : person -> Def.death; 38value get_death_place : person -> istr; 39value get_death_src : person -> istr; 40value get_first_name : person -> istr; 41value get_first_names_aliases : person -> list istr; 42value get_image : person -> istr; 43value get_key_index : person -> iper; 44value get_notes : person -> istr; 45value get_occ : person -> int; 46value get_occupation : person -> istr; 47value get_psources : person -> istr; 48value get_public_name : person -> istr; 49value get_qualifiers : person -> list istr; 50value get_related : person -> list iper; 51value get_rparents : person -> list relation; 52value get_sex : person -> Def.sex; 53value get_surname : person -> istr; 54value get_surnames_aliases : person -> list istr; 55value get_titles : person -> list title; 56 57value get_parents : person -> option ifam; 58value get_consang : person -> Adef.fix; 59 60value get_family : person -> array ifam; 61 62value gen_person_of_person : person -> Def.gen_person iper istr; 63 64value get_comment : family -> istr; 65value get_divorce : family -> Def.divorce; 66value get_fsources : family -> istr; 67value get_marriage : family -> codate; 68value get_marriage_place : family -> istr; 69value get_marriage_src : family -> istr; 70value get_origin_file : family -> istr; 71value get_relation : family -> Def.relation_kind; 72value get_witnesses : family -> array iper; 73 74value get_father : family -> iper; 75value get_mother : family -> iper; 76value get_parent_array : family -> array iper; 77 78value get_children : family -> array iper; 79 80value gen_family_of_family : family -> Def.gen_family iper istr; 81value gen_couple_of_couple : family -> Def.gen_couple iper; 82value gen_descend_of_descend : family -> Def.gen_descend iper; 83 84value person_of_gen_person : 85 base -> 86 (Def.gen_person iper istr * Def.gen_ascend ifam * Def.gen_union ifam) -> 87 person; 88 89value family_of_gen_family : 90 base -> 91 (Def.gen_family iper istr * Def.gen_couple iper * Def.gen_descend iper) -> 92 family; 93 94value poi : base -> iper -> person; 95value foi : base -> ifam -> family; 96value sou : base -> istr -> string; 97 98value nb_of_persons : base -> int; 99value nb_of_families : base -> int; 100 101value patch_person : base -> iper -> Def.gen_person iper istr -> unit; 102value patch_ascend : base -> iper -> Def.gen_ascend ifam -> unit; 103value patch_union : base -> iper -> Def.gen_union ifam -> unit; 104value patch_family : base -> ifam -> Def.gen_family iper istr -> unit; 105value patch_descend : base -> ifam -> Def.gen_descend iper -> unit; 106value patch_couple : base -> ifam -> Def.gen_couple iper -> unit; 107 108value patch_name : base -> string -> iper -> unit; 109value patch_key : base -> iper -> string -> string -> int -> unit; 110value delete_key : base -> string -> string -> int -> unit; 111value insert_string : base -> string -> istr; 112value commit_patches : base -> unit; 113value commit_notes : base -> string -> string -> unit; 114value is_patched_person : base -> iper -> bool; 115value patched_ascends : base -> list iper; 116 117value delete_family : base -> ifam -> unit; 118value is_deleted_family : family -> bool; 119 120value person_of_key : base -> string -> string -> int -> option iper; 121value persons_of_name : base -> string -> list iper; 122value persons_of_first_name : base -> string_person_index; 123value persons_of_surname : base -> string_person_index; 124 125value spi_first : string_person_index -> string -> istr; 126 (* first [first/sur]name starting with that string *) 127value spi_next : string_person_index -> istr -> bool -> (istr * int); 128 (* next [first/sur]name by alphabetical order *) 129value spi_find : string_person_index -> istr -> list iper; 130 (* all persons having that [first/sur]name *) 131 132value base_visible_get : base -> (person -> bool) -> int -> bool; 133value base_visible_write : base -> unit; 134value base_particles : base -> list string; 135value base_strings_of_first_name : base -> string -> list istr; 136value base_strings_of_surname : base -> string -> list istr; 137 138value load_ascends_array : base -> unit; 139value load_unions_array : base -> unit; 140value load_couples_array : base -> unit; 141value load_descends_array : base -> unit; 142value load_strings_array : base -> unit; 143 144value persons_array : 145 base -> 146 (int -> Def.gen_person iper istr * 147 int -> Def.gen_person iper istr -> unit); 148value ascends_array : 149 base -> 150 (int -> option ifam * 151 int -> Adef.fix * 152 int -> Adef.fix -> unit * 153 option (array Adef.fix)); 154 155value base_notes_read : base -> string -> string; 156value base_notes_read_first_line : base -> string -> string; 157value base_notes_are_empty : base -> string -> bool; 158value base_notes_origin_file : base -> string; 159value base_notes_dir : base -> string; 160value base_wiznotes_dir : base -> string; 161 162value gen_person_misc_names : 163 base -> Def.gen_person iper istr -> 164 (Def.gen_person iper istr -> list (Def.gen_title istr)) -> list string; 165 166value person_misc_names : 167 base -> person -> (person -> list title) -> list string; 168value nobtit : 169 base -> Lazy.t (list string) -> Lazy.t (list string) -> person -> 170 list title; 171 172value p_first_name : base -> person -> string; 173value p_surname : base -> person -> string; 174 175value date_of_last_change : base -> float; 176 177(**/**) 178(** For database builders *) 179 180value base_of_base1 : Dbdisk.dsk_base -> base; 181value dsk_person_of_person : person -> Dbdisk.dsk_person; 182 183value apply_base1 : base -> (Dbdisk.dsk_base -> unit) -> unit; 184value apply_base2 : base -> (Db2disk.db2 -> unit) -> unit; 185