# Section 8.1:
Basic Classes

This section of the required library contains definitions of those abstractions and classes which are "basic" to the whole organisation of the library. The term does not, however, refer to basic in relation to the language classes themselves (see the Sather Language specification for further details.

1. Abstract Classes :-

   1. $NIL - the abstract notion of a 'nil' value for a class.
   2. $IS_NIL - the abstract notion of a test whether any particular value is 'nil'.
   3. $IS_EQ - the abstract notion of an equality test.
   4. $IS_LT - the abstract notion of an ordering test between class values.
   5. $HASH - the abstract notion of a hash value derived from the value of some object.
   6. $STR - the abstract notion of a textual rendering of a value of the class sub-typing from this abstraction.
   7. $INSTR - the abstract notion of a class for which conversion both to text and from text is possible.
   8. $IMMUTABLE - the abstract notion of a class for which both text/value conversion and octet-stream/value conversion in both directions is possible.
   9. $COPY - the abstract notion of a copy operation.
   10. $VAR - the abstract notion of a reference variable with immutable semantics.
   11. $ELT - the abstract notion of an element of a container.
   12. $PORT - the abstract notion of a computer system port through which data may be exchanged with external devices.

2. Reference Classes :-

   1. ELT_NIL{T} - this class provides a nil value for an object of the argument type - which may not be an abstract type. It shall be an implementation of the $ELT_NIL{ETP} abstraction.
   2. ELT_EQ{T} - this class provides equality comparison for elements of the argument class, should the class not provide a specific equality test.
   3. ELT_LT{T} - this class provides a 'less than' comparison facility for objects of the argument class if no specific one is implemented.
   4. ELT_HASH{T} - this class provides the hash value of the element of the argument class. This is of use when defining container classes.
   5. CAST{T} - this class permits explicit narrowing from the general abstract class $OB to the class argument class.

| Language Index |  | Library Index

Comments or enquiries should be made to Keith Hopper. Page last modified: Monday, 26 February 2001. |