new tree file format

This commit is contained in:
vrd
2023-02-21 22:35:45 +02:00
parent ee152edbad
commit 78408bd223
11 changed files with 286 additions and 77 deletions
+5 -7
View File
@@ -20,10 +20,10 @@ struct EventTime
I8 minute; //0-59
};
enum Genders: U8
enum Sex: U8
{
FEMALE = 0,
MALE
M = 0,
F
};
enum BoxColors: U8 {
@@ -41,7 +41,7 @@ class Person
{
public:
Person() = default;
Person(const char* name, EventTime birth={}, bool sex=true, EventTime death={});
Person(const char* name, EventTime birth={}, Sex=M, EventTime death={});
/* Person(Person&&) = default; */
/* Person& operator=(Person&&) = default; */
/* Person& operator=(const Person&) = default; */
@@ -54,7 +54,6 @@ public:
void displayInfo() const;
bool isMale() const;
const EventTime& birth() const { return birth_; };
U16 boxWidth() const;
@@ -63,9 +62,8 @@ public:
returns the width of the box*/
void draw(I16 drawY, I16 drawX, bool selected, bool hasSpouse, bool isSpouse, bool hasChildren=false) const;
private:
std::string name_;
EventTime birth_;
bool isMale_;
Sex sex;
EventTime death_;
};