IDL pragma directives

For information on preprocessor directives that can be used in Interface Definition Language (IDL), see "IDL include directives".

localonly pragma

This pragma supports the generation of bindings for objects that are known to be local (not distributed). This pragma can occur at any point in the IDL file following the definition or forward declaration of the designated interface.

The syntax is:

#pragma meta interface-name localonly

The IDL interface identified by interface-name is treated by generated bindings as strictly local to the caller's process. No calls to the CORBA Object Request Broker (ORB) occur when invoking the operations defined in this interface. interface-name can be a simple name of an interface in the current scope or a fully- or partially qualified interface name. The interface must be previously defined or forward declared when the pragma statement is encountered.

localonly abstract pragma

This pragma is like the localonly pragma, but it signifies an abstract function that cannot be instantiated. These types of interfaces are used to just define interfaces.

The syntax is:

#pragma meta interface-name localonly abstract

cpponly pragma

This pragma suppresses the generation of IOM interlanguage bindings.

The syntax is:

#pragma meta interface_name cpponly

In the default case, without this pragma, two sets of bindings are produced:

Without this pragma, only the standard CORBA C++ bindings are produced.

init pragma

This pragma specifies a function used to initialize newly created objects.

The syntax is:

#pragma meta method-name init

This pragma allows the IDL to specify the name of a function used to initialize the newly created method. When this pragma is not used, the emitters produce a _create() function that does not take parameters and does no initialization after the new object is created.

For example, if the IDL contains:

interface A 
{
   void initFunction(int);
};
#pragma meta A::initFunction init

the C++ class A that implements interface A has a _create() function that takes an int parameter (because initFunction takes an int). Also, the code inside _create(int) creates a new instance of class A, calls initFunction(int) on the newly created object, and passes along its int parameter.

ID pragma

This CORBA-defined pragma overrides the default RepositoryID for an IDL entity.

The syntax is:

#pragma ID scoped-name literal-string

This sets the RepositoryID of scoped-name to literal-string instead of the default Repository ID.

Prefix pragma

This CORBA-defined pragma sets the RepositoryID prefix.

The syntax is:

#pragma prefix string

This sets the current prefix used in generating OMG IDL format RepositoryIDs. The specified prefix applies to RepositoryIDs generated after the pragma until the end of the current scope is reached or another prefix pragma is encountered.

version pragma

This CORBA-defined pragma sets the RepositoryID version number.

The syntax is:

#pragma version scoped-name major.minor

This uses the major.minor as the version number for RepositoryID of the scoped-name.


Related concepts
Interface Definition Language (IDL)



Searchable topic ID:   rcor_idlpra
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_idlpra.html

Library | Support | Terms of Use | Feedback