Macro BOOST_IDL_EXTENDS

Description
Headers
Reference
Examples

Description

The macro BOOST_IDL_EXTENDS is used within an interface definition to declare a superinterface.

Headers

<boost/interfaces.hpp>
<boost/interfaces/detail/idl/extends.hpp>

Reference

BOOST_IDL_EXTENDS

#define BOOST_IDL_EXTENDS(name) ...
Parameters
name- The name of the superinterface being declared

The macro BOOST_IDL_EXTENDS is used within an interface definition to declare a superinterface.

Several invocations of BOOST_IDL_EXTENDS may occur in a single interface definition. Order is significant: functions in a superinterface will hide like-named functions in a superinterface declared by a preceeding invocation of BOOST_IDL_EXTENDS. This is an unfortunate consequence of the fact that interfaces are implemented using single inheritance to take full advantage of the Empty Base Optimization (EBO).

Examples

The IDL definition

BOOST_IDL_BEGIN(IDerived)
    BOOST_IDL_EXTENDS(IBase)
    BOOST_IDL_FN0(foo, void)
BOOST_IDL_END(IDerived)

is equivalent to the pseudocode

interface IDerived : IBase {
    void foo();
};
The IDL definition

BOOST_IDL_BEGIN(IDerived)
    BOOST_IDL_EXTENDS(IBase1)
    BOOST_IDL_EXTENDS(IBase2)
    BOOST_IDL_EXTENDS(IBase3)
    BOOST_IDL_FN0(foo, void)
BOOST_IDL_END(IDerived)

is equivalent to the pseudocode

interface IDerived : IBase1, IBase2, IBase3 {
    void foo();
};

Sha'arei Tefila, an Orthodox Shul (Synagogue) in Salt Lake City, Utah Chabad Lubavitch of Utah