HasIterator <- HasIndexing |
|
|
First Last |
Define Class HasIndexing; mixes in with Object; inherits from HasIterator; inherits interface from HasCount; // getting operation At(index: Unsigned): Object, noFail, safe, noMethod; attribute First: Object, readOnly; attribute Last: Object, readOnly; // iterators overrides Each; operation EachAfter(index: Unsigned; function: EachFunction; parameters: Pointer): Object, noFail; operation UpdateIteratorIndex(index: Unsigned; adjustment: Signed); // searching operation Search(target: Object): Unsigned, noFail; operation FindAfter(target: Object; afterIndex: Unsigned): Unsigned, noFail; operation FindEqual(target: Object): Unsigned, noFail; operation FindSameChoice(target: Object): Unsigned, noFail; operation SearchByDirectID(target: Object): Unsigned, noFail; // string matching operation FindElementMatching(match: HasText; afterIndex: Unsigned; userEntryOrder: Boolean): Unsigned, noFail; // returns first index after <afterIndex> that contains an object whose name is <match> operation FindElementMatchingInitialSubstring(match: HasText; afterIndex: Unsigned; userEntryOrder: Boolean; allowFollowingElement: Boolean): Unsigned, noFail; // returns first index after <afterIndex> that contains an object whose name starts with <match> // if search fails and allowFollowingElement, returns first index after <afterIndex> that contains an object whose name sorts after <match> operation FindElementMatchingSubstring(match: HasText; afterIndex: Unsigned; userEntryOrder: Boolean): Unsigned, noFail; // returns first index after <afterIndex> that contains an object whose name contains text in <match> operation SearchForExpansion(prefix: HasText; var index: Unsigned): Text; // attributes operation ObjectAttributeAt(index: Unsigned; attribute: OperationNumber): Object; end class;