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
BooleanValue
type.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
BooleanValue
type.
- other
- Returns:
BooleanValue
Value as a
BooleanValue
type.
- 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
IntegerValue
type.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
IntegerValue
type.
- other
- Returns:
IntegerValue
Value as an
IntegerValue
type.
- 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
RealValue
type.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
RealValue
type.
- other
- Returns:
RealValue
Value as a
RealValue
type.
- 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
StringValue
type.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
StringValue
type.
- other
- Returns:
StringValue
Value as a
StringValue
type.