Proxy object for an element of a NodeStack.
Objects of this class are used to allow the elements of an NodeStack to be examined and modified using the same syntax as would be used for accessing an array of RObject*
, whilst nevertheless enforcing the logic for protection against garbage collection. See Item 30 of Scott Meyers's 'More Effective C++' for a general discussion of proxy objects, but see the errata. (It may look complicated, but an optimising compiler should be able to distil an invocation of NodeStack::operator[] into very few instructions.)