[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

City

inherits from Object
inherits from CanBeSearchResult
inherits from HasSortText

Object <- City



Operations

Get list of all operations

ConvertTimeAndDate
DisplaySearchResult
IndexedDate
IndexedTime
SetCurrentCity
Validate


Attributes

Get list of all attributes

DaylightSavings
DaylightSavingsGroup
WhereOnMap


Fields

Field Type
HasSortText: sortText: Text
City: whereOnMap: Dot
minutesFromGMT: Signed
daylightSavingsGroup: UnsignedShort


Instance template

instance City tag;
       sortText: nilObject;
     whereOnMap: <0.0,0.0>;
 minutesFromGMT: 0;
daylightSavingsGroup: 0;
end instance;

Class definition

Define Class City;
    inherits from Object, CanBeSearchResult, HasSortText;
    shares members;

    field whereOnMap:           Dot;
        // used by the WhereOnMap attribute
    field minutesFromGMT:       Signed;
        // offset from universal time a.k.a. Greenwich Mean Time, in minutes, of this city's time zone
    field daylightSavingsGroup: UnsignedShort, getter, setter;

    attribute DaylightSavings: Boolean, safe;                   
        // call getter to see whether city is currently on daylight savings time;
        // call setter to change whether city is currently on daylight savings time;
        // calling setter will affect all cities in the daylight savings group of this city;
        // override rarely
    attribute DaylightSavingsGroup: UnsignedShort, safe;
        // call getter to return numeric index of a group of cities that share dst setting (e.g. dstUSA);
        // call setter to change which group of cities this city is in (this is rarely done!);
        // used by system to make changes to daylight savings settings affect other cities with same dst rules;
        // override rarely
    attribute WhereOnMap: Dot;
        // position on world map, measured in microns relative to map image's origin;
        // override rarely

    operation IndexedTime(index: Unsigned): Unsigned;
        // returns time of day (in milliseconds) in this city by taking dst and time zone into account;
        // index is ignored;
        // override rarely;
    operation IndexedDate(index: Unsigned): Signed;
        // returns date (in Modified Julian Days) in this city by taking dst and time zone into account;
        // index is ignored;
        // override rarely;
    operation ConvertTimeAndDate(otherCity: City; var time: Unsigned; var date: Signed);
        // given time and date in self, converts them to time and date in otherCity;
        // commonly used to convert to or from universal time by using iUniversalTimeCity and iCurrentCity;
        // override rarely;
    operation SetCurrentCity(), noFail;
        // call to change which city is the current one;
        // updates iCurrentCity indexical and local date and time;
        // override rarely
        
    overrides DisplaySearchResult;
        // goes to world map, then highlights this city temporarily
        
#ifdef VALIDATE
    overrides Validate;
        // checks that city is in a dstGroup
#endif

end class;