CmUtils::Objects::Field

Fields are a collection of one or more Components.

Field structure

NAME
Name of the Field
TYPE
Field type
COORDSYS
Name of the coordinate system associated with the Field
COMPONENTS
A set of Components which are part of this Field

VERSION

0.51 (20 February 2001)

METHODS

new()

Returns a new Field.

copy()

Returns an identical copy of an existing Field.

name([string])

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

type([string])

Optional argument is type of Field. Returns the type of the Field.

coordsys([string])

Optional argument is coordinate system of Field. Returns the coordinate system of the Field.

addComponent(Component)

Adds a Component to the list of Components of this Field. Returns the number of Components.

updateComponent(Component)

Updates a Component in the list of Components of this ComponentSet. Returns the index of the last Component.

getComponentNames([ComponentName(s)])

If ComponentName(s) are specified, returns a list of names of all Components with these names that exist in the Field, in the order they are specified. If no argument is given, returns a list of names of ALL Components, sorted in alphabetical order.

getComponents([ComponentName(s)])

If ComponentName(s) are specified, returns a list of all Components with these names that exist in the Field, in the order they are specified. If no argument is given, returns a list of ALL Components, sorted in alphabetical order.

getComponentsMatching([Pattern])

If Pattern are specified, returns a list of all Components matching /Pattern/i that exist in the Field, in the order they are specified. If no argument is given, returns a list of ALL Components, sorted in alphabetical order.

getComponent(ComponentName)

Returns the Component named ComponentName from the Field.

deleteComponent(ComponentName)

Deletes the Component named ComponentName from the Field. Returns the new number of Components.

numberOfComponents()

Returns the number of Components defined in the Field.

isSame(Field)

Returns True if the Field is the same as the owner Field, otherwise returns False.

list(FH)

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