typedef

/* IDL file typedef syntax */
typedef [ [ idl-type-attribute-list ] ] type-specifier declarator-list;

/* ACF typedef syntax */
typedef [ acf-type-attribute-list ] typename;

idl-type-attribute-list

Specifies one or more attributes that apply to the type. Valid type attributes in an IDL file include handle, switch_type, transmit_as; the pointer attribute ref, unique, or ptr; and the usage attributes context_handle, string, and ignore. Separate multiple attributes with commas.

type-specifier

Specifies a base_type, struct, union, enum type, or type identifier. An optional storage specification can precede type-specifier. The const keyword can precede type-specifier.

declarator-list

Specifies standard C declarators, such as identifiers, pointer declarators, and array declarators. For more information, see pointersH20NZW and arrays1EV5ZM5. The declarator-list consists of one or more declarators, separated by commas.

acf-type-attribute-list

Specifies one or more attributes that apply to the type. Valid type attributes in an ACF include allocate, encode, and decode.

typename

Specifies a type defined in the IDL file.

 

Remarks

The IDL typedef keyword allows typedef declarations that are very similar to C-language typedef declarations. The IDL typedef declaration is augmented to allow you to associate type attributes with the defined types. Valid type attributes include handleXBOF9Y, switch_typeF5.LML, transmit_as9A6WIB; the pointer attribute refJ2W2ZM, unique10OJSBY, or ptr2KNOZZ3; and the usage attributes context_handle7.HMTE, stringFLGKOK, and ignore3MBTOGC. 

The typedef keyword in an ACF applies attributes to types that are defined in the corresponding IDL file. For example, the allocate type attribute allows you to customize memory allocation and deallocation by both the application and the stubs.

The ACF typedef statement appears as part of the ACF_body. Note that the ACF typedef syntax is different from the IDL typedef syntax and the C-language typedef syntax. No new types can be introduced in the ACF.

See Also

ACF, allocate, decode, encode, IDL