00001 #ifndef __creaImageIOTreeLevelDescriptor_h_INCLUDED__ 00002 #define __creaImageIOTreeLevelDescriptor_h_INCLUDED__ 00003 00004 #include <creaImageIOTreeAttributeDescriptor.h> 00005 #include <vector> 00006 00007 namespace creaImageIO 00008 { 00009 00010 namespace tree 00011 { 00015 //===================================================================== 00017 class LevelDescriptor 00018 { 00019 public: 00021 LevelDescriptor(const std::string& name) : mName(name) {} 00023 ~LevelDescriptor() {} 00024 00026 const std::string& GetName() const { return mName; } 00027 00029 unsigned int GetNumberOfAttributes() const 00030 { return mAttributeDescriptorList.size(); } 00031 00033 void Add(const AttributeDescriptor&); 00034 00036 typedef std::vector<AttributeDescriptor> AttributeDescriptorListType; 00037 00041 const AttributeDescriptorListType& GetAttributeDescriptorList(int type = 0) const 00042 { if (type == 0) 00043 return mAttributeDescriptorList; 00044 else 00045 return mAttributeDescriptorListWID; 00046 } 00047 00049 void CopyAttributeDescriptorList(); 00050 00052 const std::vector<std::string>& GetIdentifierList() const 00053 { return mIdentifierList; } 00055 const std::vector<std::string>& GetLabelList() const 00056 { return mLabelList; } 00057 00058 private: 00059 std::string mName; 00060 // Attributes List for this level 00061 AttributeDescriptorListType mAttributeDescriptorList; 00062 // Attributes List for this level without ID and PARENT_ID attributes 00063 AttributeDescriptorListType mAttributeDescriptorListWID; 00065 std::vector<std::string> mIdentifierList; 00067 std::vector<std::string> mLabelList; 00068 00069 }; 00070 // EO class LevelDescriptor 00071 //===================================================================== 00072 }// EO namespace tree 00073 00074 00075 } // EO namespace creaImageIO 00076 00077 // EOF 00078 #endif