]> Creatis software - creaImageIO.git/blob - src2/creaImageIOTreeLevelDescriptor.h
905a7e45ea30304d836ca73d1789f4fc54727722
[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         * \ingroup Model
14         */
15     //=====================================================================
16     /// Descriptor of a level of a tree (name, attributes, ...)
17     class LevelDescriptor
18     {
19     public:
20       /// Ctor with name
21       LevelDescriptor(const std::string& name) : mName(name) {}
22       /// Destructor
23       ~LevelDescriptor() {} 
24
25       /// Returns the name of the level
26       const std::string& GetName() { return mName; }
27
28       /// Returns the number of attributes of the level
29       unsigned int GetNumberOfAttributes() 
30       { return mAttributeDescriptorList.size(); }
31
32       /// The type of attribute container
33       typedef std::vector<AttributeDescriptor> AttributeDescriptorListType;
34       /// Returns the list of AttributeDescriptor
35       AttributeDescriptorListType& GetAttributeDescriptorList() 
36       { return mAttributeDescriptorList; }
37       /// Returns the list of AttributeDescriptor (const)
38       const AttributeDescriptorListType& GetAttributeDescriptorList() const 
39       { return mAttributeDescriptorList; }
40
41     private:
42       std::string mName;
43       AttributeDescriptorListType mAttributeDescriptorList;
44
45
46     };
47     // EO class LevelDescriptor
48     //=====================================================================
49   }// EO namespace tree
50   
51
52 } // EO namespace creaImageIO
53
54 // EOF
55 #endif