Salome HOME
Issue #1662: implementation of Recover feature.
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Reference.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Reference.h
4 // Created:     04 August 2016
5 // Author:      Mikhail Ponikarov
6
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_REFERENCE_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_REFERENCE_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
12
13 #include <memory>
14 #include <string>
15 //--------------------------------------------------------------------------------------
16 class ModelAPI_Attribute;
17 class ModelAPI_AttributeReference;
18 class ModelAPI_AttributeRefList;
19 class ModelAPI_Object;
20 class ModelHighAPI_Interface;
21 //--------------------------------------------------------------------------------------
22 /**\class ModelHighAPI_Reference
23  * \ingroup CPPHighAPI
24  * \brief Class for filling ModelAPI_AttributeReference
25  */
26 class ModelHighAPI_Reference
27 {
28 public:
29   /// Default constructor
30   MODELHIGHAPI_EXPORT
31   ModelHighAPI_Reference();
32   /// Constructor for object
33   MODELHIGHAPI_EXPORT
34   ModelHighAPI_Reference(const std::shared_ptr<ModelAPI_Object> & theValue);
35   /// Constructor for Interface (use result() for object)
36   MODELHIGHAPI_EXPORT
37   ModelHighAPI_Reference(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
38   /// Destructor
39   MODELHIGHAPI_EXPORT
40   virtual ~ModelHighAPI_Reference();
41
42   /// Fill attribute values
43   MODELHIGHAPI_EXPORT
44   virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
45
46   /// Append to list attribute
47   MODELHIGHAPI_EXPORT
48   virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute) const;
49
50 private:
51   std::shared_ptr<ModelAPI_Object> myObject;
52 };
53
54 //--------------------------------------------------------------------------------------
55 //--------------------------------------------------------------------------------------
56 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */