OpenTP1 Version 7 Programming Reference C Language
Type declaration
Format
typedef [ [type_attribute, ...] ] type_specifier type_declarator, ...;
|
Meaning
The type declaration defines a type used by an interface.
Specification item
type_attribute
Specify the attributes of the type to be declared. The following attributes can be specified:
- string
Character string
- ptr
Complete pointer
- ref
Reference pointer
type_specifier
Specify a data type. The basic type, configuration type (structure only), or any predefined type can be specified.
type_declarator
Specify the declarator of the type to be defined. The following can be specified:
- Simple declarator
- Fixed-length one-dimensional array
- Pointer
Explanation
- The string attribute can be specified in char and byte arrays only.
- The ptr and ref attributes can be specified only for pointers to the basic type and structure type.
OpenTP1 IDL-only TxRPC restriction
- union and enum cannot be used as the configuration type.
- A pointer to a function or array cannot be specified as a declarator.
- Adjustable and variable-length arrays cannot be used.
- Multi-dimensional arrays cannot be used.
- The following type attributes cannot be used:
transmit_as, handle, context_handle, vl_struct, vl_array, vl_string, and vl_enum
- Only one pointer can be specified.
- No pointer can be specified for a structure member.
- The structure cannot be specified as a structure member.
- If the string attribute is specified, it is simply ignored without causing an error.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.