]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_RefAttr.h
Salome HOME
Fix problem with dumping names of entities copied by Multi-Rotation/Translation ...
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_RefAttr.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : ModelHighAPI_RefAttr.h
3 // Purpose:
4 //
5 // History:
6 // 08/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_
9 #define SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "ModelHighAPI.h"
13
14 #include <memory>
15 #include <string>
16 //--------------------------------------------------------------------------------------
17 class ModelAPI_Attribute;
18 class ModelAPI_AttributeRefAttr;
19 class ModelAPI_AttributeRefAttrList;
20 class ModelAPI_Object;
21 class ModelHighAPI_Interface;
22 //--------------------------------------------------------------------------------------
23 /**\class ModelHighAPI_RefAttr
24  * \ingroup CPPHighAPI
25  * \brief Class for filling ModelAPI_AttributeRefAttr
26  */
27 class ModelHighAPI_RefAttr
28 {
29 public:
30   /// Default constructor
31   MODELHIGHAPI_EXPORT
32   ModelHighAPI_RefAttr();
33   /// Constructor for attribute
34   MODELHIGHAPI_EXPORT
35   ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Attribute> & theValue);
36   /// Constructor for object
37   MODELHIGHAPI_EXPORT
38   ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Object> & theValue);
39   /// Constructor for Interface (use result() for object)
40   MODELHIGHAPI_EXPORT
41   ModelHighAPI_RefAttr(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
42   /// Destructor
43   MODELHIGHAPI_EXPORT
44   virtual ~ModelHighAPI_RefAttr();
45
46   /// Fill attribute values
47   MODELHIGHAPI_EXPORT virtual
48     void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
49
50   /// Append to list attribute
51   MODELHIGHAPI_EXPORT virtual
52     void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
53
54   /// Check the object is empty
55   MODELHIGHAPI_EXPORT
56   bool isEmpty() const;
57
58 private:
59   enum VariantType { VT_ATTRIBUTE, VT_OBJECT } myVariantType;
60   std::shared_ptr<ModelAPI_Attribute> myAttribute;
61   std::shared_ptr<ModelAPI_Object> myObject;
62 };
63
64 //--------------------------------------------------------------------------------------
65 //--------------------------------------------------------------------------------------
66 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */