immutable class ELAPSED < $ORDERED{ELAPSED}, $HASH, $BINARY, $TEXT, $ANCHORED_FMT |
---|
**** |
________This_class_embodies_the_abstraction_of_a_period_of_time_rather_than ___an_instant_or_time-stamp.___Values_of_this_kind_are_never_negative. _________Version_1.4_May_2001.___Copyright_K_Hopper,_U_of_Waikato __________________________Development_History __________________________------------------- ________Date___________Who_By_________Detail ________----___________------_________------ ________3_Jun_96________kh_______Original_from_std_Sather_distrib. ________8_Apr_97________kh_______Modified_for_INT_to_CARD _______25_Feb_98________kh_______made_a_sub-class_of_$BINARY ________5_Oct_98________kh_______factored_out_ELAPSED_STR. _______29_Oct_98________kh_______Refined,_added_pre/post_conditions _______31_May_01________kh_______Added_$ORDERED_sub-typing |
$ANCHORED_FMT | $FMT | $STR | $TEXT | $BINARY | $HASH | $IS_EQ | $ORDERED{_} | $IS_LT{_} | $VALUE{_} | $NIL | $IS_NIL |
attr days : CARD ; |
---|
attr millisecs : CARD ; |
---|
const Invalid : SAME := days(CARD::nil).millisecs(CARD::nil) ; |
---|
binstr : BINSTR |
---|
build(cursor : BIN_CURSOR) : SAME |
---|
build(loc_cursor : STR_CURSOR) : SAME .. Included as build |
---|
create(str : BINSTR) : SAME .. Included as create |
---|
create(days : CARD, millis : CARD ) : SAME |
---|
create(str : STR) : SAME .. Included as create |
---|
create(dtime : TIME_STAMP) : SAME |
---|
**** |
________This_routine_creates_a_new_elapsed_time_--_elapsed_between_the_'base ___date'_and_dtime. |
div( factor : CARD ) : SAME |
---|
fmt(format : ANCHORED_DESCR) : STR .. Included as fmt |
---|
fmt(format : ANCHORED_DESCR, lib : LIBCHARS ) : STR .. Included as fmt |
---|
full_str(lib : LIBCHARS) : STR .. Included as full_str |
---|
full_str : STR .. Included as full_str |
---|
hash : CARD |
---|
hours : CARD |
---|
is_elapsed( str : STR) : CONVERSION_RESULTS .. Included as is_elapsed |
---|
is_eq(other : SAME) : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_self_and_other_represent ___the_same_elapsed_time. |
is_eq(other : $OB) : BOOL .. Included as is_eq |
---|
**** | This is the generic equality predicate. c.f. the class $IS_EQ |
is_lt(other : SAME ) : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_self_and_other_represent ___the_same_elapsed_time. |
is_nil : BOOL |
---|
**** |
________This_predicate_returns_true_if_and_only_if_self_is_a_nil_time. |
milliseconds : CARD |
---|
minus( other : SAME ) : SAME |
---|
minutes : CARD |
---|
minutes_in_hour : CARD |
---|
nil : SAME |
---|
**** |
__This_routine_yields_a_nil_elapsed_time. |
one_day : SAME |
---|
**** |
________This_routine_yields_a_one_day_elapsed_time. |
one_hour : SAME |
---|
**** |
________This_routine_yields_a_one_hour_elapsed_time. |
one_minute : SAME |
---|
**** |
________This_routine_yields_a_one_minute_elapsed_time. |
one_second : SAME |
---|
**** |
________This_routine_yields_a_one_second_elapsed_time. |
plus( other : SAME) : SAME |
---|
read(index : BIN_CURSOR) : SAME .. Included as read |
---|
seconds : CARD |
---|
seconds_in_minute : CARD |
---|
str(lib : LIBCHARS) : STR .. Included as str |
---|
str : STR .. Included as str |
---|
times( factor : CARD ) : SAME |
---|
total_days : CARD |
---|
**** |
________This_routine_returns_the_whole_number_of_days_in_self |
total_hours : CARD |
---|
total_milliseconds : CARD |
---|
total_minutes : CARD |
---|
total_seconds : CARD |
---|
write(fyle : BIN_FILE) .. Included as write |
---|