The scalar_value_conversion.py module#
Summary#
Convert the given value to a |
|
Convert the given value to an |
|
Convert the given value to a |
|
Convert the given value to a |
Description#
Defines scalar value visitors.
Module detail#
- scalar_value_conversion.to_boolean_value(other: ansys.tools.variableinterop.variable_value.IVariableValue) ansys.tools.variableinterop.scalar_values.BooleanValue#
Convert the given value to a
BooleanValuetype.The conversion is performed according to the type interoperability specifications. Note that some conversions are lossy (resulting in a loss of precision), and some conversions are not possible (raises IncompatibleTypesException).
- Parameters:
- other
IVariableValue Other value to convert to a
BooleanValuetype.
- other
- Returns:
BooleanValueValue as a
BooleanValuetype.
- scalar_value_conversion.to_integer_value(other: ansys.tools.variableinterop.variable_value.IVariableValue) ansys.tools.variableinterop.scalar_values.IntegerValue#
Convert the given value to an
IntegerValuetype.The conversion is performed according to the type interoperability specifications. Note that some conversions are lossy (resulting in a loss of precision), and some conversions are not possible (raises IncompatibleTypesException).
- Parameters:
- other
IVariableValue Other value to convert to an
IntegerValuetype.
- other
- Returns:
IntegerValueValue as an
IntegerValuetype.
- scalar_value_conversion.to_real_value(other: ansys.tools.variableinterop.variable_value.IVariableValue) ansys.tools.variableinterop.scalar_values.RealValue#
Convert the given value to a
RealValuetype.The conversion is performed according to the type interoperability specifications. Note that some conversions are lossy (resulting in a loss of precision), and some conversions are not possible (raises
IncompatibleTypesException).- Parameters:
- other
IVariableValue Other value to convert to a
RealValuetype.
- other
- Returns:
RealValueValue as a
RealValuetype.
- scalar_value_conversion.to_string_value(other: ansys.tools.variableinterop.variable_value.IVariableValue) ansys.tools.variableinterop.scalar_values.StringValue#
Convert the given value to a
StringValuetype.The conversion is performed according to the type interoperability specifications. Note that some conversions are lossy (resulting in a loss of precision), and some conversions are not possible (raises IncompatibleTypesException).
- Parameters:
- other
IVariableValue Other value to convert to a
StringValuetype.
- other
- Returns:
StringValueValue as a
StringValuetype.