Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Category.h

Go to the documentation of this file.
00001 
00038 #ifndef _AMIRE_COMMON_CATEGORY_H
00039 #define _AMIRE_COMMON_CATEGORY_H
00040 
00041 #include <amire/common/Defines.h>
00042 
00043 namespace amire {
00044   namespace common {
00048     class AMIRE_EXPORT_API Category : public virtual osg::Referenced {
00049     public:
00053       const static unsigned char CATEGORY_DELIMITER;
00054 
00055     private:
00056       std::string name;
00057       mutable std::vector<std::string> identifiers;
00058       mutable std::vector<osg::ref_ptr<Category> > subCategories;
00059       osg::ref_ptr<const Category> parent;
00060 
00061     public:
00065       Category();
00066 
00067       virtual ~Category();
00068 
00072       const std::string &getName() const;
00073 
00077       const osg::ref_ptr<const Category> &getParent() const;
00078 
00082       int getNumberOfIdentifiers() const;
00083 
00087       const std::string &getIdentifier(int index) const;
00088 
00092       int getNumberOfSubCategories() const;
00093 
00097       osg::ref_ptr<const Category> getSubCategory(int index) const;
00098 
00102       osg::ref_ptr<const Category> getSubCategory(std::string &name) const;
00103 
00107       bool isIdentifierDefined(const std::string &name) const;
00108 
00112       bool isSubCategoryDefined(const std::string &name) const;
00113 
00117       osg::ref_ptr<const Category> addIdentifier(const std::string &name);
00118 
00119     private:
00120       Category(const std::string &name, const osg::ref_ptr<const Category> &parent);
00121     };
00122   }
00123 }
00124 #endif

Generated on Tue May 20 17:23:52 2003 for AMIRE-Framework by doxygen1.3