CmUtils::Objects::Node

Defines a Node, which is a point with Field values defined by a FieldSet.

Node structure

NAME
Name of the Node
FIELDSET
The FieldSet, used by this Node, which describes the nature of the values stored
VALUES
A list of values as defined by the FieldSet

VERSION

0.6 (20 February 2001) 0.7 (08 August 2001)

CHANGES

version 0.6: - added values structure

version 0.7: - added addStrings() method to handle string values JMB

METHODS

new()

Returns a new Node.

copy()

Returns an identical copy of an existing Node.

name([string/number])

Optional argument is name for Node. Returns the name of the Node.

fieldSet([FieldSet])

Optional argument defines the FieldSet for Node. Returns the FieldSet of the Node.

addValues(number(s))

Adds a list of values to the Nodal value array. Returns the last defined index of the values.

addStrings(number(s))

Adds a list of strings to the Nodal value array. Returns the last defined index of the values.

clearValues()

Clears the list of values of the Node.

setValues()

Sets the list of values of the Node (clears, then adds the new values).

getValues()

Returns an array of the values of the Node.

getValuesHash()

Returns the values of the Node in a hash format. Hash of field names Hash of component names Array of versions Hash of Value Array of derivatives (if derivs are defined)

$node->{fieldname}{componentname}[versionnumber]{value} $node->{fieldname}{componentname}[versionnumber]{derivatives}[derivnumber] e.g.

  $node = $group->getNode(5)->getValuesHash();
  print $node->{coordinates}{x}[0]{value};
  @ver3derivs = @{$node->{coordinates}{z}[3]{derivatives}};

value(index,[value])

Setting and/or returning a single value of a Node by index.

list([FH])

List the contents of this Node to the filehandle FH (default to STDOUT). Set the "verbose" flag ($s->verbose(1)) to see extended information.