NonStop Software

IDL to C++ Mapping for Derived Interfaces

Previous Topic | Next Topic | Contents | Index
Getting Started Guide | Administration Guide | Programmer's Guide

This section covers the IDL to C++ mapping of interfaces that are derived from other interfaces or a base interface. For example, the following IDL code defines an interface:

// IDL
interface StateFee : NationalTax {
  void setFeeLimit(
     CORBA::Float limit);
};

The C++ mapping for this example is as follows:

// C++
class StateFee : public virtual NationalTax {
public:
  virtual void setFeeLimit(
     CORBA::Float limit);
};

CORBA and C++ (based on the proposed draft ANSI C++ standard) conformance does not allow normal or cast assignments to be made from a base class object reference to a derived class object reference.

Refer to Inheritance and Widening and Narrowing Object References for more information about derived interfaces.

Previous Topic | Next Topic | Contents | Top
Getting Started Guide | Administration Guide | Programmer's Guide
Bibliography | Index | Glossary
© Tandem, a division of Compaq. All rights reserved. Legal notices.