[omniORB] Server-side access to non-IDL implementation methods.

Dietmar May dcmay@dmis.com
Sun, 10 Sep 2000 20:38:28 -0400


What is the correct way to access the member functions of a derived =
implementation class? I've always assumed that a dynamic_cast<> was =
appropriate, and it does indeed work in 2.8.0. However, I'm wondering if =
this will still be valid for 3.0?


An example:

interface ImplA
{
   void exported_method ();
};

interface ImplB
{
   void do_something (in ImplA it);
};


class MyImplA : public _sk_ImplA
{
public:
   virtual void exported_method ();

   Data* internal_helper_method ();
};

class MyImplB : public _sk_ImplB
{
public:
   virtual void do_something (ImplA_ptr _a)
   {
      MyImplA* p_a =3D dynamic_cast<MyImplA*>(_a);
      Data* p_data =3D p_a->internal_helper_method();
   }
};


This works in 2.8.0. Will it still in 3.0? If not, what is the correct =
way to handle this?

Thanks,
Dietmar May

Object Workshops
http://www.object-workshops.com