Macro BOOST_IDL_ENDxxx

Description
Headers
Synopsis
Reference
BOOST_IDL_END
BOOST_IDL_ENDz
BOOST_IDL_END_TEMPLATE

Description

The macros BOOST_IDL_END, BOOST_IDL_ENDz and BOOST_IDL_END_TEMPLATE are used to conclude an interface definition in the macro-based interface definition language (IDL).

To Do

Headers

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

Synopsis

#define BOOST_IDL_END_TEMPLATE(name, arity) ...
#define BOOST_IDL_END(name)  BOOST_IDL_END_TEMPLATE(name, 0)
#define BOOST_IDL_END1(name) BOOST_IDL_END_TEMPLATE(name, 1)
#define BOOST_IDL_END2(name) BOOST_IDL_END_TEMPLATE(name, 2)
...
#define BOOST_IDL_ENDN(name) BOOST_IDL_END_TEMPLATE(name, N)

Reference

BOOST_IDL_END

#define BOOST_IDL_END(arity) ...
Parameters
name- The name of the interface being defined

The macro BOOST_IDL_END(name) is used to conclude the definition of a non-templated interface name. E.g., the following IDL definition

BOOST_IDL_BEGIN(IBar)
    BOOST_IDL_FN0(foo, void)
BOOST_IDL_END(IBar)

is equivalent to the pseudocode

interface IBar {
    void foo();
};

BOOST_IDL_ENDz

#define BOOST_IDL_ENDz(arity) ...
Parameters
name- The name of the interface being defined

The macro BOOST_IDL_ENDz(name) is used to conclude the definition of a z-ary templated interface name. E.g., the following IDL definition

template<typename T>
    BOOST_IDL_BEGIN1(IStack)
    BOOST_IDL_CONST_FN0(empty, bool)
    BOOST_IDL_FN1(push, void, const T&)
    BOOST_IDL_FN0(pop, void)
    BOOST_IDL_FN0(top, T&)
    BOOST_IDL_CONST_FN0(top, const T&)
BOOST_IDL_END1(IStack)

is equivalent to the pseudocode

template<typename T>
interface IStack {
    bool empty() const;
    void push(const T&);
    void pop();
    T& top();
    const T& top() const;
};

BOOST_IDL_END_TEMPLATE

#define BOOST_IDL_END_TEMPLATE(name, arity) ...
Parameters
name- The name of the interface being defined
arity- The template arity of the interface being defined

The macro BOOST_IDL_END_TEMPLATE(name, arity) is used to conclude the definition of a templated interface name, if arity is non-zero, and a non-templated interface name otherwise. E.g., the following IDL definition

template<typename T>
BOOST_IDL_BEGIN_TEMPLATE(IStack, 1)
    BOOST_IDL_CONST_FN0(empty, bool)
    BOOST_IDL_FN1(push, void, const T&)
    BOOST_IDL_FN0(pop, void)
    BOOST_IDL_FN0(top, T&)
    BOOST_IDL_CONST_FN0(top, const T&)
BOOST_IDL_END_TEMPLATE(IStack, 1)

is equivalent to the pseudocode

template<typename T>
interface IStack {
    bool empty() const;
    void push(const T&);
    void pop();
    T& top();
    const T& top() const;
};

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