-
Notifications
You must be signed in to change notification settings - Fork 0
/
Person.h
70 lines (58 loc) · 1.09 KB
/
Person.h
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
#ifndef XAMINE_PERSON_H_
#define XAMINE_PERSON_H_
#include <string>
using namespace std;
namespace Xamine {
/**
* Represents a person who participates in an exam.
*/
class Person {
public:
/**
* Initialize Person without name.
*/
Person() {
}
/**
* Initialize person with name.
* \param name Name of the person
*/
Person(const char *name) :
m_name(name)
{
}
/**
* Initialize person with name.
* \param name Name of the person
*/
Person(const string &name) :
m_name(name)
{
}
/**
* Returns name of the person.
* \return Name of the person
*/
const string &getName() const {
return m_name;
}
/**
* Sets the name of the person.
* \param name Name of the person
*/
void setName(string name) {
m_name = name;
}
/**
* Sets the name of the person.
* \param name Name of the person
*/
void setName(const char *name) {
m_name = string(name);
}
private:
//! Name of the person
string m_name;
};
}
#endif