delegate draw to persons

This commit is contained in:
vrd
2022-12-24 17:59:54 +02:00
parent 5e9d2d8501
commit cd221476a5
4 changed files with 47 additions and 22 deletions
+13 -2
View File
@@ -20,22 +20,33 @@ struct EventTime
I8 minute; //0-59
};
enum { BOX_HEIGHT = 5 };
class Person
{
public:
Person() = default;
Person(const char* name, EventTime birth, bool sex, EventTime death);
/* Person(Person&&) = default; */
/* Person& operator=(Person&&) = default; */
/* Person& operator=(const Person&) = default; */
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;
void print() const;
/* Draw a Person's box on the terminal
drawY,drawX - the coordinates where to draw
returns the width of the box*/
void draw(U16 drawY, U16 drawX) const;
WINDOW* createPad()const;
/* staitc constexpr U8 BOX_HEIGHT = 5; */
friend class Tree;
private: