A few classes are elementary to TOM. Some of these are defined in the
TOM unit (see section unit tom), others are present in the unit built into
the compiler, called _builtin_
. (Note that it is impossible to
refer to this unit directly, as TOM does not allow an identifier to
start with an underscore. This is intentional.)
_builtin_.Top
_builtin_.Any
Any
.
In this context, all defined classes are those classes whose location in
the inheritance graph is known, i.e. those classes of which the
declaration has been read.
tom.State
State
is the superclass of all classes with allocatable
instances; it is the state introduced by State
that allows the
dynamic binding and all the other services offered by the runtime to
actually function.
tom.All
All
defines methods needed for both classes and
instances, such as perform :
. It is inherited by both the
State
class and the State
instance. It is considered good
practice for any behavioural instance which does not inherit anything,
to inherit instance (All)
. Furthermore, if a method accepts all
objects as the value for a particular argument, the type of the argument
should be All
.
Go to the first, previous, next, last section, table of contents.