MGunit documentation

Unit testing for IDL

single page | use frames     summary     class     fields     routine details     file attributes

dist_tools/collection/

mgcoabstractlist__define.pro

Abstract class to define a list interface. This class is not intended to be instantiated, just to be inherited from.

Class description for mgcoabstractlist

Subclasses: mgcoarraylist mgcoraggedarray

Properties

version get

Fields

version 0L

a counter that is incremented as the list is modified (so iterators know if the underlying list has changed)

Routines

mgcoabstractlist::getProperty [, version=long]

Get properties.

mgcoabstractlist::add, elements [, position=integer]

Add elements to the list.

result = mgcoabstractlist::count()

Returns the number of elements in the list.

result = mgcoabstractlist::get( [/all] [, position=integer] [, count=integer] [, isa=string or strarr])

Get elements of the list.

result = mgcoabstractlist::isContained(elements [, position=long])

Determines whether a list contains specified elements.

mgcoabstractlist::move, source, destination

Move an element of the list to another position.

mgcoabstractlist::remove [, elements] [, position=long] [, /all]

Remove specified elements from the list.

result = mgcoabstractlist::iterator()

Creates an iterator to iterate through the elements of the list.

mgcoabstractlist::cleanup

Free resouces.

result = mgcoabstractlist::init()

Initialize list.

mgcoabstractlist__define

Define member variables.

Routine details

topmgcoabstractlist::getProperty

mgcoabstractlist::getProperty [, version=long]

Get properties.

Keywords

version out optional type=long

a counter that is incremented as the list is modified (so iterators know if the underlying list has changed)

topmgcoabstractlist::addabstract

mgcoabstractlist::add, elements [, position=integer]

Add elements to the list.

Parameters

elements in required type=list type

scalar or vector array of the same type as the list

Keywords

position in optional type=integer default=end of list

index to insert elements at (NOT IMPLEMENTED)

topmgcoabstractlist::countabstract

result = mgcoabstractlist::count()

Returns the number of elements in the list.

Return value

long integer

topmgcoabstractlist::getabstract

result = mgcoabstractlist::get( [/all] [, position=integer] [, count=integer] [, isa=string or strarr])

Get elements of the list.

Return value

element(s) of the list or -1L if no elements to return

Keywords

all in optional type=boolean

set to return all elements

position in optional type=integer

set to an index or an index array of elements to return; defaults to 0 if ALL keyword not set

count out optional type=integer

set to a named variable to get the number of elements returned by this function

isa in optional type=string or strarr

classname(s) of objects to return; only allowable if list type is object

topmgcoabstractlist::isContainedabstract

result = mgcoabstractlist::isContained(elements [, position=long])

Determines whether a list contains specified elements.

Return value

1B if contained or 0B if otherwise

Parameters

elements in required type=type of list

scalar or vector of elements of the same type as the list

Keywords

position out optional type=long

set to a named variable that will return the position of the first instance of the corresponding element of the specified elements

topmgcoabstractlist::moveabstract

mgcoabstractlist::move, source, destination

Move an element of the list to another position.

Parameters

source in required type=long

index of the element to move

destination in required type=long

index of position to move element

topmgcoabstractlist::removeabstract

mgcoabstractlist::remove [, elements] [, position=long] [, /all]

Remove specified elements from the list.

Parameters

elements in optional type=type of list

elements of the list to remove

Keywords

position in optional type=long

set to a scalar or vector array of indices to remove from the list

all in optional type=boolean

set to remove all elements of the list

topmgcoabstractlist::iteratorabstract

result = mgcoabstractlist::iterator()

Creates an iterator to iterate through the elements of the list. The destruction of the iterator is the responsibility of the caller of this method.

Return value

MGAbstractIterator object

topmgcoabstractlist::cleanup

mgcoabstractlist::cleanup

Free resouces.

topmgcoabstractlist::init

result = mgcoabstractlist::init()

Initialize list.

Return value

1B

topmgcoabstractlist__define

mgcoabstractlist__define

Define member variables.

File attributes

Modification date: Wed Apr 22 23:29:03 2009
Lines: 195
Docformat: rst rst