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 ModelAPI_ObjectMovedMessage;
22 class ModelHighAPI_Interface;
23 //--------------------------------------------------------------------------------------
24 /**\class ModelHighAPI_RefAttr
26 * \brief Class for filling ModelAPI_AttributeRefAttr
28 class ModelHighAPI_RefAttr
31 /// Default constructor
33 ModelHighAPI_RefAttr();
34 /// Constructor for attribute
36 ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Attribute> & theValue);
37 /// Constructor for object
39 ModelHighAPI_RefAttr(const std::shared_ptr<ModelAPI_Object> & theValue);
40 /// Constructor for Interface (use result() for object)
42 ModelHighAPI_RefAttr(const std::shared_ptr<ModelHighAPI_Interface> & theValue);
45 virtual ~ModelHighAPI_RefAttr();
47 /// Fill attribute values
48 MODELHIGHAPI_EXPORT virtual
49 void fillAttribute(const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute) const;
51 /// Append to list attribute
52 MODELHIGHAPI_EXPORT virtual
53 void appendToList(const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute) const;
55 /// Check the object is empty
59 /// Fill moved message by the attribute or object
61 void fillMessage(const std::shared_ptr<ModelAPI_ObjectMovedMessage>& theMessage) const;
64 enum VariantType { VT_ATTRIBUTE, VT_OBJECT } myVariantType;
65 std::shared_ptr<ModelAPI_Attribute> myAttribute;
66 std::shared_ptr<ModelAPI_Object> myObject;
69 //--------------------------------------------------------------------------------------
70 //--------------------------------------------------------------------------------------
71 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_REFATTR_H_ */