1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_AttributeDocRef.h
5 // Author: Mikhail PONIKAROV
7 #ifndef ModelAPI_AttributeDocRef_H_
8 #define ModelAPI_AttributeDocRef_H_
10 #include "ModelAPI_Attribute.h"
11 #include "ModelAPI_Document.h"
13 /**\class ModelAPI_AttributeDocRef
15 * \brief Attribute that contains reference to another document.
18 class ModelAPI_AttributeDocRef : public ModelAPI_Attribute
21 /// Defines the document referenced from this attribute
22 MODELAPI_EXPORT virtual void setValue(std::shared_ptr<ModelAPI_Document> theDoc) = 0;
24 /// Returns document referenced from this attribute
25 MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Document> value() = 0;
27 /// Returns the persisten ID of the document
28 MODELAPI_EXPORT virtual int docId() = 0;
30 /// Returns the type of this class of attributes
31 MODELAPI_EXPORT static std::string typeId()
36 /// Returns the type of this class of attributes, not static method
37 MODELAPI_EXPORT virtual std::string attributeType();
39 /// To virtually destroy the fields of successors
40 MODELAPI_EXPORT virtual ~ModelAPI_AttributeDocRef();
43 /// Objects are created for features automatically
44 MODELAPI_EXPORT ModelAPI_AttributeDocRef();
47 typedef std::shared_ptr<ModelAPI_AttributeDocRef> AttributeDocRefPtr;