next up previous contents
Next: Array Classes Up: Predefined Features and Classes Previous: Predefined Features

Predefined Classes

  All implementations of SATHER-K contain a number of predefined classes. In this section we give a rough description of these predefined classes. Further details are contained in the documentation of the SATHER-K library.

The following abstract classes are used for structuring the type system and the type dependence graph:

OB:
By definition every class conforms to OB.

REFERENCE:
Every reference class is automatically a subtype of this class. It defines assignment and the operation is_equal for all reference classes.

VALUE:
Every value class is automatically a subtype of this class. It defines assignment and the operation is_equal for all value classes.

EXCEPTION:
Every exception class, including user defined exceptions, must be a a subtype of EXCEPTION. The class EXCEPTION is a reference class and contains the readonly attributes file_name:STRING and line_number:INT which describe the source position of the origin of the exception.

EXTOB:
EXTOB is a simple value type which could be used to reference objects defined in other programming languages. It is guaranteed to be able to hold values of any pointer type of the target machine.

The following classes provide services needed from the operating system:

FILE(T):
It defines sequential files of elements of type T.

TEXT:
It defines the properties of text input and output. It defines the input/output procedures str_in and str_out. str_in(x) is defined for arguments of all simple value types and of STR and STRING. str_out(x) is defined for values of types STR and STRING and for all other types T by str_out( tex2html_wrap_inline2585 ): TEXT is res := str_out(x.str) end.

There are three objects sin, sout and serr of type TEXT which designate standard input, standard output and standard error output. The simple value types and STR and STRING define str_in and str_out as parameterless procedures for input and output on the standard input and output.




next up previous contents
Next: Array Classes Up: Predefined Features and Classes Previous: Predefined Features

Martin Trapp
Mon Feb 17 16:49:16 MET 1997