relation relative merge

This commit is contained in:
vrd
2022-12-28 14:19:44 +02:00
parent cc9b0ccc21
commit b3a2787fcd
6 changed files with 203 additions and 170 deletions
+33 -24
View File
@@ -15,33 +15,42 @@ int main()
cbreak(); /* get input instantly */
wnoutrefresh(stdscr); /* if not present the first real refresh is missed */
/*Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
Tree test1("Dechkovi"); //addTree Dechkovi addTree Karamanovi load 0 load 1 (to work with these example trees)
Tree test2("Karamanovi");
test1.addPerson("Rumen", 1968, 8, 9, 0);
test1.addPerson("Nadejda", 1972, 12, 15, 1);
test1.addRelation(0, Husband, 1);
test1.addPerson("Venelin", 1998, 6, 9, 0, 0, 1);
test1.addPerson("Vasil", 2001, 1, 16, 0, 0, 1);
test1.addRelation(2, Brother, 3);
test1.addPerson("Maria-Veronika", 2009, 9, 3, 1, 0, 1);
test1.addRelation(2, Brother, 4);
test1.addRelation(3, Brother, 4);
test1.addPerson("Rumen", true, Nobody, Nobody, {1968, 8, 9});
test1.addPerson("Nadejda", false, Nobody, Nobody, {1972, 12, 15});
/* test1.addRelation(0, Husband, 1); */
test1.addPerson("Venelin", true, 0, 1, {1998, 6, 9});
test1.addPerson("Vasil", true, 0, 1, {2001, 1, 16});
/* test1.addRelation(2, Brother, 3); */
/* test1.addPerson("Maria-Veronika", 2009, 9, 3, 1, 0, 1); */
/* test1.addRelation(2, Brother, 4); */
/* test1.addRelation(3, Brother, 4); */
test2.addPerson("Vasil Dimitrov", 1941, 5, 18, 0);
test2.addPerson("Maria", 0, 0, 0, 1);
test2.addRelation(0, Husband, 1);
test2.addPerson("Dimitar", 0, 0, 0, 0, 0, 1);
test2.addPerson("Nadejda", 1972, 12, 15, 1, 0, 1);
test2.addRelation(2, Brother, 3);
test2.addPerson("Branimira", 0, 0, 0, 1);
test2.addRelation(2, Husband, 4);
test2.addPerson("Ioan", 0, 0, 0, 0, 2, 4);
test2.addPerson("Rumiana", 0, 0, 0, 1, 2, 4);
test2.addRelation(5, Brother, 6);
test2.addPerson("Vasil Dimitrov", true, Nobody, Nobody, {1941, 5, 18});
test2.addPerson("Maria", false);
/* test2.addRelation(0, Husband, 1); */
test2.addPerson("Dimitar", true, 0, 1);
test2.addPerson("Nadejda", false, 0, 1, {1972, 12, 15});
/* test2.addRelation(2, Brother, 3); */
test2.addPerson("Branimira", false);
/* test2.addRelation(2, Husband, 4); */
test2.addPerson("Ioan", true, 2, 4);
test2.addPerson("Rumiana", false, 2, 4);
/* test2.addRelation(5, Brother, 6); */
test1.saveTree();
test2.saveTree();*/
test1.draw();
test2.draw();
/* (test1 + test2).draw(4); */
test1 += test2;
test1.draw(4);
test1.draw();
/* test1.saveTree(); */
/* test2.saveTree(); */
Tree firstTree("firstTree");
@@ -68,7 +77,7 @@ int main()
/* firstTree.print(); */
firstTree.draw();
firstTree.saveTree();
/* firstTree.saveTree(); */
/* firstTree.printRel(3); */
firstTree.printOldestAncestors(3);