|
creaImageIO_lib
|
Descriptor of the structure of a Tree (number of levels, descriptors of each level, ...). More...
#include <creaImageIOTreeDescriptor.h>
Public Types | |
| typedef std::vector < LevelDescriptor > | LevelDescriptorListType |
| The type of LevelDescriptor container. More... | |
Public Member Functions | |
| Descriptor () | |
| Ctor : creates the mandatory level 0 descriptor called "Root". More... | |
| ~Descriptor () | |
| Destructor. More... | |
| void | LoadXML (const std::string &filename) |
| Loads from a xml description file. More... | |
| void | CreateDefault () |
| Creates the default descriptor. More... | |
| unsigned int | GetNumberOfLevels () |
| Returns the number of levels of the tree. More... | |
| const LevelDescriptor & | GetLevelDescriptor (int level) const |
| Returns the LevelDescriptor of a given level (const ref) More... | |
| const LevelDescriptor::AttributeDescriptorListType & | GetAttributeDescriptorList (int level, int type=0) const |
| type = 1 without ID and PATIENT_ID More... | |
| void | CopyAttributeDescriptorList (int level) |
| Copy the AttributeDescriptorList without ID tag. More... | |
| void | Add (const LevelDescriptor &) |
| Adds a LevelDescriptor at the end of the list. More... | |
| void | Add (const AttributeDescriptor &, int l) |
| Adds an AttributeDescriptor to level l. More... | |
| void | BuildAttributeMap (AttributeMapType &) const |
| Builds the key to value map of all the attributes of the tree. More... | |
| const LevelDescriptorListType & | GetLevelDescriptorList () const |
| Returns the list of tree levels (const) More... | |
| void | Clear () |
| Clears the Descriptor. More... | |
| void | createDescriptorfromFile (const std::string &i_file) |
| const std::string | isExist (const std::string i_attr) |
Private Member Functions | |
| void | CreateLevel0Descriptor () |
Private Attributes | |
| LevelDescriptorListType | mLevelDescriptorList |
Descriptor of the structure of a Tree (number of levels, descriptors of each level, ...).
Definition at line 49 of file creaImageIOTreeDescriptor.h.
| typedef std::vector<LevelDescriptor> creaImageIO::tree::Descriptor::LevelDescriptorListType |
The type of LevelDescriptor container.
Definition at line 95 of file creaImageIOTreeDescriptor.h.
| creaImageIO::tree::Descriptor::Descriptor | ( | ) |
Ctor : creates the mandatory level 0 descriptor called "Root".
Definition at line 57 of file creaImageIOTreeDescriptor.cpp.
References CreateLevel0Descriptor().

| creaImageIO::tree::Descriptor::~Descriptor | ( | ) |
| void creaImageIO::tree::Descriptor::Add | ( | const LevelDescriptor & | d | ) |
Adds a LevelDescriptor at the end of the list.
Definition at line 260 of file creaImageIOTreeDescriptor.cpp.
References mLevelDescriptorList.
Referenced by CreateDefault(), createDescriptorfromFile(), CreateLevel0Descriptor(), creaImageIO::SQLiteTreeHandler::DBCreate(), and creaImageIO::SQLiteTreeHandler::DBImportTreeDescription().

| void creaImageIO::tree::Descriptor::Add | ( | const AttributeDescriptor & | d, |
| int | l | ||
| ) |
Adds an AttributeDescriptor to level l.
Definition at line 268 of file creaImageIOTreeDescriptor.cpp.
References mLevelDescriptorList.
| void creaImageIO::tree::Descriptor::BuildAttributeMap | ( | AttributeMapType & | map | ) | const |
Builds the key to value map of all the attributes of the tree.
Definition at line 286 of file creaImageIOTreeDescriptor.cpp.
References GetLevelDescriptorList().
Referenced by creaImageIO::TreeHandlerImageAdder::AddFile(), creaImageIO::Synchronizer::AttributesMatch(), and creaImageIO::TreeHandlerImageAdder::CheckAttributes().


| void creaImageIO::tree::Descriptor::Clear | ( | ) |
Clears the Descriptor.
Definition at line 277 of file creaImageIOTreeDescriptor.cpp.
References mLevelDescriptorList.
Referenced by CreateDefault(), createDescriptorfromFile(), and creaImageIO::SQLiteTreeHandler::DBImportTreeDescription().

|
inline |
Copy the AttributeDescriptorList without ID tag.
Definition at line 79 of file creaImageIOTreeDescriptor.h.
Referenced by creaImageIO::tree::Tree::CopyAttributeDescriptorList().

| void creaImageIO::tree::Descriptor::CreateDefault | ( | ) |
Creates the default descriptor.
Definition at line 78 of file creaImageIOTreeDescriptor.cpp.
References Add(), Clear(), CreateLevel0Descriptor(), creaImageIO::tree::AttributeDescriptor::IDENTIFIER, and creaImageIO::tree::AttributeDescriptor::LABEL.

| void creaImageIO::tree::Descriptor::createDescriptorfromFile | ( | const std::string & | i_file | ) |
Definition at line 178 of file creaImageIOTreeDescriptor.cpp.
References Add(), and Clear().
Referenced by creaImageIO::Gimmick::createDB().


|
private |
Creates the mandatory level 0 descriptor called "Root" (assumes the list is empty)
Definition at line 70 of file creaImageIOTreeDescriptor.cpp.
References Add().
Referenced by CreateDefault(), and Descriptor().


|
inline |
type = 1 without ID and PATIENT_ID
Returns the AttributeDescriptorList of a given level (const ref) type = 0 all attributes
Definition at line 74 of file creaImageIOTreeDescriptor.h.
References creaImageIO::tree::LevelDescriptor::GetAttributeDescriptorList().
Referenced by creaImageIO::tree::Tree::GetAttributeDescriptorList().


|
inline |
Returns the LevelDescriptor of a given level (const ref)
Definition at line 67 of file creaImageIOTreeDescriptor.h.
Referenced by creaImageIO::tree::Tree::GetLevelDescriptor().

|
inline |
Returns the list of tree levels (const)
Definition at line 98 of file creaImageIOTreeDescriptor.h.
Referenced by BuildAttributeMap(), and isExist().

|
inline |
Returns the number of levels of the tree.
Definition at line 63 of file creaImageIOTreeDescriptor.h.
Referenced by creaImageIO::tree::Tree::GetNumberOfLevels().

| const std::string creaImageIO::tree::Descriptor::isExist | ( | const std::string | i_attr | ) |
test if an attribute is present in DescriptionList return level's name
Definition at line 308 of file creaImageIOTreeDescriptor.cpp.
References GetLevelDescriptorList().
Referenced by creaImageIO::tree::Tree::isAttributeExist().


| void creaImageIO::tree::Descriptor::LoadXML | ( | const std::string & | filename | ) |
Loads from a xml description file.
|
private |
Definition at line 112 of file creaImageIOTreeDescriptor.h.