]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_Reference.cpp
Salome HOME
Fix unit tests for ParametersPlugin
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Reference.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Reference.cpp
4 // Created:     04 August 2016
5 // Author:      Mikhail Ponikarov
6
7 //--------------------------------------------------------------------------------------
8 #include "ModelHighAPI_Reference.h"
9
10 #include <ModelAPI_AttributeReference.h>
11 #include <ModelAPI_AttributeRefList.h>
12 #include <ModelAPI_Feature.h>
13 #include <ModelAPI_Result.h>
14 #include "ModelHighAPI_Interface.h"
15 //--------------------------------------------------------------------------------------
16 ModelHighAPI_Reference::ModelHighAPI_Reference()
17 {}
18
19 ModelHighAPI_Reference::ModelHighAPI_Reference(
20     const std::shared_ptr<ModelAPI_Object> & theValue)
21 : myObject(theValue)
22 {}
23
24 ModelHighAPI_Reference::ModelHighAPI_Reference(
25     const std::shared_ptr<ModelHighAPI_Interface> & theValue)
26 : myObject(std::shared_ptr<ModelAPI_Object>(theValue->defaultResult()))
27 {
28 }
29
30 ModelHighAPI_Reference::~ModelHighAPI_Reference()
31 {
32 }
33
34 //--------------------------------------------------------------------------------------
35 void ModelHighAPI_Reference::fillAttribute(
36     const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const
37 {
38   theAttribute->setValue(myObject);
39 }
40
41 //--------------------------------------------------------------------------------------
42 void ModelHighAPI_Reference::appendToList(
43     const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute) const
44 {
45   theAttribute->append(myObject);
46 }
47
48 //--------------------------------------------------------------------------------------
49 std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Reference::feature() const
50 {
51   return ModelAPI_Feature::feature(myObject);
52 }