Contents   Index   Search   Previous   Next


E.2.2 Remote Types Library Units

1
   [A remote types library unit supports the definition of types intended for use in communication between active partitions.]

Language Design Principles

1.a
The restrictions governing a remote types package are similar to those for a declared pure package. However, the restrictions are relaxed deliberately to allow such a package to contain declarations that violate the stateless property of pure packages, though it is presumed that any state-dependent properties are essentially invisible outside the package.

Syntax

2
{categorization pragma (Remote_Types) [partial]} {pragma, categorization (Remote_Types) [partial]} The form of a pragma Remote_Types is as follows:
3
  pragma Remote_Types[(library_unit_name)];

Legality Rules

4
   {remote types library unit} A remote types library unit is a library unit to which the pragma Remote_Types applies. The following restrictions apply to the declaration of such a library unit:
5
6
7
7.a
Reason: This is essentially a ``methodological'' restriction. A separate copy of a remote types package is included in each partition that references it, just like a normal package. Nevertheless, a remote types package is thought of as an ``essentially pure'' package for defining types to be used for interpartition communication, and it could be misleading to declare visible objects when no remote data access is actually being provided.
8
8.a
Reason: This is to prevent the use of the predefined Read and Write attributes of an access type as part of the Read and Write attributes of a visible type.
9/1
     {8652/0082} {remote access type} An access type declared in the visible part of a remote types or remote call interface library unit is called a remote access type. {remote access-to-subprogram type} {remote access-to-class-wide type} Such a type shall be: either an access-to-subprogram type or a general access type that designates a class-wide limited private type.
9.1/1
9.2/1
9.3/1
       {8652/0081} A type that is derived from a remote access type is also a remote access type.
10
    The following restrictions apply to the use of a remote access-to-subprogram type:
11
12
13
    The following restrictions apply to the use of a remote access-to-class-wide type:
14/1
15
16/1
17/1
17.a
Reason: All three of these restrictions are because there is no storage pool associated with a remote access-to-class-wide type.
NOTES
18
5  A remote types library unit need not be pure, and the types it defines may include levels of indirection implemented by using access types. User-specified Read and Write attributes (see 13.13.2) provide for sending values of such a type between active partitions, with Write marshalling the representation, and Read unmarshalling any levels of indirection.

Contents   Index   Search   Previous   Next   Legal