For those interested in the entire file (Somewhat large), here you go:
#ifndef BOOST_PP_IS_ITERATING
# ifndef vfx_input_InputSource_hpp__
# define vfx_input_InputSource_hpp__
# include
# include
# include
# include
# include
# include
# include
# ifndef MAX_PARAMETERS
# define MAX_PARAMETERS 5
# endif
namespace vfx
{
namespace input
{
template
class InputSource;
}} // end namespace vfx::input
# define BOOST_PP_ITERATION_LIMITS (1, MAX_PARAMETERS)
# define BOOST_PP_FILENAME_1 "InputSource.hpp"
# include BOOST_PP_ITERATE()
# endif // vfx_input_InputSource_hpp__
#else
# define i BOOST_PP_ITERATION()
# define INPUT_repeat(z, n, user) user
namespace vfx
{
namespace input
{
template
class InputSource<
t_return,
BOOST_PP_ENUM_PARAMS( i, t_param )
BOOST_PP_COMMA_IF( BOOST_PP_AND(BOOST_PP_NOT_EQUAL(i, 0),
BOOST_PP_NOT_EQUAL(i, MAX_PARAMETERS)) )
BOOST_PP_ENUM( BOOST_PP_SUB(MAX_PARAMETERS, i), INPUT_repeat,
detail::no_param )
>
{
private:
typedef typename boost::function FunctionType;
typedef typename boost::signal SignalType;
SignalType m_observers;
public:
void Publish( BOOST_PP_ENUM_BINARY_PARAMS(i, const t_param, ¶m)
)
{
m_observers(BOOST_PP_ENUM_PARAMS(i, param));
}
void Subscribe( FunctionType slot )
{
m_observers.connect( slot );
}
};
}} // end namespace vfx::input
# undef i
#endif // BOOST_PP_IS_ITERATING