The RoseBackptrCursor class enables an application to iterate over a set of backpointers, possibly limiting the search to a particular attribute. Thus, it provides an efficient way to compute inverse attributes or USEDIN() constructs. See Backpointers for more information.

The following example uses backpointers to find the product_definition_formation instances associated with a product.

    RoseObject * product;
    RoseAttribute * att = des->findDomain("product_definition_formation")
    RoseBackPtrCursor cur;
    RoseObject *pdf;
    while (pdf = cur.next()) {
      /* Do somethig with the product_definition_formation in pd */


void attribute(
	RoseAttribute *att

The attribute() function declares the inverted attribute to which the scope of the inverse search is limited.


void fastforward();

The fastforward() function sets the current pointer after the last object so that the next call to previous() will return the last backpointer.


RoseStructure * first();

The first() function rewinds the iterator and returns the first object in the backpointer list.


RoseStructure * last();

The last() function fastworwards the iterator and returns the last object in the backpointer list.


RoseStructure * next();

The next() function returns the next object in the backpointer list, and advances the iterator.


RoseStructure * previous();

The previous() function returns the previous object in the backpointer list, and decreases the iterator.


void rewind()

The rewind() function sets the cursor so that the next call will return the first object in the list.


void traverse(
	RoseObject * obj

The traverse() function determines the RoseObject that will be searched for backpointers.