1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Reference.cpp
4 // Created: 04 August 2016
5 // Author: Mikhail Ponikarov
7 //--------------------------------------------------------------------------------------
8 #include "ModelHighAPI_Reference.h"
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()
19 ModelHighAPI_Reference::ModelHighAPI_Reference(
20 const std::shared_ptr<ModelAPI_Object> & theValue)
24 ModelHighAPI_Reference::ModelHighAPI_Reference(
25 const std::shared_ptr<ModelHighAPI_Interface> & theValue)
26 : myObject(std::shared_ptr<ModelAPI_Object>(theValue->defaultResult()))
30 ModelHighAPI_Reference::~ModelHighAPI_Reference()
34 //--------------------------------------------------------------------------------------
35 void ModelHighAPI_Reference::fillAttribute(
36 const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute) const
38 theAttribute->setValue(myObject);
41 //--------------------------------------------------------------------------------------
42 void ModelHighAPI_Reference::appendToList(
43 const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute) const
45 theAttribute->append(myObject);
48 //--------------------------------------------------------------------------------------
49 std::shared_ptr<ModelAPI_Feature> ModelHighAPI_Reference::feature() const
51 return ModelAPI_Feature::feature(myObject);