OpenWalnut
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
src
core
dataHandler
WPersonalInformation.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WPERSONALINFORMATION_H
26
#define WPERSONALINFORMATION_H
27
28
#include <stdint.h>
29
30
#include <string>
31
#ifndef Q_MOC_RUN
32
#include <boost/date_time/posix_time/posix_time_types.hpp>
33
#endif
34
35
36
/**
37
* A structure that holds all relevant information about the subject.
38
* \ingroup dataHandler
39
*/
40
class
WPersonalInformation
// NOLINT
41
{
42
/**
43
* Only tests are allowed as friends.
44
*/
45
friend
class
WPersonalInformationTest
;
46
public
:
47
/**
48
* Enumeration of possible sex types.
49
*/
50
enum
Sex
51
{
52
male,
53
female,
54
unknown
55
};
56
57
/**
58
* Returns an empty dummy WPersonalInformation object.
59
*
60
* \return the dummy object
61
*/
62
static
WPersonalInformation
createDummyInformation
();
63
64
/**
65
* Returns the subjectID of the person. This is zero for dummy information.
66
*
67
* \return subject id number
68
*/
69
uint64_t
getSubjectID
()
const
;
70
71
/**
72
* Sets the subjectID of the person. This must be non-zero as changed information is not considered dummy anymore.
73
* \param subjectID New globally unique identifier
74
*/
75
void
setSubjectID
( uint64_t subjectID );
76
77
/**
78
* Returns the last or family name of the person.
79
*
80
* \return family name
81
*/
82
std::string
getLastName
()
const
;
83
84
/**
85
* Sets the last or family name of the person if the object is no dummy anymore.
86
* \param lastName the new last name
87
*/
88
void
setLastName
( std::string lastName );
89
90
/**
91
* Returns the middle name of the person.
92
*
93
* \return middle name
94
*/
95
std::string
getMiddleName
()
const
;
96
97
/**
98
* Returns the first or given name of the person.
99
*
100
* \return first name
101
*/
102
std::string
getFirstName
()
const
;
103
104
/**
105
* Returns if all members of the current WPersonalInformation are equal to those of info.
106
* \param info the WPersonalInformation to compare with
107
*
108
* \return true if the information are equal
109
*/
110
bool
operator==
(
WPersonalInformation
info )
const
;
111
112
/**
113
* Returns if not all members of the current WPersonalInformation are equal to those of info.
114
* \param info the WPersonalInformation to compare with
115
*
116
* \return true if the personal informations differ
117
*/
118
bool
operator!=
(
WPersonalInformation
info )
const
;
119
120
/**
121
* Returns the name of the subject. This is a concatenation of first, middle and last name.
122
*
123
* \return the name of the subject.
124
*/
125
std::string
getCompleteName
()
const
;
126
127
protected
:
128
private
:
129
/**
130
* Private default constructor to force the use of special function for dummy infos.
131
*/
132
WPersonalInformation
();
133
134
// TODO(wiebel): need getters and setters for all methods.
135
// TODO(wiebel): Should better be something like dotnet's System.Guid
136
uint64_t
m_subjectID
;
//!< Represents a globally unique identifier.
137
std::string
m_subjectCode
;
//!< Code for person
138
std::string
m_lastName
;
//!< Last name or family of the person.
139
std::string
m_middleName
;
//!< Middle name of the person, if any.
140
std::string
m_firstName
;
//!< First name or given name of the person.
141
boost::posix_time::ptime
m_dateOfBirth
;
//!< Birthday of the person.
142
std::string
m_streetAndNumber
;
//!< street name and number of house in which person lives
143
std::string
m_zipCode
;
//!< ZIP code of the city in which person lives
144
std::string
m_city
;
//!< city in which person lives
145
std::string
m_state
;
//!< state in which person lives
146
std::string
m_country
;
//!< country in which person lives
147
std::string
m_phone
;
//!< phone number of person
148
std::string
m_eMail
;
//!< e-mail adress of person
149
std::string
m_handicaps
;
//!< Description of the handicaps of the person.
150
Sex
m_sex
;
//!< The gender of the person.
151
// TODO(wiebel): Should better be something like dotnet's System.Nullable<byte>
152
char
m_categoryId
;
//!< not documented.
153
std::string
m_handedness
;
//!< preference for using right or left hand
154
std::string
m_notes
;
//!< Notes.
155
std::string
m_diagnostic
;
//!< The diagnosis for the person.
156
std::string
m_medication
;
//!< The medication of the person.
157
std::string
m_referringDoctor
;
//!< The doctor who reffered the person.
158
};
159
160
#endif // WPERSONALINFORMATION_H
WPersonalInformationTest
Tests for WPersonalInformation.
Definition:
WPersonalInformation_test.h:35
WPersonalInformation::m_phone
std::string m_phone
phone number of person
Definition:
WPersonalInformation.h:147
WPersonalInformation::createDummyInformation
static WPersonalInformation createDummyInformation()
Returns an empty dummy WPersonalInformation object.
Definition:
WPersonalInformation.cpp:31
WPersonalInformation::setSubjectID
void setSubjectID(uint64_t subjectID)
Sets the subjectID of the person.
Definition:
WPersonalInformation.cpp:66
WPersonalInformation::Sex
Sex
Enumeration of possible sex types.
Definition:
WPersonalInformation.h:50
WPersonalInformation::m_country
std::string m_country
country in which person lives
Definition:
WPersonalInformation.h:146
WPersonalInformation::m_city
std::string m_city
city in which person lives
Definition:
WPersonalInformation.h:144
WPersonalInformation::m_sex
Sex m_sex
The gender of the person.
Definition:
WPersonalInformation.h:150
WPersonalInformation::m_notes
std::string m_notes
Notes.
Definition:
WPersonalInformation.h:154
WPersonalInformation::m_referringDoctor
std::string m_referringDoctor
The doctor who reffered the person.
Definition:
WPersonalInformation.h:157
WPersonalInformation::setLastName
void setLastName(std::string lastName)
Sets the last or family name of the person if the object is no dummy anymore.
Definition:
WPersonalInformation.cpp:82
WPersonalInformation::m_subjectCode
std::string m_subjectCode
Code for person.
Definition:
WPersonalInformation.h:137
WPersonalInformation::m_state
std::string m_state
state in which person lives
Definition:
WPersonalInformation.h:145
WPersonalInformation::getCompleteName
std::string getCompleteName() const
Returns the name of the subject.
Definition:
WPersonalInformation.cpp:77
WPersonalInformation::m_dateOfBirth
boost::posix_time::ptime m_dateOfBirth
Birthday of the person.
Definition:
WPersonalInformation.h:141
WPersonalInformation::m_diagnostic
std::string m_diagnostic
The diagnosis for the person.
Definition:
WPersonalInformation.h:155
WPersonalInformation::m_middleName
std::string m_middleName
Middle name of the person, if any.
Definition:
WPersonalInformation.h:139
WPersonalInformation::operator!=
bool operator!=(WPersonalInformation info) const
Returns if not all members of the current WPersonalInformation are equal to those of info...
Definition:
WPersonalInformation.cpp:123
WPersonalInformation::m_firstName
std::string m_firstName
First name or given name of the person.
Definition:
WPersonalInformation.h:140
WPersonalInformation::m_lastName
std::string m_lastName
Last name or family of the person.
Definition:
WPersonalInformation.h:138
WPersonalInformation::m_zipCode
std::string m_zipCode
ZIP code of the city in which person lives.
Definition:
WPersonalInformation.h:143
WPersonalInformation::getMiddleName
std::string getMiddleName() const
Returns the middle name of the person.
Definition:
WPersonalInformation.cpp:88
WPersonalInformation::WPersonalInformation
WPersonalInformation()
Private default constructor to force the use of special function for dummy infos. ...
Definition:
WPersonalInformation.cpp:36
WPersonalInformation::m_streetAndNumber
std::string m_streetAndNumber
street name and number of house in which person lives
Definition:
WPersonalInformation.h:142
WPersonalInformation::m_subjectID
uint64_t m_subjectID
Represents a globally unique identifier.
Definition:
WPersonalInformation.h:136
WPersonalInformation::m_eMail
std::string m_eMail
e-mail adress of person
Definition:
WPersonalInformation.h:148
WPersonalInformation::operator==
bool operator==(WPersonalInformation info) const
Returns if all members of the current WPersonalInformation are equal to those of info.
Definition:
WPersonalInformation.cpp:98
WPersonalInformation::m_handedness
std::string m_handedness
preference for using right or left hand
Definition:
WPersonalInformation.h:153
WPersonalInformation::m_medication
std::string m_medication
The medication of the person.
Definition:
WPersonalInformation.h:156
WPersonalInformation
A structure that holds all relevant information about the subject.
Definition:
WPersonalInformation.h:40
WPersonalInformation::getLastName
std::string getLastName() const
Returns the last or family name of the person.
Definition:
WPersonalInformation.cpp:72
WPersonalInformation::m_categoryId
char m_categoryId
not documented.
Definition:
WPersonalInformation.h:152
WPersonalInformation::getFirstName
std::string getFirstName() const
Returns the first or given name of the person.
Definition:
WPersonalInformation.cpp:93
WPersonalInformation::getSubjectID
uint64_t getSubjectID() const
Returns the subjectID of the person.
Definition:
WPersonalInformation.cpp:61
WPersonalInformation::m_handicaps
std::string m_handicaps
Description of the handicaps of the person.
Definition:
WPersonalInformation.h:149
Generated by
1.8.9.1