![]() |
Section 8.15.1.2: |
![]() |
This class is more a grouping of utility routines than a class. It has no state associated with it - and therefore no creation routine.
The routines contained in this class are generic, relating to any kind of object and providing essential common functionality needed at the lowest level when implementing a library.
While the specification of the language itself requires that any implementation provide garbae collection, occasions may arise, particularly where a local heap item is being discarded, when it is possible to give the garbage collector a hint that something is finished with. This destroy operation is designed to provide this hint. It may, being only a hint, be ignored by any garbage collector implementation.
This very special routine is provided for use on those rare occasions when it is known that explicit object destruction is appropriate. At the very least, this routine can be ignored - at the most it could immediately garbage collect the object. The choice of action is implementation-dependent.
This equality test is provided for situations in which a class may not necessarily have specified an equality predicate based on the value of the objects being compared. This feature therefore provides an equality test that the two objects being compared are (or are not) the same object.
This predicate returns true if and only if the two objects are determined to be the same according to some implementation-defined rule.
This feature provides an ordering facility on objects in an implementation-defined manner. The implementation must guarantee that a total ordering on objects is provided.
This predicate returns true if and only if obj1 is less than obj2 according to some implementation-defined rule.
This feature provides a hash value on any object, based upon its identity rather than its value.
This makes use of the set 'objects' which contains all of the possible objects which could ever exist in a program. The post-condition is therefore an ideal rather than always practical since there is a limitation on the domain of CARD which does not apply to the domain nat!
This routine shall produce a hash value in such a way that repeated application to the same object yields the same hash value but that application to all other possible objects does not yield the same hash value.
This feature provides an implementation-defined identifying code for any object.
This routine returns the implementation-dependent identity for the object given.
This feature returns a code value which identifies the type of the argument in an implementation-dependent manner. The prime function of this is to provide an argument value from which str_for_tp can provide a text string version of the name(see below).
Note that the vdm function type_of is defined in section 6.9.
This routine returns a unique reference to the type of the argument object.
This feature provides a facility to obtain a string representation of the name of the type in the coding and representation in use when the class was translated. It may be necessary, therefore, to convert the encoding if a representation suitable for a human reader is needed (see the class STR).
str_for_tp | ( |
obj : $OB | |
) : STR |
This routine returns a string in the current default repertoire and encoding which is a textual representation of the name of the type the reference to which is the argument.
This feature is provided for use when using the resource components of the internationalisation facilities in order to obtin a portable name for the type concerned. This may then be used in looking up the localised resources during programme execution.
This routine returns the programmer defined class name for the given object in the form of runes (encoded in ISO/IEC 10646-1 encoding). This is required for the internationalisation features of this library.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Sather RT Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Monday, 22 May 2000. |
![]() |