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