Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:tk:som:sc:ug [2024/10/11 08:19] – prokushev | en:docs:tk:som:sc:ug [2024/10/11 09:04] (current) – [Include section (Preprocessing)] prokushev | ||
---|---|---|---|
Line 141: | Line 141: | ||
Latest IBM SOM 3.0 supports CORBA IDL mostly at level of CORBA 1.1. somFree supports CORBA IDL 4.2 with all extensions found in SOM IDL. | Latest IBM SOM 3.0 supports CORBA IDL mostly at level of CORBA 1.1. somFree supports CORBA IDL 4.2 with all extensions found in SOM IDL. | ||
- | * Include Directives | + | ==== Preprocessing ==== |
+ | |||
+ | IDL shall be preprocessed according to the specification of the preprocessor in ISO/IEC 14882:2003. The preprocessor may be implemented as a separate process or built into the IDL compiler. | ||
+ | |||
+ | Lines beginning with # (also called " | ||
+ | |||
+ | A preprocessing directive (or any line) may be continued on the next line in a source file by placing a backslash character (\), immediately before the newline at the end of the line to be continued. The preprocessor effects the continuation by deleting the backslash and the newline. A backslash character may not be the last character in a source file. | ||
+ | |||
+ | The primary use of the preprocessing facilities is to include definitions from other IDL specifications. Text in files included with a #include directive is treated as if it appeared in the including file. | ||
+ | |||
+ | todo: #line | ||
+ | todo: #pragma | ||
+ | |||
+ | ==== Syntax ==== | ||
* Type and Constant Declarations (optional) | * Type and Constant Declarations (optional) | ||
* Exception Declarations (optional) | * Exception Declarations (optional) | ||
Line 147: | Line 161: | ||
* Module declaration (optional) | * Module declaration (optional) | ||
+ | ==== Example ==== | ||
Let's try to define our class interface. | Let's try to define our class interface. | ||
Line 366: | Line 381: | ||
* Methods section (optional) | * Methods section (optional) | ||
- | ==== Include section ==== | + | ==== Include section |
+ | |||
+ | Include section handled by SPP preprocessor. Preprocessor is a simple tool which includes files pointed by include section into the original file. | ||
Include section is optional and contains names of OIDL files with definition of parent class, metaclasses and private interfaces of ancestor classes. | Include section is optional and contains names of OIDL files with definition of parent class, metaclasses and private interfaces of ancestor classes. | ||
Line 378: | Line 395: | ||
ancestor is the name of the OIDL file containing the private part of an ancestor class' interface needed in the definition of this class. If ancestor is enclosed in angle brackets (%%<> | ancestor is the name of the OIDL file containing the private part of an ancestor class' interface needed in the definition of this class. If ancestor is enclosed in angle brackets (%%<> | ||
- | parent is the name of the OIDL file containing the parent class of the class for which the Include statement is provided. If parent is enclosed in angle | + | parent is the name of the OIDL file containing the parent class of the class for which the Include statement is provided. If parent is enclosed in angle brackets (%%<> |
- | brackets (%%<> | + | |
metaclass is the OIDL file containing the metaclass of the class for which the include statement is provided. If metaclass is enclosed in angle brackets (%%<> | metaclass is the OIDL file containing the metaclass of the class for which the include statement is provided. If metaclass is enclosed in angle brackets (%%<> | ||
+ | |||
+ | todo: @ line " | ||
==== Class section ==== | ==== Class section ==== | ||
Line 476: | Line 494: | ||
- | - Object Management Group, | + | - Object Management Group, |
- | - IBM, OS/2 2.0 Technical Library. System Object Model Guide and Reference. First Edition., 1991. https:// | + | - IBM, "OS/2 2.0 Technical Library. System Object Model Guide and Reference. First Edition, 1991" |
+ | - Object Management Group, "The Common Object Request Broker: Architecture and Specification. Revision 1.1, 1991" Available: https:// | ||