The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TSmithChart
Declaration: function SearchAnnoItem (StartIx, Tag: integer; TagMask: longword; ItemClass: integer; ItemKind: TrcItem): integer;

The function SearchAnnoItem searches through all annotations starting at the item with index StartIx and returns the index of the first annotation item which matches the search criteria (parameters Tag, ItemClass and ItemKind). A match occurs if the masked tag (masked by TagMask), the item class and the kind of the item match the corresponding search parameters. The function returns a value of -1 if there is no item in the container which matches the search criteria.

The masking of the tag is accomplished by the parameter TagMask. For search comparison the tags of the annotation items are ANDed bitwise by TagMask before the result is compared to Tag.

Each of the three parameters can be disabled as a search criterion by assigning the following values:

Tag set TagMask to $00000000
ItemClass set ItemClass to 255
ItemKind set ItemKind to tkEverything

Last Update: 2017-Okt-19