next up previous top
Next: Rename
Up: Property
Previous: Processor

RecordFormat

Description

The RecordFormat property is used to further specify SeqFile component definitions or instantiations in UniCon. It is used to specify the structure of the data in the sequential file associated with the SeqFile component.

A sequential file can be viewed as containing "records" of data. A record of data is a block of data that has a specific format (i.e., byte-level organization). For example, a record might have a format that is as simple as a sequence of characters, or it might have a more complex format such as a sequence of data of mixed data types (e.g., "int", "char", "double"). A sequential file can be viewed as being comprised of data in records that have a specific format. The input/output operations on a sequential file operate on the data as records, not individual bytes. The data, as records, have meaning in the application, and therefore records represent an abstraction of the data in the file.

The RecordFormat property is used to capture the organization of data in a sequential file in terms of records with a specific format. This property specifies the system designer's view of the structure of the contents of a sequential file. A specification of the RecordFormat property provides users of a SeqFile component with an indication of how the data in the file should be interpreted or used.

Property Lists

The RecordFormat property can legally be specified in the property list in the following UniCon language elements:

Value Syntax

The syntax of the value part of the RecordFormat property is a list of "string"s or <identifier>s, enclosed in parentheses.

Required Rule

Optional

The default value for the RecordFormat property is "line".

Merge Rule

REPLACE

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

Semantic Checks

No semantic checks are performed on the value of the RecordFormat property.

Example

The following is an example of a specification of a RecordFormat property. It is embedded in the interface of a SeqFile component definition:

  INTERFACE IS
    TYPE SeqFile
    RECORDFORMAT ("line")
    PLAYER read IS ReadNext
    PLAYER write IS WriteNext
  END INTERFACE
The data type "line" in the RecordFormat property indicates that the sequential file contains records that have the structure of lines (i.e., sequences of characters terminated by a carriage return). Data streams that are read from the file should be read and interpreted as lines, and data streams written to the file should be written as lines. Below is another example:

  INTERFACE IS
    TYPE SeqFile
    RECORDFORMAT ("integer", "char", "double")
    PLAYER read IS ReadNext
    PLAYER write IS WriteNext
  END INTERFACE
In the above RecordFormat property, the value contains three data type specifications. This means that the file contains data organized into records, where each record has three members of the given data types. Data streams are read/written from/to the file using this data record format.


next up previous top
Next: Rename
Up: Property
Previous: Processor

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996