next up previous top
Next: InitActuals
Up: Property
Previous: IDLType

ImplType

Description

The ImplType property is used to further specify a variant definition in the primitive implementation of a UniCon component. It is used to describe the form of the contents of the external source file in a <variant> definition. The external source file is specified in double-quotes after the word IN in the <variant> definition. The UniCon compiler generates the appropriate Odin system construction instructions for the external source file based on its implementation type (i.e., ImplType).

For example, if the file is a Source file, the UniCon compiler assumes it contains source code in a conventional programming language and instructs Odin to compile it with the appropriate programming language compiler. If it is Object code, the UniCon compiler instructs Odin to simply link it with the other code into the executable that it is building. If the external source file is an executable, the UniCon compiler generates no construction instructions, since it has already been built.

The following forms of external source are recognized in UniCon:

source code in a conventional programming language - it gets compiled with the appropriate programming language compiler, and linked with other source into an executable
object code - it gets linked with other source into an executable
a Unix archive file containing object code - it gets linked with other source into an executable
a C language include file - no further construction is necessary
a binary executable - no further construction is necessary
a sequential file containing ASCII data - no further construction is necessary
a file containing a specification of remote routine definitions exported by a server process in the IDL-like language of a particular RPC facility - the appropriate RPC facility's IDL compiler is used to generate the glue code for client and server processes, and then this code gets compiled and linked with other source into the executables for these processes

Property Lists

The ImplType property can legally be specified in the property list in the following UniCon language element:

Value Syntax

The syntax of the value part of an ImplType property is one of the seven keywords source, object, objectlibrary, executable, include, data or mig, optionally enclosed in double-quotes, surrounded by parentheses. The case of the letters can be upper, lower, or mixed.

Required Rule

Optional

The default value for the ImplType property is "source".

Merge Rule

REPLACE

Subsequent specifications of the ImplType property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses).

Semantic Checks

The following are the semantic checks performed on the value of the ImplType property:

  1. The value of the ImplType property must be one of the following seven keywords: source, object, objectlibrary, executable, include, data, or mig.

  2. If the value of the ImplType property is object, the file name in the IN clause of the variant must have a ".o" extension.

  3. If the file name in the IN clause of the variant has a ".o" extension, the value of the ImplType must be object.

  4. If the value of the ImplType property is objectlibrary, the file name in the IN clause of the variant must have a ".a" extension.

  5. If the file name in the IN clause of the variant has a ".a" extension, the value of the ImplType must be objectlibrary.

  6. If the value of the ImplType property is mig, the file name in the IN clause of the variant must have a ".defs" extension.

  7. If the file name in the IN clause of the variant has a ".defs" extension, the value of the ImplType must be mig.

Example

The following are three examples of specifications of an ImplType property. The examples show that the value of the ImplType property corresponds to the extension in the name of the file in the variant:

  VARIANT My_Stack IN "stack.c"
    IMPLTYPE (Source)
  END My_Stack
VARIANT My_Stack IN "stack.o" IMPLTYPE (Object) END My_Stack
VARIANT My_Stack IN "stack.a" IMPLTYPE (ObjectLibrary) END My_Stack

next up previous top
Next: InitActuals
Up: Property
Previous: IDLType

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996