1 // Name : ModelHighAPI_Integer.cpp
5 // 29/03/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "ModelHighAPI_Integer.h"
10 #include <ModelAPI_AttributeInteger.h>
11 //--------------------------------------------------------------------------------------
13 //--------------------------------------------------------------------------------------
14 ModelHighAPI_Integer::ModelHighAPI_Integer(int theValue)
15 : myVariantType(VT_INT)
20 ModelHighAPI_Integer::ModelHighAPI_Integer(const std::string & theValue)
21 : myVariantType(VT_STRING)
26 ModelHighAPI_Integer::ModelHighAPI_Integer(const char * theValue)
27 : myVariantType(VT_STRING)
32 ModelHighAPI_Integer::~ModelHighAPI_Integer()
36 //--------------------------------------------------------------------------------------
37 void ModelHighAPI_Integer::fillAttribute(
38 const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute) const
40 switch(myVariantType) {
41 case VT_INT: theAttribute->setValue(myInt); return;
42 case VT_STRING: theAttribute->setText(myString); return;