13.1.18.1 Skeleton Derivation from Object

In several existing ORB implementations, each skeleton class derives from the corresponding interface class. For example, for interface Mod::A, the skeleton class POA_Mod::A is derived from class Mod::A. These systems, therefore, allow an object reference for a servant to be implicitly obtained via normal C++ derived-to-base conversion rules:

// C++
MyImplOfA my_a;     // declare impl of A
A_ptr a = &my_a;   // obtain its object reference
                  // by C++ derived-to-base conversion

Such code can be supported by a conforming ORB implementation, but it is not required, and is thus not portable. The equivalent portable code invokes _this() on the implementation object to implicitly register it if it has not yet been registered, and to get its object reference:

// C++
MyImplOfA my_a;          // declare impl of A
A_ptr a = my_a._this();  // obtain its object reference