1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name : ModelHighAPI_Double.cpp
6 // 29/03/16 - Sergey POKHODENKO - Creation of the file
8 //--------------------------------------------------------------------------------------
9 #include "ModelHighAPI_Double.h"
11 #include <ModelAPI_AttributeDouble.h>
12 //--------------------------------------------------------------------------------------
14 //--------------------------------------------------------------------------------------
15 ModelHighAPI_Double::ModelHighAPI_Double(double theValue)
16 : myVariantType(VT_DOUBLE)
21 ModelHighAPI_Double::ModelHighAPI_Double(const std::string & theValue)
22 : myVariantType(VT_STRING)
27 ModelHighAPI_Double::ModelHighAPI_Double(const char * theValue)
28 : myVariantType(VT_STRING)
33 ModelHighAPI_Double::~ModelHighAPI_Double()
37 //--------------------------------------------------------------------------------------
38 void ModelHighAPI_Double::fillAttribute(
39 const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute) const
41 switch(myVariantType) {
42 case VT_DOUBLE: theAttribute->setValue(myDouble); return;
43 case VT_STRING: theAttribute->setText(myString); return;