mglib

Personal IDL library for M. Galloy

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

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

Inheritance

Subclasses: mgcoarraylist mgcoraggedarray

Properties

Properties in mgcoabstractlist

version get

Routines

Methods inherited from idl_object

Routines from mgcoabstractlist__define.pro

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

top mgcoabstractlist::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)

top mgcoabstractlist::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)

top mgcoabstractlist::countabstract

result = mgcoabstractlist::count()

Returns the number of elements in the list.

Return value

long integer

top mgcoabstractlist::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

top mgcoabstractlist::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

top mgcoabstractlist::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

top mgcoabstractlist::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

top mgcoabstractlist::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

top mgcoabstractlist::cleanup

mgcoabstractlist::cleanup

Free resouces.

top mgcoabstractlist::init

result = mgcoabstractlist::init()

Initialize list.

Return value

1B

top mgcoabstractlist__define

mgcoabstractlist__define

Define member variables.

File attributes

Modification date: Wed May 14 15:07:14 2014
Lines: 40
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.