[omniORB] Interface Inheritance

Vázquez Landa, David david.vazquez-landa at ndsatcom.com
Fri Jan 9 09:56:08 GMT 2009


Hi, I have a quick question.

Say I have an IDL such as:

Interface BaseInterface 
{
	void forty(int two);
};

Interface ChildInterface : BaseInterface 
{
};

And then in the c++ implementation I want to have something like:

// --- some random class does:
Void test (BaseInterface_var baseInterface)
{
	cout << "yay";
}

// --- I want to call this function with the child interface.

// For the sake of the argument:
ChildInterface_var childInterface = getChildInterface();

// This doesn't work
test(childInterface);


So, what would be the way to make this work?  Should I use ChildInterface_ptr instead?
And if I use ChildInterface_ptr, do I have to explicitly destroy it once I'm finished using it? If so, how?

Hmm... This is kind of driving me nuts ¬¬

Thanks :)
David.



More information about the omniORB-list mailing list