|
OpenWalnut
1.4.0
|
Container for all WDataSets belonging to one subject or patient. More...
#include <WSubject.h>
Public Types | |
| enum | { SUBJECT_UNKNOWN = 0 } |
| List of some standard subjects. More... | |
| typedef std::vector< boost::shared_ptr< WDataSet > > | DatasetContainerType |
| For shortening: a type defining a shared vector of WSubject pointers. More... | |
| typedef WSharedSequenceContainer< DatasetContainerType > | DatasetSharedContainerType |
| The alias for a shared container. More... | |
| typedef DatasetContainerType::iterator | DatasetIterator |
| The dataset iterator. More... | |
| typedef DatasetContainerType::const_iterator | DatasetConstIterator |
| The dataset const iterator. More... | |
Public Member Functions | |
| WSubject () | |
| Constructs a dummy subject. More... | |
| WSubject (WPersonalInformation personInfo) | |
| Allows one to give the subject information the person during construction. More... | |
| virtual | ~WSubject () |
| Destructs the subject. More... | |
| std::string | getName () const |
| Returns the name of the subject. More... | |
| WPersonalInformation | getPersonalInformation () const |
| Gives the personal information of a subject. More... | |
| void | addDataSet (boost::shared_ptr< WDataSet > dataset) |
| Insert a new dataset referenced by a pointer. More... | |
| void | removeDataSet (boost::shared_ptr< WDataSet > dataset) |
| Removes the specified dataset if it is in the set. More... | |
| void | clear () |
| Remove all datasets from the subjects. More... | |
| DatasetSharedContainerType::ReadTicket | getDatasets () const |
| Returns read-access to the dataset list. More... | |
| DatasetSharedContainerType::WriteTicket | getDatasetsForWriting () const |
| Returns write-access to the dataset list. More... | |
| boost::shared_ptr< WCondition > | getChangeCondition () const |
| This condition fires whenever the list of datasets changes, or one dataset got marked as "dirty" (threshold, opacity, ...). More... | |
| boost::shared_ptr< WCondition > | getListChangeCondition () const |
| This condition fires whenever the list of datasets changes. More... | |
Protected Attributes | |
| DatasetSharedContainerType | m_datasets |
| A container for all WDataSet. More... | |
| boost::shared_ptr< WConditionSet > | m_changeCondition |
| This condition set fires whenever one dataset gets dirty or the list of datasets changes. More... | |
| boost::shared_ptr< WConditionSet > | m_listChangeCondition |
| This condition set fires whenever the list of datasets changes. More... | |
Private Attributes | |
| WPersonalInformation | m_personalInfo |
| Information on the person represented by this WSubject. More... | |
Friends | |
| class | WSubjectTest |
| Only tests are allowed as friends. More... | |
Container for all WDataSets belonging to one subject or patient.
Definition at line 47 of file WSubject.h.
| typedef DatasetContainerType::const_iterator WSubject::DatasetConstIterator |
The dataset const iterator.
Definition at line 81 of file WSubject.h.
| typedef std::vector< boost::shared_ptr< WDataSet > > WSubject::DatasetContainerType |
For shortening: a type defining a shared vector of WSubject pointers.
Definition at line 66 of file WSubject.h.
| typedef DatasetContainerType::iterator WSubject::DatasetIterator |
The dataset iterator.
Definition at line 76 of file WSubject.h.
The alias for a shared container.
Definition at line 71 of file WSubject.h.
| WSubject::WSubject | ( | ) |
Constructs a dummy subject.
Definition at line 36 of file WSubject.cpp.
|
explicit |
Allows one to give the subject information the person during construction.
| personInfo | personal information object |
Definition at line 44 of file WSubject.cpp.
|
virtual |
Destructs the subject.
Removes all datasets from the list.
Definition at line 52 of file WSubject.cpp.
References clear().
| void WSubject::addDataSet | ( | boost::shared_ptr< WDataSet > | dataset | ) |
Insert a new dataset referenced by a pointer.
| dataset | a pointer to the dataset that will be added |
Definition at line 67 of file WSubject.cpp.
References m_changeCondition, m_datasets, m_listChangeCondition, and WSharedSequenceContainer< S >::push_back().
Referenced by WSubjectTest::testAddGetDataSet(), and WSubjectTest::testGetNumberOfDataSet().
| void WSubject::clear | ( | ) |
Remove all datasets from the subjects.
Definition at line 90 of file WSubject.cpp.
References WSharedObject< T >::getWriteTicket(), m_datasets, and m_listChangeCondition.
Referenced by ~WSubject().
| boost::shared_ptr< WCondition > WSubject::getChangeCondition | ( | ) | const |
This condition fires whenever the list of datasets changes, or one dataset got marked as "dirty" (threshold, opacity, ...).
Definition at line 111 of file WSubject.cpp.
References m_changeCondition.
| WSubject::DatasetSharedContainerType::ReadTicket WSubject::getDatasets | ( | ) | const |
Returns read-access to the dataset list.
As long as the returned ticket exists, the list of datasets can't be changed by others.
Definition at line 101 of file WSubject.cpp.
References WSharedObject< T >::getReadTicket(), and m_datasets.
Referenced by WSubjectTest::testAddGetDataSet().
| WSubject::DatasetSharedContainerType::WriteTicket WSubject::getDatasetsForWriting | ( | ) | const |
Returns write-access to the dataset list.
As long as the returned ticket exists, the list of datasets can't be changed by others.
Definition at line 106 of file WSubject.cpp.
References WSharedObject< T >::getWriteTicket(), and m_datasets.
| boost::shared_ptr< WCondition > WSubject::getListChangeCondition | ( | ) | const |
This condition fires whenever the list of datasets changes.
Definition at line 116 of file WSubject.cpp.
References m_listChangeCondition.
| std::string WSubject::getName | ( | ) | const |
Returns the name of the subject.
See WPersonalInformation for details on the name.
Definition at line 57 of file WSubject.cpp.
References WPersonalInformation::getCompleteName(), and m_personalInfo.
Referenced by WSubjectTest::testGetName().
| WPersonalInformation WSubject::getPersonalInformation | ( | ) | const |
Gives the personal information of a subject.
Definition at line 62 of file WSubject.cpp.
References m_personalInfo.
| void WSubject::removeDataSet | ( | boost::shared_ptr< WDataSet > | dataset | ) |
Removes the specified dataset if it is in the set.
| dataset | the dataset to remove. |
Definition at line 75 of file WSubject.cpp.
References WSharedObject< T >::getWriteTicket(), m_changeCondition, m_datasets, and m_listChangeCondition.
|
friend |
Only tests are allowed as friends.
Definition at line 52 of file WSubject.h.
|
protected |
This condition set fires whenever one dataset gets dirty or the list of datasets changes.
Definition at line 170 of file WSubject.h.
Referenced by addDataSet(), getChangeCondition(), and removeDataSet().
|
protected |
A container for all WDataSet.
Definition at line 165 of file WSubject.h.
Referenced by addDataSet(), clear(), getDatasets(), getDatasetsForWriting(), removeDataSet(), WSubjectTest::testAddGetDataSet(), and WSubjectTest::testGetNumberOfDataSet().
|
protected |
This condition set fires whenever the list of datasets changes.
Definition at line 175 of file WSubject.h.
Referenced by addDataSet(), clear(), getListChangeCondition(), and removeDataSet().
|
private |
Information on the person represented by this WSubject.
Definition at line 178 of file WSubject.h.
Referenced by getName(), getPersonalInformation(), and WSubjectTest::TestConstructorWithInfo().
1.8.9.1