Stub header files are generated for all IDL modules that include interfaces that the component implements—you must include all these stub header files. In addition to the stub header files, you must also include SessionManager.hpp (which contains the classes and functions that allow a C++ client to create and destroy sessions) in the client source file.
You can also include these optional header files:
TabularResults.hpp – contains the classes and functions that allow C++ clients to receive result sets from components.
CosNaming.hpp – contains the classes and functions that allow C++ clients to use the EAServer’s name service feature to bind a component to a name that must be unique within a naming context.
BCD.hpp – contains the mappings for binary and arbitrary precision floating point-decimal datatypes.
MJD.hpp – contains the datatype mappings from CORBA to C++ for Modified Astronomical Julian Date (M.J.D.) dates and times.
TabularResults.hpp already includes BCD.hpp and MJD.hpp; if you include TabularResults.hpp, you do not have to include BCD.hpp and MJD.hpp.
You must use scoped names to the CORBA IDL module, the EAServer SessionManager IDL module, and any component IDL modules that you want to execute methods on. To make using scoped names easier, you can use the C++ using statement for the IDL module namespaces as in the following example:
using namespace CORBA; using namespace SessionManager;
If your C++ compiler does not support namespaces, define the compiler macro JAG_NO_NAMESPACE when compiling your source files.
When you create an object, identify the object reference by appending _var to the object name. The ObjectName_var reference will be automatically released when it is deallocated or assigned a new object reference.
CORBA::is_nil(Object) can be used to verify that a specific interface is implemented by a component. For an example, see “Creating a Manager instance”.
If you are returning result sets from components, you should also specify the TabularResults EAServer IDL module with the using statement.
Copyright © 2005. Sybase Inc. All rights reserved. |