31 lines
679 B
C++
31 lines
679 B
C++
#pragma once
|
|
#include <fstream>
|
|
#include "common/basicTypes.h"
|
|
|
|
class Person
|
|
{
|
|
|
|
public:
|
|
Person() = default;
|
|
Person(const char* Name, unsigned char Day, unsigned char Monthay, short Year, bool Sex);
|
|
//
|
|
Person& operator=(const Person &other);
|
|
~Person();
|
|
|
|
bool operator==(const Person &other)const;
|
|
|
|
void save(std::ofstream &file)const;//
|
|
void load(std::ifstream &file);
|
|
void rename(const char* newName);
|
|
void print()const;
|
|
|
|
friend class Tree;
|
|
|
|
private:
|
|
char *name;
|
|
unsigned numRel; //Number of close relatives - mother, father, brother, sister, wife/husband, child, ex-wife/husband
|
|
unsigned char day, month; //Birth
|
|
short year;
|
|
bool isMale;
|
|
};
|