OpenWalnut
1.5.0dev
|
A structure that holds all relevant information about the subject. More...
#include <WPersonalInformation.h>
Public Types | |
enum | Sex { male , female , unknown } |
Enumeration of possible sex types. More... | |
Public Member Functions | |
uint64_t | getSubjectID () const |
Returns the subjectID of the person. More... | |
void | setSubjectID (uint64_t subjectID) |
Sets the subjectID of the person. More... | |
std::string | getLastName () const |
Returns the last or family name of the person. More... | |
void | setLastName (std::string lastName) |
Sets the last or family name of the person if the object is no dummy anymore. More... | |
std::string | getMiddleName () const |
Returns the middle name of the person. More... | |
std::string | getFirstName () const |
Returns the first or given name of the person. More... | |
bool | operator== (WPersonalInformation info) const |
Returns if all members of the current WPersonalInformation are equal to those of info. More... | |
bool | operator!= (WPersonalInformation info) const |
Returns if not all members of the current WPersonalInformation are equal to those of info. More... | |
std::string | getCompleteName () const |
Returns the name of the subject. More... | |
Static Public Member Functions | |
static WPersonalInformation | createDummyInformation () |
Returns an empty dummy WPersonalInformation object. More... | |
Private Member Functions | |
WPersonalInformation () | |
Private default constructor to force the use of special function for dummy infos. More... | |
Private Attributes | |
uint64_t | m_subjectID |
Represents a globally unique identifier. More... | |
std::string | m_subjectCode |
Code for person. More... | |
std::string | m_lastName |
Last name or family of the person. More... | |
std::string | m_middleName |
Middle name of the person, if any. More... | |
std::string | m_firstName |
First name or given name of the person. More... | |
boost::posix_time::ptime | m_dateOfBirth |
Birthday of the person. More... | |
std::string | m_streetAndNumber |
street name and number of house in which person lives More... | |
std::string | m_zipCode |
ZIP code of the city in which person lives. More... | |
std::string | m_city |
city in which person lives More... | |
std::string | m_state |
state in which person lives More... | |
std::string | m_country |
country in which person lives More... | |
std::string | m_phone |
phone number of person More... | |
std::string | m_eMail |
e-mail adress of person More... | |
std::string | m_handicaps |
Description of the handicaps of the person. More... | |
Sex | m_sex |
The gender of the person. More... | |
char | m_categoryId |
not documented. More... | |
std::string | m_handedness |
preference for using right or left hand More... | |
std::string | m_notes |
Notes. More... | |
std::string | m_diagnostic |
The diagnosis for the person. More... | |
std::string | m_medication |
The medication of the person. More... | |
std::string | m_referringDoctor |
The doctor who reffered the person. More... | |
Friends | |
class | WPersonalInformationTest |
Only tests are allowed as friends. More... | |
A structure that holds all relevant information about the subject.
Definition at line 38 of file WPersonalInformation.h.
Enumeration of possible sex types.
Definition at line 48 of file WPersonalInformation.h.
|
private |
Private default constructor to force the use of special function for dummy infos.
Definition at line 36 of file WPersonalInformation.cpp.
Referenced by createDummyInformation().
|
static |
Returns an empty dummy WPersonalInformation object.
Definition at line 31 of file WPersonalInformation.cpp.
References WPersonalInformation().
Referenced by WDataHandlerTest::testAddSubjects(), WSubjectTest::TestConstructorWithInfo(), WPersonalInformationTest::testCreation(), WPersonalInformationTest::testEquality(), WSubjectTest::testGetName(), WPersonalInformationTest::testGetSubjectID(), WPersonalInformationTest::testInequality(), WSubjectTest::testInstantiationWithName(), WDataHandlerTest::testRemoveSubjects(), WPersonalInformationTest::testSetSubjectID(), and WDataHandler::WDataHandler().
std::string WPersonalInformation::getCompleteName | ( | ) | const |
Returns the name of the subject.
This is a concatenation of first, middle and last name.
Definition at line 77 of file WPersonalInformation.cpp.
References getFirstName(), getLastName(), and getMiddleName().
Referenced by WSubject::getName().
std::string WPersonalInformation::getFirstName | ( | ) | const |
Returns the first or given name of the person.
Definition at line 93 of file WPersonalInformation.cpp.
References m_firstName.
Referenced by getCompleteName().
std::string WPersonalInformation::getLastName | ( | ) | const |
Returns the last or family name of the person.
Definition at line 72 of file WPersonalInformation.cpp.
References m_lastName.
Referenced by getCompleteName(), and WSubjectTest::testGetName().
std::string WPersonalInformation::getMiddleName | ( | ) | const |
Returns the middle name of the person.
Definition at line 88 of file WPersonalInformation.cpp.
References m_middleName.
Referenced by getCompleteName().
uint64_t WPersonalInformation::getSubjectID | ( | ) | const |
Returns the subjectID of the person.
This is zero for dummy information.
Definition at line 61 of file WPersonalInformation.cpp.
References m_subjectID.
bool WPersonalInformation::operator!= | ( | WPersonalInformation | info | ) | const |
Returns if not all members of the current WPersonalInformation are equal to those of info.
info | the WPersonalInformation to compare with |
Definition at line 123 of file WPersonalInformation.cpp.
bool WPersonalInformation::operator== | ( | WPersonalInformation | info | ) | const |
Returns if all members of the current WPersonalInformation are equal to those of info.
info | the WPersonalInformation to compare with |
Definition at line 98 of file WPersonalInformation.cpp.
References m_categoryId, m_city, m_country, m_dateOfBirth, m_diagnostic, m_eMail, m_firstName, m_handedness, m_handicaps, m_lastName, m_medication, m_middleName, m_notes, m_phone, m_referringDoctor, m_sex, m_state, m_streetAndNumber, m_subjectCode, m_subjectID, and m_zipCode.
void WPersonalInformation::setLastName | ( | std::string | lastName | ) |
Sets the last or family name of the person if the object is no dummy anymore.
lastName | the new last name |
Definition at line 82 of file WPersonalInformation.cpp.
References m_lastName, and m_subjectID.
Referenced by WDataHandlerTest::testAddSubjects(), WSubjectTest::testGetName(), and WDataHandlerTest::testRemoveSubjects().
void WPersonalInformation::setSubjectID | ( | uint64_t | subjectID | ) |
Sets the subjectID of the person.
This must be non-zero as changed information is not considered dummy anymore.
subjectID | New globally unique identifier |
Definition at line 66 of file WPersonalInformation.cpp.
References m_subjectID.
Referenced by WDataHandlerTest::testAddSubjects(), WSubjectTest::testGetName(), and WDataHandlerTest::testRemoveSubjects().
|
friend |
Only tests are allowed as friends.
Definition at line 43 of file WPersonalInformation.h.
|
private |
|
private |
city in which person lives
Definition at line 142 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
country in which person lives
Definition at line 144 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
Birthday of the person.
Definition at line 139 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
The diagnosis for the person.
Definition at line 153 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
e-mail adress of person
Definition at line 146 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
First name or given name of the person.
Definition at line 138 of file WPersonalInformation.h.
Referenced by getFirstName(), and operator==().
|
private |
preference for using right or left hand
Definition at line 151 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
Description of the handicaps of the person.
Definition at line 147 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
Last name or family of the person.
Definition at line 136 of file WPersonalInformation.h.
Referenced by getLastName(), operator==(), setLastName(), WPersonalInformationTest::testEquality(), and WPersonalInformationTest::testInequality().
|
private |
The medication of the person.
Definition at line 154 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
Middle name of the person, if any.
Definition at line 137 of file WPersonalInformation.h.
Referenced by getMiddleName(), and operator==().
|
private |
|
private |
phone number of person
Definition at line 145 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
The doctor who reffered the person.
Definition at line 155 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
The gender of the person.
Definition at line 148 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
state in which person lives
Definition at line 143 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
street name and number of house in which person lives
Definition at line 140 of file WPersonalInformation.h.
Referenced by operator==().
|
private |
|
private |
Represents a globally unique identifier.
Definition at line 134 of file WPersonalInformation.h.
Referenced by getSubjectID(), operator==(), setLastName(), setSubjectID(), WPersonalInformationTest::testEquality(), and WPersonalInformationTest::testInequality().
|
private |
ZIP code of the city in which person lives.
Definition at line 141 of file WPersonalInformation.h.
Referenced by operator==().