Salome HOME
e25d33d4d33965d804f4ed259ae20e1c03441648
[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_Feature;
20 class ModelAPI_Object;
21 class ModelHighAPI_Interface;
22 //--------------------------------------------------------------------------------------
23 /**\class ModelHighAPI_Reference
24  * \ingroup CPPHighAPI
25  * \brief Class for filling ModelAPI_AttributeReference
26  */
27 class ModelHighAPI_Reference
28 {
29 public:
30   /// Default constructor
31   MODELHIGHAPI_EXPORT
32   ModelHighAPI_Reference();
33   /// Constructor for object
34   MODELHIGHAPI_EXPORT
35   ModelHighAPI_Reference(const std::shared_ptr<ModelAPI_Object> & theValue);
36   /// Constructor for Interface (use result() for object)
37   MODELHIGHAPI_EXPORT
38   ModelHighAPI_Reference(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
39   /// Destructor
40   MODELHIGHAPI_EXPORT
41   virtual ~ModelHighAPI_Reference();
42
43   /// Fill attribute values
44   MODELHIGHAPI_EXPORT virtual 
45     void fillAttribute(const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const;
46
47   /// Append to list attribute
48   MODELHIGHAPI_EXPORT
49   virtual void appendToList(const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute) const;
50
51   /// Returns feature for this object.
52   MODELHIGHAPI_EXPORT
53   virtual std::shared_ptr<ModelAPI_Feature> feature() const;
54
55 private:
56   std::shared_ptr<ModelAPI_Object> myObject;
57 };
58
59 //--------------------------------------------------------------------------------------
60 //--------------------------------------------------------------------------------------
61 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */