OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
WPersonalInformation Class Reference

A structure that holds all relevant information about the subject. More...

#include <WPersonalInformation.h>

+ Collaboration diagram for WPersonalInformation:

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...
 

Detailed Description

A structure that holds all relevant information about the subject.

Definition at line 38 of file WPersonalInformation.h.

Member Enumeration Documentation

◆ Sex

Enumeration of possible sex types.

Definition at line 48 of file WPersonalInformation.h.

Constructor & Destructor Documentation

◆ WPersonalInformation()

WPersonalInformation::WPersonalInformation ( )
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().

+ Here is the caller graph for this function:

Member Function Documentation

◆ createDummyInformation()

WPersonalInformation WPersonalInformation::createDummyInformation ( )
static

◆ getCompleteName()

std::string WPersonalInformation::getCompleteName ( ) const

Returns the name of the subject.

This is a concatenation of first, middle and last name.

Returns
the name of the subject.

Definition at line 77 of file WPersonalInformation.cpp.

References getFirstName(), getLastName(), and getMiddleName().

Referenced by WSubject::getName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFirstName()

std::string WPersonalInformation::getFirstName ( ) const

Returns the first or given name of the person.

Returns
first name

Definition at line 93 of file WPersonalInformation.cpp.

References m_firstName.

Referenced by getCompleteName().

+ Here is the caller graph for this function:

◆ getLastName()

std::string WPersonalInformation::getLastName ( ) const

Returns the last or family name of the person.

Returns
family name

Definition at line 72 of file WPersonalInformation.cpp.

References m_lastName.

Referenced by getCompleteName(), and WSubjectTest::testGetName().

+ Here is the caller graph for this function:

◆ getMiddleName()

std::string WPersonalInformation::getMiddleName ( ) const

Returns the middle name of the person.

Returns
middle name

Definition at line 88 of file WPersonalInformation.cpp.

References m_middleName.

Referenced by getCompleteName().

+ Here is the caller graph for this function:

◆ getSubjectID()

uint64_t WPersonalInformation::getSubjectID ( ) const

Returns the subjectID of the person.

This is zero for dummy information.

Returns
subject id number

Definition at line 61 of file WPersonalInformation.cpp.

References m_subjectID.

◆ operator!=()

bool WPersonalInformation::operator!= ( WPersonalInformation  info) const

Returns if not all members of the current WPersonalInformation are equal to those of info.

Parameters
infothe WPersonalInformation to compare with
Returns
true if the personal informations differ

Definition at line 123 of file WPersonalInformation.cpp.

◆ operator==()

bool WPersonalInformation::operator== ( WPersonalInformation  info) const

Returns if all members of the current WPersonalInformation are equal to those of info.

Parameters
infothe WPersonalInformation to compare with
Returns
true if the information are equal

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.

◆ setLastName()

void WPersonalInformation::setLastName ( std::string  lastName)

Sets the last or family name of the person if the object is no dummy anymore.

Parameters
lastNamethe 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().

+ Here is the caller graph for this function:

◆ setSubjectID()

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.

Parameters
subjectIDNew globally unique identifier

Definition at line 66 of file WPersonalInformation.cpp.

References m_subjectID.

Referenced by WDataHandlerTest::testAddSubjects(), WSubjectTest::testGetName(), and WDataHandlerTest::testRemoveSubjects().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ WPersonalInformationTest

friend class WPersonalInformationTest
friend

Only tests are allowed as friends.

Definition at line 43 of file WPersonalInformation.h.

Member Data Documentation

◆ m_categoryId

char WPersonalInformation::m_categoryId
private

not documented.

Definition at line 150 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_city

std::string WPersonalInformation::m_city
private

city in which person lives

Definition at line 142 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_country

std::string WPersonalInformation::m_country
private

country in which person lives

Definition at line 144 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_dateOfBirth

boost::posix_time::ptime WPersonalInformation::m_dateOfBirth
private

Birthday of the person.

Definition at line 139 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_diagnostic

std::string WPersonalInformation::m_diagnostic
private

The diagnosis for the person.

Definition at line 153 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_eMail

std::string WPersonalInformation::m_eMail
private

e-mail adress of person

Definition at line 146 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_firstName

std::string WPersonalInformation::m_firstName
private

First name or given name of the person.

Definition at line 138 of file WPersonalInformation.h.

Referenced by getFirstName(), and operator==().

◆ m_handedness

std::string WPersonalInformation::m_handedness
private

preference for using right or left hand

Definition at line 151 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_handicaps

std::string WPersonalInformation::m_handicaps
private

Description of the handicaps of the person.

Definition at line 147 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_lastName

std::string WPersonalInformation::m_lastName
private

◆ m_medication

std::string WPersonalInformation::m_medication
private

The medication of the person.

Definition at line 154 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_middleName

std::string WPersonalInformation::m_middleName
private

Middle name of the person, if any.

Definition at line 137 of file WPersonalInformation.h.

Referenced by getMiddleName(), and operator==().

◆ m_notes

std::string WPersonalInformation::m_notes
private

Notes.

Definition at line 152 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_phone

std::string WPersonalInformation::m_phone
private

phone number of person

Definition at line 145 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_referringDoctor

std::string WPersonalInformation::m_referringDoctor
private

The doctor who reffered the person.

Definition at line 155 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_sex

Sex WPersonalInformation::m_sex
private

The gender of the person.

Definition at line 148 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_state

std::string WPersonalInformation::m_state
private

state in which person lives

Definition at line 143 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_streetAndNumber

std::string WPersonalInformation::m_streetAndNumber
private

street name and number of house in which person lives

Definition at line 140 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_subjectCode

std::string WPersonalInformation::m_subjectCode
private

Code for person.

Definition at line 135 of file WPersonalInformation.h.

Referenced by operator==().

◆ m_subjectID

uint64_t WPersonalInformation::m_subjectID
private

◆ m_zipCode

std::string WPersonalInformation::m_zipCode
private

ZIP code of the city in which person lives.

Definition at line 141 of file WPersonalInformation.h.

Referenced by operator==().


The documentation for this class was generated from the following files: