abstract class $ENUMS{ITP} < $IS_EQ, $HASH, $BINARY,$TEXT, $NIL, $ANCHORED_FMT |
---|
**** |
________This_abstraction_provides_a_generic_enumeration_coding_facility. ___The_definition_of_routines_is_assumed_not_to_include_the_numeric_encoding ___of_zero_--_which_is_the_'void'_(meaning_undefined)_value.__The_values_do ___not,_however,_have_to_commence_with_the_code_number_one_-_they_are_assumed ___to_start_with_the_code_number_given_by_the_offset_feature_(see_comment ___below). |
$BINARY | $NIL | $IS_NIL | $ANCHORED_FMT | $FMT | $STR | $TEXT | $HASH | $IS_EQ |
card : CARD ; |
---|
**** | This is a routine to return the encoding value as a number. |
elt! : SAME ; |
---|
**** | This iter yields in turn all of the values of the enumeration. |
enum : CARD ; |
---|
**** | The internal encoding! |
fmt(format : ANCHORED_DESCR,lib : LIBCHARS) : STR ; |
---|
**** |
________This_routine_accepts_a_format_string_argument_and_returns_a_formatted ___version_of_self_in_accordance_with_this_in_the_given_representation_and ___encoding. |
fmt(format : ANCHORED_DESCR) : STR ; |
---|
**** |
________This_routine_accepts_a_format_string_argument_and_returns_a_formatted ___version_of_self_in_accordance_with_this. |
hash : CARD ; |
---|
**** |
________Since_the_encoding_is_likely_to_be_small_numbers,_the_cardinal_hash ___function_will_normally_be_used. |
is_eq(other : ITP) : BOOL ; |
---|
**** |
________The_required_equality_test.___Note_that_individual_implementations ___may_provide_for_ordering_of_the_values. |
is_nil : BOOL ; |
---|
**** | This feature returns true if and only if self is nil. |
nil : SAME ; |
---|
**** | This feature returns a nil value for the enumeration |