1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Model_AttributeDocRef.h
5 // Author: Mikhail PONIKAROV
7 #ifndef Model_AttributeDocRef_H_
8 #define Model_AttributeDocRef_H_
11 #include "ModelAPI_AttributeDocRef.h"
12 #include <TDataStd_Integer.hxx>
13 #include <TDF_Label.hxx>
15 /**\class Model_AttributeDocRef
17 * \brief Attribute that contains reference to another document.
20 class Model_AttributeDocRef : public ModelAPI_AttributeDocRef
22 Handle(TDataStd_Integer) myID; ///< persistent and unique identifier of the document in the application
25 /// Defines the document referenced from this attribute
26 MODEL_EXPORT virtual void setValue(std::shared_ptr<ModelAPI_Document> theDoc);
28 /// Returns document referenced from this attribute
29 MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> value();
31 /// Returns the persisten ID of the document
32 MODEL_EXPORT virtual int docId();
35 /// Initializes attibutes
36 Model_AttributeDocRef(TDF_Label& theLabel);
38 friend class Model_Data;