Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XAO::XaoUtils Class Reference

Utilities class to convert types.

#include <XAO_XaoUtils.hxx>

Static Public Member Functions

static const std::string intToString (const int &value)
 Converts an integer into a string. More...
 
static const int stringToInt (const std::string &value) throw (XAO_Exception)
 Converts a string into an integer. More...
 
static const std::string doubleToString (const double &value)
 Converts a double into a string. More...
 
static const double stringToDouble (const std::string &value) throw (XAO_Exception)
 Converts a string into a double. More...
 
static const std::string booleanToString (const bool &value)
 Converts a boolean into a string. More...
 
static const bool stringToBoolean (const std::string &value) throw (XAO_Exception)
 Converts a string into a boolean. More...
 
static const std::string dimensionToString (const XAO::Dimension &dimension) throw (XAO_Exception)
 Converts a Dimension to string. More...
 
static const XAO::Dimension stringToDimension (const std::string &dimension) throw (XAO_Exception)
 Converts a string into a Dimension. More...
 
static const std::string fieldTypeToString (const XAO::Type &type) throw (XAO_Exception)
 Converts a Type to string. More...
 
static const XAO::Type stringToFieldType (const std::string &type) throw (XAO_Exception)
 Converts a string into a Type. More...
 
static const std::string shapeFormatToString (const XAO::Format &format) throw (XAO_Exception)
 Converts a Format to string. More...
 
static const XAO::Format stringToShapeFormat (const std::string &format) throw (XAO_Exception)
 Converts a string into a Format. More...
 

Member Function Documentation

const std::string XaoUtils::booleanToString ( const bool &  value)
static
Parameters
valuethe boolean to convert.
Returns
the string.
const std::string XaoUtils::dimensionToString ( const XAO::Dimension dimension) throw (XAO_Exception)
static
Parameters
dimensionthe Dimension to convert.
Returns
the dimension as a string.
Exceptions
XAO_Exception

References XAO::EDGE, XAO::FACE, XAO::SOLID, XAO::VERTEX, and XAO::WHOLE.

const std::string XaoUtils::doubleToString ( const double &  value)
static
Parameters
valuethe double to convert.
Returns
the string.
const std::string XaoUtils::fieldTypeToString ( const XAO::Type type) throw (XAO_Exception)
static
Parameters
typethe Type to convert.
Returns
the Type as a string.
Exceptions
XAO_Exception

References XAO::BOOLEAN, XAO::DOUBLE, XAO::INTEGER, and XAO::STRING.

const std::string XaoUtils::intToString ( const int &  value)
static
Parameters
valuethe integer to convert.
Returns
the string.
const std::string XaoUtils::shapeFormatToString ( const XAO::Format format) throw (XAO_Exception)
static
Parameters
formatthe Format to convert.
Returns
the Format as a string.
Exceptions
XAO_Exception

References XAO::BREP, and XAO::STEP.

const bool XaoUtils::stringToBoolean ( const std::string &  value) throw (XAO_Exception)
static
Parameters
valuethe string to convert.
Returns
the boolean value.
Exceptions
XAO_Exceptionif value cannot be converted to boolean.
Note
accepted values are "true", "1", "false", "0".
const XAO::Dimension XaoUtils::stringToDimension ( const std::string &  dimension) throw (XAO_Exception)
static
Parameters
dimensionthe dimension as a string.
Returns
the converted Dimension.
Exceptions
XAO_Exceptionif dimension cannot be converted.

References XAO::EDGE, XAO::FACE, XAO::SOLID, XAO::VERTEX, and XAO::WHOLE.

const double XaoUtils::stringToDouble ( const std::string &  value) throw (XAO_Exception)
static
Parameters
valuethe string to convert.
Returns
the double value.
Exceptions
XAO_Exceptionif value cannot be converted to string.
const XAO::Type XaoUtils::stringToFieldType ( const std::string &  type) throw (XAO_Exception)
static
Parameters
typethe Type as a string.
Returns
the converted Type.
Exceptions
XAO_Exceptionif type cannot be converted.

References XAO::BOOLEAN, XAO::DOUBLE, XAO::INTEGER, and XAO::STRING.

const int XaoUtils::stringToInt ( const std::string &  value) throw (XAO_Exception)
static
Parameters
valuethe string to convert.
Returns
the integer value.
Exceptions
XAO_Exceptionif value cannot be converted to string.
const XAO::Format XaoUtils::stringToShapeFormat ( const std::string &  format) throw (XAO_Exception)
static
Parameters
formatthe Format as a string.
Returns
the converted Format.
Exceptions
XAO_Exceptionif format cannot be converted.

References XAO::BREP, and XAO::STEP.


The documentation for this class was generated from the following files: