-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanager.hpp
95 lines (76 loc) · 1.77 KB
/
manager.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef _MANAGER_HPP_
#define _MANAGER_HPP_
#include "defines.hpp"
#include <fstream>
#include <iostream>
#include <set>
namespace manager
{
class date
{
public:
u_int _d = 0;
u_int _m = 0;
u_int _Y = 0;
};
std::ostream& operator<<(std::ostream &os, const manager::date &date);
class entry
{
public:
u_int _code = 0;
virtual void read(char * bufefr);
virtual void write(char * buffer);
virtual u_int size();
virtual void print(std::ostream &os) const;
private:
const u_int _base_size = 4;
};
std::ostream& operator<<(std::ostream &os, const manager::entry &entry);
class project : public entry
{
public:
void read(char * buffer);
void write(char * buffer);
u_int size();
void print(std::ostream &os) const;
std::string _name;
std::set<u_int> _partners;
private:
const u_int _base_size = 4;
};
enum priority
{
lowest = 0,
low = 1,
high = 2,
highest = 3
};
class task : public entry
{
public:
void read(char * buffer);
void write(char * buffer);
u_int size();
void print(std::ostream &os) const;
std::string _description;
u_int _project;
u_int _partner;
manager::date _dead_line;
manager::priority _priority;
private:
const u_int _base_size = 23;
};
class partner : public entry
{
public:
void read(char * buffer);
void write(char * buffer);
u_int size();
void print(std::ostream &os) const;
std::string _name;
std::string _email;
private:
const u_int _base_size = 4;
};
}
#endif