The IDL_Container::Get function method returns an array of object references to objects in a container. Unless the ALL or POSITION keywords are specified, the first object in the container is returned. If no objects are found in the container, the Get method returns -1 or !NULL if the NULL keyword is set.
Result = Obj->[IDL_Container::]Get ([/ALL] [, ISA=class_name(s)] [, POSITION=index] [, COUNT=variable] [/NULL] )
None.
Set this keyword to return an array of object references to all of the objects in the container. If ALL is set then the POSITION keyword is not allowed.
Set this keyword equal to a named variable that will contain the number of objects selected by the function. If the ALL keyword is also specified, specifying this keyword is the same as calling the IDL_Container::Count method.
Set this keyword equal to a class name or vector of class names. This keyword is used in conjunction with the ALL keyword. The ISA keyword filters the array returned by the ALL keyword, returning only the objects that inherit from the class or classes specified by the ISA keyword.
Note: This keyword is ignored if the ALL keyword is not provided.
If this keyword is set, and there are no objects returned, then the Get method will return !NULL instead of -1.
Tip: The NULL keyword is useful when trying to remove all objects of a certain type from the container. For example:
obj->Remove, obj->Get(/ALL, ISA='MyClass', /NULL)
Set this keyword equal to a scalar or array containing the zero-based indices of the positions of the objects to return.
5.0 |
Introduced |
8.2 | Added NULL keyword. |