1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name : ModelHighAPI_RefAttr.h
6 // 08/06/16 - Sergey POKHODENKO - Creation of the file
8 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_
9 #define SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_
11 //--------------------------------------------------------------------------------------
12 #include "ModelHighAPI.h"
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
25 * \brief Class for filling ModelAPI_AttributeRefAttr
27 class ModelHighAPI_RefAttr
30 /// Default constructor
32 ModelHighAPI_RefAttr();
33 /// Constructor for attribute
35 ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Attribute> & theValue);
36 /// Constructor for object
38 ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Object> & theValue);
39 /// Constructor for Interface (use result() for object)
41 ModelHighAPI_RefAttr(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
44 virtual ~ModelHighAPI_RefAttr();
46 /// Fill attribute values
47 MODELHIGHAPI_EXPORT virtual
48 void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
50 /// Append to list attribute
51 MODELHIGHAPI_EXPORT virtual
52 void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
54 /// Check the object is empty
59 enum VariantType { VT_ATTRIBUTE, VT_OBJECT } myVariantType;
60 std::shared_ptr<ModelAPI_Attribute> myAttribute;
61 std::shared_ptr<ModelAPI_Object> myObject;
64 //--------------------------------------------------------------------------------------
65 //--------------------------------------------------------------------------------------
66 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */