use typedefed types, BirthTime
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include "common/basicTypes.h"
|
||||
#include "common/basicTypes.h"
|
||||
|
||||
struct BirthTime
|
||||
{
|
||||
static const U16 UNKNOWN = 0;
|
||||
/*explicit*/ BirthTime(U16 Year=UNKNOWN, U8 Month=UNKNOWN, U8 Day=UNKNOWN, U8 Hour=UNKNOWN, U8 Minute=UNKNOWN);
|
||||
void print() const;
|
||||
|
||||
U16 year;
|
||||
U8 month, day, hour, minute;
|
||||
};
|
||||
|
||||
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();
|
||||
Person(const char* Name, BirthTime Birth, bool Sex);
|
||||
|
||||
bool operator==(const Person &other)const;
|
||||
|
||||
@@ -22,9 +31,8 @@ public:
|
||||
friend class Tree;
|
||||
|
||||
private:
|
||||
char *name;
|
||||
std::string name;
|
||||
unsigned numRel; //Number of close relatives - mother, father, brother, sister, wife/husband, child, ex-wife/husband
|
||||
unsigned char day, month; //Birth
|
||||
short year;
|
||||
BirthTime birth;
|
||||
bool isMale;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user