Macro BOOST_IDL_CONST_FNz

Description
Headers
Synopsis
Reference
Examples

Description

The macro BOOST_IDL_CONST_FNz is used to declare a const interface member function with arity z.

Headers

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

Synopsis

#define BOOST_IDL_CONST_FN0(name, result) ...
#define BOOST_IDL_CONST_FN1(name, result, arg_type1) ...
#define BOOST_IDL_CONST_FN2(name, result, arg_type1, arg_type2) ...
...
#define BOOST_IDL_CONST_FNN(name, result, arg_type1, ..., arg_typeN) ...

Reference

BOOST_IDL_CONST_FNz

#define BOOST_IDL_CONST_FNz(name, result, arg_type1, ..., arg_typez) ...
Parameters
name- The name of the member function being declared
result- The return type of the member function being declared
arg_typez- The zth argument type of the member function being declared

The macro BOOST_IDL_CONST_FNz is used to declare a const interface member function with arity z. It may occur between invocations of BOOST_IDL_BEGINxxx and BOOST_IDL_ENDxxx delimiting an interface definition, following any invocations of BOOST_IDL_EXTENDS. Invocations of BOOST_IDL_CONST_FNz may be interspersed with invocations of BOOST_IDL_FNz, without regard to order.

Overloading is permitted. The rules for overloading are the same as for an ordinary C++ class.

Examples

The IDL definition

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

is equivalent to the pseudocode

interface IBar {
    void foo() const;
};
Similarly, the IDL definition

BOOST_IDL_BEGIN(IBar)
    BOOST_IDL_CONST_FN0(foo, void)
    BOOST_IDL_CONST_FN2(foo, int, const std::string&, const std::string&)
BOOST_IDL_END(IBar)

is equivalent to the pseudocode

interface IBar {
    void foo() const;
    int foo(const std::string&, const std::string&) const;
};

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