ToGRPCVisitor#

class ToGRPCVisitor(local_file_context_stack: contextlib.ExitStack | None = None, engine_is_local: bool = True)#

Bases: ansys.tools.variableinterop.IVariableValueVisitor[ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue]

Produces a gRPC VariableValue message for a given atvi.IVariableValue object.

Overview#

visit_integer

Method that is called if the IVariableValue.accept() method is called on

visit_real

Method that is called if the IVariableValue.accept() method is called on

visit_boolean

Method that is called if the IVariableValue.accept() method is called on

visit_string

Method that is called if the IVariableValue.accept() method is called on

visit_integer_array

Method that is called if the IVariableValue.accept() method is called on

visit_file

Method that is called if the IVariableValue.accept() method is called on

visit_real_array

Method that is called if the :meth:`IVariableValue.accept() method is called

visit_boolean_array

Method that is called if the IVariableValue.accept() method is called on

visit_string_array

Method that is called if the IVariableValue.accept() method is called on

visit_file_array

Method that is called if the IVariableValue.accept() method is called on

Import detail#

from ansys.modelcenter.workflow.grpc_modelcenter.var_value_convert import ToGRPCVisitor

Method detail#

ToGRPCVisitor.visit_integer(value: ansys.tools.variableinterop.IntegerValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on an IntegerValue type.

Parameters:
valueIntegerValue

IntegerValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_real(value: ansys.tools.variableinterop.RealValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a RealValue type.

Parameters:
valueRealValue

RealValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_boolean(value: ansys.tools.variableinterop.BooleanValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a BooleanValue type.

Parameters:
valueBooleanValue

BooleanValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_string(value: ansys.tools.variableinterop.StringValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a StringValue type.

Parameters:
valueStringValue

StringValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_integer_array(value: ansys.tools.variableinterop.IntegerArrayValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on an IntegerArrayValue type.

Parameters:
valueIntegerArrayValue

IntegerArrayValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_file(value: ansys.tools.variableinterop.FileValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a FileValue type.

Parameters:
valueFileValue

FileValue type to visit.

Returns:
T

Result

ToGRPCVisitor.visit_real_array(value: ansys.tools.variableinterop.RealArrayValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the :meth:`IVariableValue.accept() method is called on a RealArrayValue type.

Parameters:
valueRealArrayValue

RealArrayValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_boolean_array(value: ansys.tools.variableinterop.BooleanArrayValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a BooleanArrayValue type.

Parameters:
valueBooleanArrayValue

BooleanArrayValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_string_array(value: ansys.tools.variableinterop.StringArrayValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a StringArrayValue type.

Parameters:
valueStringArrayValue

StringArrayValue type to visit.

Returns:
T

Result.

ToGRPCVisitor.visit_file_array(value: ansys.tools.variableinterop.FileArrayValue) ansys.api.modelcenter.v0.variable_value_messages_pb2.VariableValue#

Method that is called if the IVariableValue.accept() method is called on a FileArrayValue type.

Parameters:
valueFileArrayValue

FileArrayValue type to visit.

Returns:
T

Result.