+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
// Name : ModelHighAPI_Integer.h
-// Purpose:
+// Purpose:
//
// History:
// 29/03/16 - Sergey POKHODENKO - Creation of the file
#include <memory>
#include <string>
-
-#include <boost/variant.hpp>
//--------------------------------------------------------------------------------------
class ModelAPI_AttributeInteger;
//--------------------------------------------------------------------------------------
public:
/// Constructor for int
MODELHIGHAPI_EXPORT
- ModelHighAPI_Integer(int theValue = 0.);
+ ModelHighAPI_Integer(int theValue = 0);
/// Constructor for std::string
MODELHIGHAPI_EXPORT
ModelHighAPI_Integer(const std::string & theValue);
MODELHIGHAPI_EXPORT
virtual void fillAttribute(const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute) const;
+ /// Returns a value (must be used only for attributes which support no text)
+ MODELHIGHAPI_EXPORT virtual int intValue() const;
+
private:
- boost::variant<int, std::string> myValue;
+ enum VariantType { VT_INT, VT_STRING } myVariantType;
+ int myInt;
+ std::string myString;
};
//--------------------------------------------------------------------------------------