MG Library

Library of Michael Galloy

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

collection/

mgarraylist__define.pro

An MGArrayList implements the same interface as IDL_Container, but can contain any IDL type.

Class description for mgarraylist

Inheritance

Properties

count get
example get init
_ref_extra get
type get set init
blockSize get set init

Fields

pData ptr_new()

pointer to the data array

nUsed 0L

number of elements of the list actually in use

pExample ptr_new()

used if list of structures to specify the structure

type 0L

SIZE type code of the data array

blockSize 0L

size of the data array

Fields in mgabstractlist

Routines

mgarraylist::getProperty [, type=long] [, blockSize=long] [, example=structure] [, count=long] [, _ref_extra=keywords]

Get properties of the list.

mgarraylist::setProperty [, type=long] [, blockSize=long]

Set properties of the list.

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

Remove specified elements from the list.

mgarraylist::move, source, destination

Move an element of the list to another position.

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

Determines whether a list contains specified elements.

mgarraylist::add, elements [, position=long, lonarr]

Add elements to the list.

result = mgarraylist::isaGet( [position=lonarr], isa=string, strarr [, /all] [, count=long])

Private method to screen for given class(es).

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

Get elements of the list.

result = mgarraylist::count()

Returns the number of elements in the list.

result = mgarraylist::iterator()

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

mgarraylist::cleanup

Cleanup list resources.

result = mgarraylist::init( [type=integer] [, example=any] [, blockSize=integer])

Create a list.

mgarraylist__define

Define member variables.

Routine details

topmgarraylist::getProperty

mgarraylist::getProperty [, type=long] [, blockSize=long] [, example=structure] [, count=long] [, _ref_extra=keywords]

Get properties of the list.

Keywords

type out optional type=long

set to a named variable to get SIZE type code of list

blockSize out optional type=long

set to a named variable to get the size of the

example out optional type=structure

set to a named variable to get the example of structure type; undefined if list is not of type structure

count out optional type=long

set to a named variable to get the number of elements in the list

_ref_extra out optional type=keywords

keyword to MGAbstractList::getProperty

topmgarraylist::setProperty

mgarraylist::setProperty [, type=long] [, blockSize=long]

Set properties of the list.

Keywords

type in optional type=long

SIZE type code to convert list to

blockSize in optional type=long

size of the data array

topmgarraylist::remove

mgarraylist::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

topmgarraylist::move

mgarraylist::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

topmgarraylist::isContained

result = mgarraylist::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

topmgarraylist::add

mgarraylist::add, elements [, position=long, lonarr]

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=long, lonarr default=end of list

index or index array to insert elements at; if array, must match number of elements

topmgarraylist::isaGetprivate

result = mgarraylist::isaGet( [position=lonarr], isa=string, strarr [, /all] [, count=long])

Private method to screen for given class(es). Indices returned are indices POSITION (or data array if ALL is set).

Return value

index array or -1L if none

Keywords

position in optional type=lonarr

indices of elements to check

isa in required type=string, strarr

classes to check objects for

all in optional type=boolean

screen from all elements

count out optional type=long

number of matched items

topmgarraylist::get

result = mgarraylist::get( [/all] [, position=long, lonarr] [, 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=long, lonarr

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

topmgarraylist::count

result = mgarraylist::count()

Returns the number of elements in the list.

Return value

long integer

topmgarraylist::iterator

result = mgarraylist::iterator()

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

Return value

MGArrayListIterator object

topmgarraylist::cleanup

mgarraylist::cleanup

Cleanup list resources.

topmgarraylist::init

result = mgarraylist::init( [type=integer] [, example=any] [, blockSize=integer])

Create a list.

Return value

1B for succes, 0B otherwise

Keywords

type in optional type=integer

type code as in SIZE function to specify the type of elements in the list; TYPE or EXAMPLE keyword must be used

example in optional type=any

used to specify the type of the list by example; necessary if defining a list of structures

blockSize in optional type=integer default=1000L

initial size of data array

topmgarraylist__define

object, collection

mgarraylist__define

Define member variables.

File attributes

Modification date: Tue Nov 20 11:24:28 2007
Lines: 436