Version: 9.12.0
XAO::XaoUtils Class Reference

Utilities class to convert types.

#include <XAO_XaoUtils.hxx>

Static Public Member Functions

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

Member Function Documentation

◆ booleanToString()

std::string XaoUtils::booleanToString ( bool  value)
static
Parameters
valuethe boolean to convert.
Returns
the string.

◆ dimensionToString()

std::string XaoUtils::dimensionToString ( XAO::Dimension  dimension)
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.

◆ doubleToString()

std::string XaoUtils::doubleToString ( double  value)
static
Parameters
valuethe double to convert.
Returns
the string.

◆ fieldTypeToString()

std::string XaoUtils::fieldTypeToString ( XAO::Type  type)
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.

◆ intToString()

std::string XaoUtils::intToString ( int  value)
static
Parameters
valuethe integer to convert.
Returns
the string.

◆ shapeFormatToString()

std::string XaoUtils::shapeFormatToString ( XAO::Format  format)
static
Parameters
formatthe Format to convert.
Returns
the Format as a string.
Exceptions
XAO_Exception

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

◆ stringToBoolean()

bool XaoUtils::stringToBoolean ( const std::string &  value)
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".

◆ stringToDimension()

XAO::Dimension XaoUtils::stringToDimension ( const std::string &  dimension)
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.

◆ stringToDouble()

double XaoUtils::stringToDouble ( const std::string &  value)
static
Parameters
valuethe string to convert.
Returns
the double value.
Exceptions
XAO_Exceptionif value cannot be converted to string.

◆ stringToFieldType()

XAO::Type XaoUtils::stringToFieldType ( const std::string &  type)
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.

◆ stringToInt()

int XaoUtils::stringToInt ( const std::string &  value)
static
Parameters
valuethe string to convert.
Returns
the integer value.
Exceptions
XAO_Exceptionif value cannot be converted to string.

◆ stringToShapeFormat()

XAO::Format XaoUtils::stringToShapeFormat ( const std::string &  format)
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: