Cattle.Configuration

g Cattle.Configuration Cattle.Configuration GObject.Object GObject.Object GObject.Object->Cattle.Configuration

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_debug_is_enabled ()

get_end_of_input_action ()

set_debug_is_enabled (enabled)

set_end_of_input_action (action)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

debug-is-enabled

bool

r/w

Get/set debug support

end-of-input-action

Cattle.EndOfInputAction

r/w

Get/set end of input action

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Cattle.Configuration(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Cattle.ConfigurationClass

Opaque data structure representing a configuration. It should never be accessed directly.

classmethod new()[source]
Returns:

a new Cattle.Configuration

Return type:

Cattle.Configuration

Create and initialize a new configuration.

A single configuration object can be shared between multiple interpreters, but modifying it while an interpreter is running can lead to unexpected and unpredictable results.

get_debug_is_enabled()[source]
Returns:

True if debugging is enabled, False otherwise

Return type:

bool

Get the current status of the debugging support. See Cattle.Configuration.set_debug_is_enabled().

get_end_of_input_action()[source]
Returns:

the current action

Return type:

Cattle.EndOfInputAction

Get the action to be performed when the end of input is reached. See Cattle.Configuration.set_end_of_input_action().

set_debug_is_enabled(enabled)[source]
Parameters:

enabled (bool) – True to enable debug, False otherwise

Set the status of the debugging support. It is disabled by default.

If debugging is disabled, instructions whose value is Cattle.InstructionValue.DEBUG will be ignored by the interpreter.

set_end_of_input_action(action)[source]
Parameters:

action (Cattle.EndOfInputAction) – the action to be performed

Set the action to be performed when the end of input is reached.

Accepted values are from the Cattle.EndOfInputAction enumeration.

Property Details

Cattle.Configuration.props.debug_is_enabled
Name:

debug-is-enabled

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

If False, instructions whose value is Cattle.InstructionValue.DEBUG are not executed by the interpreter.

Changes to this property are not notified.

Cattle.Configuration.props.end_of_input_action
Name:

end-of-input-action

Type:

Cattle.EndOfInputAction

Default Value:

Cattle.EndOfInputAction.STORE_ZERO

Flags:

READABLE, WRITABLE

Action to be performed when the end of input is reached.

Changes to this property are not notified.