[omniORB] Deriving classes from _sk

casillas_juan_M/madrid_tecnologia2@sinvest.es casillas_juan_M/madrid_tecnologia2@sinvest.es
Fri, 11 Feb 2000 09:14:07 +0100


Hello !

   The usual method for implementing servants is derive from the class
_sk_*
   ok. My question is Can I do the following :

   echo.idl:   interface Echo { string say(in string msg); };

   after compiling the idl I got echo.hh echo.cc with the class _sk_Echo=

   now, I want to write some Echo Code:

      class Echo_i: public virtual _sk_Echo {
          public:
         Echo_i() { }
         virtual ~Echo_i() =3D 0;                          // remains pu=
re
virtual
         virtual char *say(const char *msg) =3D 0; // remains pure virtu=
al
           protected:
         void _do_one_thing() { /* ... */ }
         void _do_another_thing() { /* ... */ }
         GAP_DataContainer _container;
      };

      class More_Derived: public virtual Echo_i {
                   public:
         More_Derived: Echo_i::Echo_i() { /* ... */ }
         virtual ~More_Derived() { /* ... */ }
         virtual char *say(const char *msg) { =20
            /* .... */           // implement the method
            _do_one_thing();     // maybe using this methods, data
            /* ..... */          // structures and so on ...
          };
      };

   And the question is ... Can I use More_Derived just like I use Echo_i=

to =20
   create, invoke operations, register object references ... and so on ?=

Of course,
   I know that I only can call the methods and data structures that I
defined on
   the idl interface.

Kind Regards

Juan Manuel Casillas
Santander Investment
(systems/technology)
mail: jcasilla.madrid@sinvest.es