1 // File: ModelAPI_AttributeReference.h
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_AttributeReference_HeaderFile
6 #define ModelAPI_AttributeReference_HeaderFile
8 #include "ModelAPI_Attribute.h"
10 /**\class ModelAPI_AttributeReference
12 * \brief Attribute that contains reference to feature (located in the same document).
15 class ModelAPI_AttributeReference : public ModelAPI_Attribute
18 /// Defines the feature referenced from this attribute
19 MODELAPI_EXPORT virtual void setValue(boost::shared_ptr<ModelAPI_Feature> theFeature) = 0;
21 /// Returns feature referenced from this attribute
22 MODELAPI_EXPORT virtual boost::shared_ptr<ModelAPI_Feature> value() = 0;
24 /// Returns the type of this class of attributes
25 MODELAPI_EXPORT static std::string type() {return "Reference";}
27 /// Returns the type of this class of attributes, not static method
28 MODELAPI_EXPORT virtual std::string attributeType() {return type();}
30 /// To virtually destroy the fields of successors
31 MODELAPI_EXPORT virtual ~ModelAPI_AttributeReference() {}
34 /// Objects are created for features automatically
35 MODELAPI_EXPORT ModelAPI_AttributeReference()