relation change

This commit is contained in:
vrd
2022-12-27 20:07:56 +02:00
parent cd221476a5
commit cc9b0ccc21
8 changed files with 515 additions and 497 deletions
+11 -14
View File
@@ -7,18 +7,12 @@
enum Relation : U8
{
Invalid = 0,
Father,
Mother,
Son,
Daughter,
Brother,
Sister,
HalfBrother,
HalfSister,
Wife,
Husband,
ExWife,
ExHusband
Parent,
Child,
Sibling,
HalfSibling,
Spouse,
ExSpouse
};
const U32 Nobody = UINT_MAX; //Òîçè íîìåð ùå áúäå çàïàçeí çà ëèïñà íà âðúçêà/÷îâåê
@@ -26,6 +20,8 @@ const U32 Nobody = UINT_MAX; //Òîçè íîìåð ùå áúäå çàïàçeí
class Tree
{
public:
using person_id = U32;
Tree() = default;
template <class Str>
Tree(Str&& Name) : treeName(std::forward<Str>(Name)) {}
@@ -62,10 +58,11 @@ public:
void printMember(const unsigned id)const;
void printOldestAncestors(const unsigned id)const;//
unsigned gNumP()const;
private:
void commonAncestorRec(const unsigned &id, const Array<char> &visited)const;
/* draw a line of people starting from person with id
return the farthest X that will be drawn */
I16 drawLineRec(person_id id, I16 drawY, I16 drawX) const;
std::string treeName = "Unnamed";
unsigned numPeople = 0;