1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeReference.h
5 // Author: Mikhail PONIKAROV
7 #ifndef ModelAPI_AttributeReference_H_
8 #define ModelAPI_AttributeReference_H_
10 #include "ModelAPI_Attribute.h"
11 #include <ModelAPI_Feature.h>
13 /**\class ModelAPI_AttributeReference
15 * \brief Attribute that contains reference to feature (located in the same document).
18 class ModelAPI_AttributeReference : public ModelAPI_Attribute
21 /// Defines the object referenced from this attribute
22 MODELAPI_EXPORT virtual void setValue(ObjectPtr theObject) = 0;
24 /// Returns object referenced from this attribute
25 MODELAPI_EXPORT virtual ObjectPtr value() = 0;
27 /// Returns the type of this class of attributes
28 MODELAPI_EXPORT static std::string typeId()
33 /// Returns the type of this class of attributes, not static method
34 MODELAPI_EXPORT virtual std::string attributeType();
36 /// To virtually destroy the fields of successors
37 MODELAPI_EXPORT virtual ~ModelAPI_AttributeReference();
40 /// Objects are created for features automatically
41 MODELAPI_EXPORT ModelAPI_AttributeReference();
44 typedef std::shared_ptr<ModelAPI_AttributeReference> AttributeReferencePtr;