v_sim.NodeValues

g GObject.Object GObject.Object v_sim.NodeValues v_sim.NodeValues GObject.Object->v_sim.NodeValues

Subclasses:

v_sim.NodeValuesFarray, v_sim.NodeValuesFrag, v_sim.NodeValuesId, v_sim.NodeValuesString, v_sim.NodeValuesType

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (arr, label, type, dim)

copy (from_)

fromArray (arr)

getArray ()

getAt (node)

getDimension ()

getEditable ()

getLabel ()

getPtrAt (node)

reset ()

setAt (node, value)

setEditable (status)

setFromString (node, from_)

setFromStringForId (nodeId, from_)

toString (node)

toStringFromId (nodeId)

Virtual Methods

Inherited:

GObject.Object (7)

do_getAt (node)

do_parse (node, string)

do_serialize (node)

do_setAt (node, value)

Properties

Name

Type

Flags

Short Description

editable

bool

r/w

user can modify the value

internal

bool

w/co

internal to v_sim.Node structure

label

str

r/w/co

description label

n-elements

int

r/w/co

number of dimensions

nodes

v_sim.NodeArray

r/w/co

nodes values are related to

type

GObject.GType

r/w/co

type of the values

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

Gets emitted when the values corresponding to this node property are changed for node.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.NodeValuesPrivate

r

Class Details

class v_sim.NodeValues(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.NodeValuesClass

Common name to refer to a #_VisuNodeValues.

classmethod new(arr, label, type, dim)
Parameters:
Returns:

a newly created v_sim.NodeValues object.

Return type:

v_sim.NodeValues

Creates a new v_sim.NodeValues object, used to store dim values of type type for each node in arr.

New in version 3.8.

copy(from_)
Parameters:

from (v_sim.NodeValues) – a v_sim.NodeValues object.

Returns:

True if self is editable and all values from have been actually copied.

Return type:

bool

Copies all values from to self, providing that from and self store compatible data. The values are copied using the v_sim.Node id. If an id for a node of self is not found in from, no node value is copied for this node. The original id is used.

New in version 3.8.

fromArray(arr)
Parameters:

arr (v_sim.NodeArray) – a v_sim.NodeArray object.

Returns:

True if self is stored in arr.

Return type:

bool

Tests if arr is used as base for self.

New in version 3.8.

getArray()
Returns:

a v_sim.NodeArray object.

Return type:

v_sim.NodeArray or None

Retrieves the v_sim.NodeArray, vels is based on.

New in version 3.8.

getAt(node)
Parameters:

node (v_sim.Node) – a v_sim.Node structure.

Returns:

True if value is properly retrieved.

value:

a value location.

Return type:

(bool, value: GObject.Value)

Retrieves the value stored in self for node. value is initialised to the proper type at each call. For repeatedly retrieving values for various nodes, prefer to use a v_sim.NodeValuesIter instead.

New in version 3.8.

getDimension()
Returns:

a number of columns.

Return type:

int

Retrieves how many values are stored per node, aka the column number.

New in version 3.8.

getEditable()
Returns:

True if values can be changed.

Return type:

bool

Retrieves if self are writable or not.

New in version 3.8.

getLabel()
Returns:

a string.

Return type:

str

Retrives the label used to identify self.

New in version 3.8.

getPtrAt(node)
Parameters:

node (v_sim.Node) – a v_sim.Node object.

Returns:

a pointer to some data.

Return type:

object or None

Retrieve the values associated to node, as long as it can be stored as a pointer. This is aconvenient function to avoid instanciating a GObject.Value.

New in version 3.8.

reset()

Reset all stored values.

New in version 3.8.

setAt(node, value)
Parameters:
Returns:

True if value is actually changed.

Return type:

bool

Set value for node in self.

New in version 3.8.

setEditable(status)
Parameters:

status (bool) – a boolean.

Change the writable status of self.

New in version 3.8.

setFromString(node, from_)
Parameters:
Returns:

True if value is actually changed.

Return type:

bool

Parse from to set a value to node in self.

New in version 3.8.

setFromStringForId(nodeId, from_)
Parameters:
  • nodeId (int) – a node id.

  • from (str) – a string.

Returns:

True if value is actually changed.

Return type:

bool

Same as v_sim.NodeValues.setFromString(), but uses a node id to identify a v_sim.Node in self.

New in version 3.8.

toString(node)
Parameters:

node (v_sim.Node) – a v_sim.Node pointer.

Returns:

a newly created string.

Return type:

str

Creates a string representation of the value stored for node.

New in version 3.8.

toStringFromId(nodeId)
Parameters:

nodeId (int) – a node id.

Returns:

a newly created string.

Return type:

str

Like v_sim.NodeValues.toString(), but using a string id.

New in version 3.8.

do_getAt(node) virtual
Parameters:

node (v_sim.Node) – a v_sim.Node structure.

Returns:

True if value is properly retrieved.

value:

a value location.

Return type:

(bool, value: GObject.Value)

Retrieves the value stored in vals for node. value is initialised to the proper type at each call. For repeatedly retrieving values for various nodes, prefer to use a v_sim.NodeValuesIter instead.

New in version 3.8.

do_parse(node, string) virtual
Parameters:
Returns:

True on success.

Return type:

bool

a routine to get values from a string.

do_serialize(node) virtual
Parameters:

node (v_sim.Node) – a v_sim.Node pointer.

Returns:

a newly created string representing the values of node.

Return type:

str

a routine to write format into a string.

do_setAt(node, value) virtual
Parameters:
Returns:

True if value is actually changed.

Return type:

bool

Set value for node in vals.

New in version 3.8.

Signal Details

v_sim.NodeValues.signals.changed(node_values, node)
Signal Name:

changed

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

Gets emitted when the values corresponding to this node property are changed for node.

New in version 3.8.

Property Details

v_sim.NodeValues.props.editable
Name:

editable

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

user can modify the value

v_sim.NodeValues.props.internal
Name:

internal

Type:

bool

Default Value:

False

Flags:

WRITABLE, CONSTRUCT_ONLY

internal to v_sim.Node structure

v_sim.NodeValues.props.label
Name:

label

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

description label

v_sim.NodeValues.props.n_elements
Name:

n-elements

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

number of dimensions

v_sim.NodeValues.props.nodes
Name:

nodes

Type:

v_sim.NodeArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

nodes values are related to

v_sim.NodeValues.props.type
Name:

type

Type:

GObject.GType

Default Value:

<GType void>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

type of the values