![]() |
Section 8.15.1.1: |
![]() |
Instances of this class are references to external objects. An implementation may provide this facility in the most convenient way since it is opaque to the using program.
This feature is provided for use in those cases where it is known by the program writer that some external reference is a numeric value, in order to maintain the integrity of the class type safeness of the language.
create_from_value | ( |
val : $IMMUTABLE | |
) : SAME |
This routine converts the value object provided as argument into a reference which is meaningful to the execution environment. The exact form of this is implementation-dependent.
NOTE | The pre-condition is established so that the implementation can indicate that some particular object type or value cannot be converted into a reference. |
This feature provides a mechanism to convert an object into a reference to it suitable for use in external environment service calls.
create_from_object | ( |
obj : $OB | |
) : SAME |
This routine converts the reference object provided as argument into a reference to it which is meaningful to the execution environment. The exact form of this is implementation-dependent.
NOTE | The pre-condition is established so that the implementation can indicate that some particular object type cannot be converted into a reference. |
This feature creates a reference from a 'foreign' object - ie one defined using the external class mechanism with a named 'foreign' form (ie not being the external class kind 'OS'.
create_from_foreign | ( |
obj : $OB | |
) : SAME |
This routine treats the object provided as argument as a reference which is meaningful to the execution environment. The exact form of this is implementation-dependent.
This feature is provided as an implementation-dependent predicate to indicate if the object which is its argument is immutable in the sense understood by the underlying execution environment.
is_immutable | ( |
obj : $OB | |
) : BOOL |
Note that the auxiliary routine type_of is defined in section 6.9. The set immutables will normally be the set of all concrete classes which sub-type either directly or indirectly from the abstract class $IMMUTABLE.
This predicate returns true if and only if obj is an immutable object suitable for converting into a reference.
This feature is one of two which perform implementation-dependent object creation from an external reference.
This routine returns a Sather object for which self is a handle and for which the implementation can determine the type from the context in which it is called. If self is not valid then void is returned.
This second make_object feature is provided for making an object the type of which, though not the size, is known when translating the class; the size being known only at run-time.
make_object | ( |
size : CARD | |
) : $OB |
This routine returns a Sather object for which self is a handle and for which the implementation can determine the type (but not the size - which is only known at run-time and is the argument to this routine) from the context in which it is called. If self is not valid then void is returned.
This feature converts the reference into a cardinal number. Whther or not this is semantically meaningful must be decided by the programmer - as the language definition cannot do so.
This routine returns the cardinal number expressed by the reference bit_pattern.
This feature provides the facility to convert the reference into an integer value where this is meaningful within the program. This cannot be specified in the language.
This routine returns the possibly signed integer number expressed by the reference bit_pattern for use where low-level objects may either be a number or a reference.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Sather RT Index |
Comments
or enquiries should be made to Keith
Hopper. Page last modified: Sunday, 21 May 2000. |
![]() |