add death date

This commit is contained in:
vrd
2022-09-17 20:44:44 +03:00
parent 1bf0a7f6a4
commit f69d0cbc2f
8 changed files with 43 additions and 28 deletions
+9 -6
View File
@@ -30,23 +30,26 @@ public:
template <class Str>
Tree(Str&& Name) : treeName(std::forward<Str>(Name)), numPeople(0) {}
/*Tree(const Tree&);
Tree& operator= (const Tree& other);
~Tree();*/
Tree& operator= (const Tree& other);*/
Tree operator+ (const Tree& other);
Tree operator- (const Tree& other);
Tree& operator+= (const Tree& other);
Tree& operator-= (const Tree& other);
void rename(const char* newName);
void rename(const char* newName);
unsigned findId(const char*, const short year=0, const unsigned char month=0, const unsigned char day=0)const;
unsigned findOldestAncestor(const unsigned &id, const bool &sex = 0)const;//
unsigned findCommonAncestor(const unsigned firstId, const unsigned secondId)const; //oldest common ancestor ID
unsigned findCommonAncestor(const unsigned firstId, const unsigned secondId)const; //oldest common ancestor ID
void saveTree()const;//
bool loadTree();
void addPerson(const char *name, BirthTime birth, bool isMale, unsigned father = Nobody, unsigned mother = Nobody);
bool loadTree();
void addPerson(const char *name, EventTime birth, bool isMale, unsigned father = Nobody, unsigned mother = Nobody);
bool addRelation(const char* firstName, const Relation, const char* secondName); //Adds a new relation or edits an old one. 0 - failure 1 - success
bool addRelation(const unsigned firstId, const Relation, const unsigned secondId, bool opposite=0); //0 - failure 1 - success
void removePerson(const unsigned id); //Removes a member and the last one takes his ID
void removePerson(const char*, const short year = 0, const unsigned char month = 0, const unsigned char day = 0);
void removeRelation(const unsigned firstId, const unsigned secondId);