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

PropertyTypeManager.h

Go to the documentation of this file.
00001 
00048 #ifndef _AMIRE_PROPERTY_PROPERTY_TYPE_MANAGER_H
00049 #define _AMIRE_PROPERTY_PROPERTY_TYPE_MANAGER_H
00050 
00051 #include <amire/common/Defines.h>
00052 #include <amire/property/PropertyType.h>
00053 #include <amire/property/StructPropertyType.h>
00054 #include <amire/property/VectorPropertyType.h>
00055 #include <amire/property/StructProperty.h>
00056 #include <amire/property/StructVectorProperty.h>
00057 #include <amire/common/Category.h>
00058 
00059 namespace amire {
00060   namespace property {
00073     class AMIRE_EXPORT_API PropertyTypeManager {
00074     public:
00082       static PropertyTypeManager *getDefaultPropertyTypeManager();
00083 
00084     private:
00085       StringToPropertyTypeMap basePropertyTypes;
00086       StringToNativePropertyTypeMap nativePropertyTypes;
00087       StringToStructPropertyTypeMap structPropertyTypes;
00088       StringToVectorPropertyTypeMap baseVectorPropertyTypes;
00089       StringToVectorPropertyTypeMap nativeVectorPropertyTypes;
00090       StringToVectorPropertyTypeMap structVectorPropertyTypes;
00091       std::vector<osg::ref_ptr<const StructPropertyType> > localStructPropertyTypes;
00092       osg::ref_ptr<amire::common::Category> rootCategory;
00093       std::string libraryName;
00094 
00095     public:
00096       PropertyTypeManager();
00097 
00098       virtual ~PropertyTypeManager();
00099 
00104       osg::ref_ptr<Property> newProperty(const std::string &propertyTypeName) const;
00105 
00110       osg::ref_ptr<Property> newVectorProperty(const std::string &propertyTypeName) const;
00111 
00116       osg::ref_ptr<StructProperty> newStructProperty(const std::string &structPropertyTypeName) const;
00117 
00122       osg::ref_ptr<StructVectorProperty> newStructVectorProperty(const std::string &structPropertyTypeName) const;
00123 
00128       osg::ref_ptr<const PropertyType> getPropertyType(const std::string &propertyTypeName) const;
00129 
00134       osg::ref_ptr<const VectorPropertyType> getVectorPropertyType(const std::string &propertyTypeName) const;
00135 
00140       osg::ref_ptr<const PropertyType> getBasePropertyType(const std::string &basePropertyTypeName) const;
00141 
00146       osg::ref_ptr<const VectorPropertyType> getBaseVectorPropertyType(const std::string &basePropertyTypeName) const;
00147 
00152       osg::ref_ptr<const NativePropertyType> getNativePropertyType(const std::string &nativePropertyTypeName) const;
00153 
00158       osg::ref_ptr<const VectorPropertyType> getNativeVectorPropertyType(const std::string &nativePropertyTypeName) const;
00159 
00164       osg::ref_ptr<const StructPropertyType> getStructPropertyType(const std::string &structPropertyTypeName) const;
00165 
00170       osg::ref_ptr<const VectorPropertyType> getStructVectorPropertyType(const std::string &structPropertyTypeName) const;
00171 
00176       void registerNativePropertyType(const osg::ref_ptr<NativePropertyType> &nativePropertyType);
00177 
00182       void registerStructPropertyType(const osg::ref_ptr<StructPropertyType> &structPropertyType);
00183 
00188       bool containsPropertyType(const std::string &propertyTypeName) const;
00189 
00194       bool containsBasePropertyType(const std::string &basePropertyTypeName) const;
00195 
00200       bool containsNativePropertyType(const std::string &nativePropertyTypeName) const;
00201 
00206       bool containsStructPropertyType(const std::string &structPropertyTypeName) const;
00207    
00211       osg::ref_ptr<const amire::common::Category> getPropertyTypeCategories() const;
00212 
00216       osg::ref_ptr<const PropertyType> getBaseType(bool) const;
00217 
00221       osg::ref_ptr<const PropertyType> getBaseType(int) const;
00222 
00226       osg::ref_ptr<const PropertyType> getBaseType(float) const;
00227 
00231       osg::ref_ptr<const PropertyType> getBaseType(double) const;
00232 
00236       osg::ref_ptr<const PropertyType> getBaseType(char) const;
00237 
00241       osg::ref_ptr<const PropertyType> getBaseType(const std::string &) const;
00242 
00246       osg::ref_ptr<const PropertyType> getBaseVectorType(bool) const;
00247 
00251       osg::ref_ptr<const PropertyType> getBaseVectorType(int) const;
00252 
00256       osg::ref_ptr<const PropertyType> getBaseVectorType(float) const;
00257 
00261       osg::ref_ptr<const PropertyType> getBaseVectorType(double) const;
00262 
00266       osg::ref_ptr<const PropertyType> getBaseVectorType(char) const;
00267 
00271       osg::ref_ptr<const PropertyType> getBaseVectorType(const std::string &) const;
00272 
00280       void setCurrentLibrary(const std::string &libraryName);
00281 
00288       const std::string &getCurrentLibrary();
00289 
00293       const std::vector<osg::ref_ptr<const StructPropertyType> > &getLocalStructPropertyTypes() const;
00294 
00295     private:
00296       void registerBasePropertyType(const osg::ref_ptr<PropertyType> &basePropertyType);
00297     };
00298   }
00299 }
00300 
00301 #endif
00302 

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