Download ORBACUS, this manual

Transcript
Locating Objects
CHAPTER 6
6.1
Obtaining Object References
Using CORBA, an object can obtain a reference to another object in a multitude of ways.
One of the most common ways is by receiving an object reference as the result of an operation, as demonstrated by the following example:
1
2
3
4
5
6
7
8
9
// IDL
interface A
{
};
interface B
{
A getA();
};
2-4
An interface A is defined.
6-9
An interface B is defined with an operation returning an object reference to an A.
On the server side, A and B can be implemented in C++ as follows:
1 // C++
2 class A_impl : public POA_A,
3
public PortableServer::RefCountServantBase
ORBacus
97