Salome HOME
Merge remote-tracking branch 'remotes/origin/occ/compounds_processing'
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Integer.cpp
index 8691146f9a63d6f119048661d37b7389e8930bda..c76a3a963f59c4503957bdf0441374581ebb7d7f 100644 (file)
@@ -20,6 +20,8 @@
 #include "ModelHighAPI_Integer.h"
 
 #include <ModelAPI_AttributeInteger.h>
+
+#include <sstream>
 //--------------------------------------------------------------------------------------
 
 //--------------------------------------------------------------------------------------
@@ -60,3 +62,13 @@ int ModelHighAPI_Integer::intValue() const
   // needed for array of integer, which supports no text
   return myInt;
 }
+
+std::string ModelHighAPI_Integer::string() const
+{
+  if (myVariantType == VT_STRING)
+    return myString;
+
+  std::ostringstream anOut;
+  anOut << myInt;
+  return anOut.str();
+}