CORBA C++ bindings for constants

Constants can be defined within the Interface Definition Language (IDL) in either of the following ways:

If you declare an IDL constant within a module or interface, the constant is mapped as a static data item local to the C++ class for that module or interface. If you declare an IDL constant globally, the constant is mapped as a static data item global to that client application.

For example, consider the following IDL:

module M
{
    const string name = "testing"; 
};

After compiling the client bindings, a C++ client application can refer to the constant using the expression M::name.

If the same constant is declared globally, outside any module or interface, then (after compiling the client bindings) a C++ client application can refer to the constant using the expression name.


Related reference
CORBA C++ bindings



Searchable topic ID:   rcor_copcbc
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_copcbc.html

Library | Support | Terms of Use | Feedback