The IDL_Object::_overloadBracketsRightSide function method defines the behavior of the array subscript ([]) operator (used on the right side of the equals sign) for instances of objects that inherit from the IDL_Object class.

This method is designed to replicate the default behavior of objects that do not use operator overloading. As a result, object classes that do inherit from the IDL_Object class but that do not override this particular method will behave in the same manner as object classes that do not inherit from the IDL_Object class.

Tip: If you write an object class that inherits from IDL_Object and overloads this method, you can call the superclass method directly to achieve the default behavior for specific cases.

Syntax


In most cases, this method is called indirectly when the [] operator is appended to an object reference argument on the right side of the equals sign. When called explicitly, the syntax is:

Result = Obj->[IDL_Object::]_overloadBracketsRightSide( isRange, Subscript1 [, Subscript2, Subscript3, Subscript4, Subscript5, Subscript6, Subscript7, Subscript8] )

Return Value


This method is called when the [] operator is appended to an instance of a class that inherits from the IDL_Object class, but that does not implement its own _overloadBracketsRightSide method. The return value replicates the behavior of the [] operator with an object that does not inherit from the IDL_Object class.

Arguments


isRange

A vector that has one element for each Subscript argument supplied by the user; each element contains a zero if the corresponding input argument was a scalar index value or array of indices, or a one if the corresponding input argument was a subscript range.

Subscript1

Subscript2

Subscript3

Subscript4

Subscript5

Subscript6

Subscript7

Subscript8

Index subscripts. Each Subscript argument can be either a scalar subscript index value, an index array, or a subscript range. There must be at least one Subscript argument.

Keywords


None

Routine Signature


To overload the [] operator when used on the right side of the equals sign for an object class, implement a method with the following signature:

FUNCTION class::_overloadBracketsRightSide, isRange, $
   Subscript1, Subscript2, Subscript3, Subscript4, $
   Subscript5, Subscript6, Subscript7, Subscript8
 

The return value of this function should be the result of the overloaded [] operation.

Version History


8.0

Introduced