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