>  Docs Center  >  IDL Reference  >  Object-Oriented Programming  >  IDL_Object::_overloadMinusMinus

IDL_Object::_overloadMinusMinus

IDL_Object::_overloadMinusMinus

The IDL_Object::_overloadMinusMinus procedure method defines the behavior of the decrement (––) operator for instances of objects that inherit from the IDL_Object class.

Object classes that inherit from the IDL_Object class but that do not override this method will throw an error if you attempt to use the –– operator.

Example


For an example of how to implement this method, see the BigInteger class in the file lib/datatypes/biginteger__define.pro in your IDL installation.

Syntax


In most cases, this method is called indirectly by specifying an object reference as an argument on either the left or right side of the –– operator. When called explicitly, the syntax is:

Obj->[IDL_Object::]_overloadMinusMinus

Arguments


None

Keywords


None

Routine Signature


To overload the –– operator for an object class, implement a method with the following signature:

PRO class::_overloadMinusMinus

Inside this method you should write code that defines the decrement operator for your class.

Note: There are two different forms of the decrement operator: pre-decrement (––a) and post-decrement (a––). See the IDL_Object::_overloadPostIncrementCopy method for details on how to handle the two forms.

Version History


8.4.1

Introduced

See Also


IDL_Object::_overloadPlusPlus, IDL_Object::_overloadPostIncrementCopy, Increment/Decrement operators



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us