next up previous 264
Next: SourceFile - Input file from which to read data
Up: AST Attribute Descriptions
Previous: SkyRefP(axis) - Position on primary meridian of offset coordinate system


SortBy - Determines how keys are sorted in a KeyMap

Description:
This attribute determines the order in which keys are returned by the astMapKey function. It may take the following values (the default is "None"):

  • "None": The keys are returned in an arbitrary order. This is the fastest method as it avoids the need for a sorted list of keys to be maintained and used.

  • "AgeDown": The keys are returned in the order in which values were stored in the KeyMap, with the key for the most recent value being returned last. If the value of an existing entry is changed, it goes to the end of the list.

  • "AgeUp": The keys are returned in the order in which values were stored in the KeyMap, with the key for the most recent value being returned first. If the value of an existing entry is changed, it goes to the top of the list.

  • "KeyAgeDown": The keys are returned in the order in which they were originally stored in the KeyMap, with the most recent key being returned last. If the value of an existing entry is changed, its position in the list does not change.

  • "KeyAgeUp": The keys are returned in the order in which they were originally stored in the KeyMap, with the most recent key being returned first. If the value of an existing entry is changed, its position in the list does not change.

  • "KeyDown": The keys are returned in alphabetical order, with "A..." being returned last.

  • "KeyUp": The keys are returned in alphabetical order, with "A..." being returned first.
Type:
String.
Class Applicability:
KeyMap
All KeyMaps have this attribute.
Notes:
  • If a new value is assigned to SortBy (or if SortBy is cleared), all entries currently in the KeyMap are re-sorted according to the new SortBy value.


next up previous 264
Next: SourceFile - Input file from which to read data
Up: AST Attribute Descriptions
Previous: SkyRefP(axis) - Position on primary meridian of offset coordinate system

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
25th February 2013
E-mail:starlink@jiscmail.ac.uk

Copyright (C) 2014 Science \& Technology Facilities Council