C++98 Mapping for Local Interfaces
On this page:
Mapped C++ Class
A Slice local interface is mapped to a C++ abstract base class with the same name, for example:
Slice
module Ice { local interface Communicator { ... } }
is mapped to the C++ class Communicator
:
C++
namespace Ice { class Communicator : public virtual Ice::LocalObject { ... }; }
LocalObject in C++
All Slice local interfaces implicitly derive from LocalObject
, which is mapped to class Ice::LocalObject
in C++98:
C++
namespace Ice { class LocalObject : public virtual IceUtil::Shared { public: virtual bool operator==(const LocalObject&) const; virtual bool operator<(const LocalObject&) const; }; typedef IceInternal::Handle<LocalObject> LocalObjectPtr; }
Mapping for Local Interface Inheritance in C++
Inheritance of local Slice interfaces is mapped to public virtual inheritance in C++. For example:
Slice
module M { local interface A {} local interface B extends A {} local interface C extends A {} local interface D extends B, C {} }
is mapped to:
C++
namespace M { class A : public virtual Ice::LocalObject { ... }; class B : public virtual A { ... }; class C : public virtual A { ... }; class D : public virtual B, public virtual C { ... }; }