1 // File: ModelAPI_Attribute.h
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_Attribute_HeaderFile
6 #define ModelAPI_Attribute_HeaderFile
10 #include <boost/shared_ptr.hpp>
12 class ModelAPI_Feature;
14 /**\class ModelAPI_Attribute
16 * \brief Generic attribute of the Object.
18 class ModelAPI_Attribute
20 ///< needed here to emit signal that feature changed on change of the attribute
21 boost::shared_ptr<ModelAPI_Feature> myFeature;
24 /// Returns the type of this class of attributes, not static method
25 MODELAPI_EXPORT virtual std::string attributeType() = 0;
27 /// To virtually destroy the fields of successors
28 MODELAPI_EXPORT virtual ~ModelAPI_Attribute() {}
30 MODELAPI_EXPORT void setFeature(const boost::shared_ptr<ModelAPI_Feature>& theFeature)
31 {myFeature = theFeature;}
33 MODELAPI_EXPORT const boost::shared_ptr<ModelAPI_Feature>& feature()
36 /// Objects are created for features automatically
37 ModelAPI_Attribute(){}