IVariableValue#

class IVariableValue#

Bases: abc.ABC

Defines an interface for the behavior common among all variable types.

Overview#

accept

Invoke the visitor pattern of this object using the passed-in visitor

to_api_string

Convert the value to an API string.

to_display_string

Convert the value to a formatted string.

clone

Get a deep copy of this value.

variable_type

Variable type of the object.

Import detail#

from ansys.tools.variableinterop.variable_value import IVariableValue

Property detail#

property IVariableValue.variable_type: VariableType#
Abstractmethod:

Variable type of the object.

Returns:
VariableType

Variable type of the object.

Method detail#

IVariableValue.clone() IVariableValue#

Get a deep copy of this value.

abstract IVariableValue.accept(visitor: ansys.tools.variableinterop.ivariable_visitor.IVariableValueVisitor[T]) T#

Invoke the visitor pattern of this object using the passed-in visitor implementation.

Parameters:
visitorIVariableValueVisitor

Visitor object to call.

Returns:
T

Results of the visitor invocation.

abstract IVariableValue.to_api_string(context: ansys.tools.variableinterop.isave_context.ISaveContext | None = None) str#

Convert the value to an API string.

Returns:
str

String appropriate for use in files and APIs.

abstract IVariableValue.to_display_string(locale_name: str) str#

Convert the value to a formatted string.

Parameters:
locale_namestr

Locale to format the string in.

Returns:
str

String appropriate for use in user-facing areas.