[omniORB] Help for a beginner
Michael
omniorb at bindone.de
Fri Aug 1 06:05:59 BST 2008
Hello Michel,
I would suggest reading a book about CORBA (this is not omniORB specific).
In general, there are no constructors in CORBA (remember, the I in IDL
means Interface) - instead you'll have to use the factory pattern.
A possible similar effect of an interface that represents your example is:
module Test
{
interface A
{
void foo();
};
interface B: A
{
void doSomething();
};
interface BFactory
{
B createB(in Test::A a);
};
};
The implementation would include the followin:
- Implementation of BFactory (normally a singleton)
- Implementation of B
- Implementation of A
- A main that initializes the ORB, creates POAs, registers BFactory
in a well-known place (e.g. using the naming service), so clients
can factor objects of type B and starts up the orb. Since you're
only passing around object references the question here would be
where to get object references of A (besides nil references).
In the end, try to get a copy of "Advanced CORBA Programming with C++"
to understand what CORBA is about.
cheers
michael
debutant wrote:
> Hello,
>
> I would really appreciate any help to understand how omniORB works.
>
> Imagine I have a c++ solver that consists in two classes:
>
> class A { ...}
> class B { B(A a);
> void DoSomething();
> }
>
> What could be an idl module for it? And what would be the implantation ?
> Many thanks in advance
> Sincerely,
> Michel
>
>
More information about the omniORB-list
mailing list