]> Creatis software - creaImageIO.git/blob - src2/creaImageIOTreeLevelDescriptor.h
Starting version 2
[creaImageIO.git] / src2 / creaImageIOTreeLevelDescriptor.h
1 #ifndef __creaImageIOTreeLevelDescriptor_h_INCLUDED__
2 #define __creaImageIOTreeLevelDescriptor_h_INCLUDED__
3
4 #include <creaImageIOTreeAttributeDescriptor.h>
5 #include <vector>
6
7 namespace creaImageIO
8 {
9
10   namespace tree
11   {
12     //=====================================================================
13     /// Descriptor of a level of a tree (name, attributes, ...)
14     class LevelDescriptor
15     {
16     public:
17       /// Ctor with name
18       LevelDescriptor(const std::string& name) : mName(name) {}
19       /// Destructor
20       ~LevelDescriptor() {} 
21
22       /// Returns the name of the level
23       const std::string& GetName() { return mName; }
24
25       /// Returns the number of attributes of the level
26       unsigned int GetNumberOfAttributes() 
27       { return mAttributeDescriptorList.size(); }
28
29       /// The type of attribute container
30       typedef std::vector<AttributeDescriptor> AttributeDescriptorListType;
31       /// Returns the list of AttributeDescriptor
32       AttributeDescriptorListType& GetAttributeDescriptorList() 
33       { return mAttributeDescriptorList; }
34       /// Returns the list of AttributeDescriptor (const)
35       const AttributeDescriptorListType& GetAttributeDescriptorList() const 
36       { return mAttributeDescriptorList; }
37
38     private:
39       std::string mName;
40       AttributeDescriptorListType mAttributeDescriptorList;
41
42
43     };
44     // EO class LevelDescriptor
45     //=====================================================================
46   }// EO namespace tree
47   
48
49 } // EO namespace creaImageIO
50
51 // EOF
52 #endif