![]() |
Section 6.2.2:
|
![]() |
An implementation class contains features which implement all of the functionality of the abstract data types from which it inherits; it may also implement additional features. In practice, it is common to find that 'creation' features of a class are not part of any super-type abstractions. Where a particular type is not related to any other type either by direct inheritance or otherwise it is not essential that an abstraction for this be defined since there is only one implementation.
All forms of implementation class are syntactically similar with the one exception - an external class may contain merely the signatures which bind to external resources.
Partial classes which do contain implementation source text are not formal classes in the sense that they may not be instantiated. They are a concrete syntax feature of the language only.
Where a partial class is included then (with parameter substitution if necessary) it forms part of the text of the including class. For this reason the existence of the partial class is merely at the source text level (possibly using macro-style substitution for generic arguments when present). It does not form a separate program component.
See additionally the stub mechanism which is provided, again at the concrete syntax level, to enable 'forward' definitions to be given which require a suitable implementation in the including class.
Corresponding to the above concrete syntax there are three corresponding abstract forms of a Class_Def - with different kind and different invariants. The kind component is used when evaluating the dynamic semantics of a class instantiation feature.
The well-formedness criteria for the first two implementation class kinds is, at this level, identical. However, at the class element and below the kind component needs to be taken into account for well-formedness checking. This relates to the different role played by an immutable and a reference class.
For an external class the criteria for well-formedness are different since an external class may define -
NOTE | The well-formedness function wf_external_signature is essentially implementation-defined by virtue of the differing external environments on various computer platforms. It should be compatible with wf_abstract_signature but may make restrictions on the kind of arguments or return values from such external features. |
TO BE DONE
![]() |
Specification Index | ![]() |
Language Index | ![]() |
Examples | ![]() |
Section 6 Index |
Comments
or enquiries should be made to Keith Hopper. Page last modified: Wednesday, 25 October 2000. |
![]() |