company logo

Cursor functionality

The property handle provides cursor functionality, i.e. an instance might be selected, located or positioned in a property handle. Cursor functionality is used for selecting an instance or iterating through the collection referred to by the property handle.

In order to avoid changing the selection (e.g. in the property handle passed to a function) a cursor copy might be created for the property handle.

void Iterate ( Property &person ) {

  Proiperty   cPerson;

  cPerson.copyCursor(person); // create cursor copy

  Value       pid(cPerson,"pid");

  

  cPerson.top();

  while ( cPerson.next(true) )

    printf("Person ID: %s", pid.toString());

}