new tree file format
This commit is contained in:
+5
-4
@@ -44,12 +44,13 @@ public:
|
||||
|
||||
void rename(const char* newName);
|
||||
|
||||
person_id findId(const char* name, bool=true) const;
|
||||
person_id findOldestAncestor(person_id, bool sex = 0) const;//
|
||||
person_id findId(const char* name) const{return Nobody;} /* todo */
|
||||
person_id findId(const char* name, Sex) const;
|
||||
person_id findOldestAncestor(person_id, Sex) const;//
|
||||
//oldest common ancestor ID, a person is considerd an ancestor of himself
|
||||
person_id findCommonAncestor(person_id first, person_id second) const;
|
||||
RelType findRelation(person_id first, person_id second) const;
|
||||
person_id findParent(person_id child, bool isParentMale) const;
|
||||
person_id findParent(person_id child, Sex parentSex) const;
|
||||
person_id findSpouse(person_id person) const;
|
||||
std::vector<person_id> findChildren(person_id person) const;
|
||||
std::vector<person_id> findChildren(person_id person, person_id exclude) const;
|
||||
@@ -57,7 +58,7 @@ public:
|
||||
void saveToFile()const;//
|
||||
bool loadFromFile();
|
||||
|
||||
void addPerson(const char* name, bool isMale, person_id father=Nobody, person_id mother=Nobody, EventTime birth={}, EventTime death={});
|
||||
void addPerson(const char* name, Sex sex, person_id father=Nobody, person_id mother=Nobody, EventTime birth={}, EventTime death={});
|
||||
bool addRelation(const char* firstName, RelType, const char* secondName); //Adds a new relation or edits an old one. 0 - failure 1 - success
|
||||
bool addRelation(person_id first, RelType, person_id second, bool update=true); //0 - failure 1 - success
|
||||
|
||||
|
||||
Reference in New Issue
Block a user