[ Home | About | Tech Info & Data | Publications | References ] [ Site by Jeffrey Hall | Research funded by NSF ]
The ObArray class maintains an array of objects. It inherits Root. The data member Objects is a pointer to an IDL ObjArr, providing a lightweight way to maintain an array of related objects.
2008 July 17 - Documentation written.
pointer Objects
argument object ob
Adds an object to the end of the array. It creates a new ObjArr referencing all the objects presently in the array, with an additional ObjArr element at the end. The new object is added and the datamber Objects is first freed and then set to point to the new ObjArr.
Calls Root::cleanup
Destructor. It destroys each object currently in the object array, and then frees the pointer data member. Never call this procedure directly; it is invoked by IDL's Obj_Destroy function.
Structure definition. Specifies the contents of the IDL structure instantiated by the ObArray class. Used by Obj_New; do not invoke directly.
argument int i
Return object object
Returns the object at index i in the object array. Note this return a reference to the object itself, not a pointer.
Return long howMany
Returns the number of objects presently in the array.
Return long type
Returns the type of object at index i in the array, using a call to the IDL function Obj_Class.
keyword struct _EXTRA
Return bool TRUE
Constructor. It initializes the Root object and creates the data member as a new ObjArr with one element. Never call this function directly; it is invoked by IDL's Obj_New function.
Destroys all the objects in the array and reinitializes the pointer to by an ObjArr with one element. Note this procedure actually destroys the objects, rather than merely removing a pointer to them.
argument int i
argument object ob
Sets the object at array element i in the ObjArr to be ob.
obj = Obj_New( 'ObArray' )
Obj_Destroy( obj )