DynaMix  1.3.7
A new take on polymorphism in C++
next_bidder.hpp File Reference
#include "global.hpp"
#include "message_macros.hpp"
#include "exception.hpp"
#include "object.hpp"

Macros

#define DYNAMIX_CALL_NEXT_BIDDER(message_tag, ...)   ::dynamix::call_next_bidder(this, message_tag, ##__VA_ARGS__)
 Macro that calls the next bidder from a message with a higher bid. More...
 
#define DYNAMIX_HAS_NEXT_BIDDER(message_tag)   ::dynamix::has_next_bidder(this, message_tag)
 Macro that checks if a bidder with a lower bid exists from a message with a higher bid. More...
 

Functions

template<typename Mixin , typename Message , typename... Args>
auto dynamix::call_next_bidder (Mixin *mixin, Message *message, Args &&...args) -> decltype(std::declval< typename Message::caller_func >()(nullptr, std::forward< Args >(args)...))
 
template<typename Mixin , typename Message >
bool dynamix::has_next_bidder (Mixin *mixin, Message *message)
 

Detailed Description

Functions and macros associated with calling and querying the next bidder of a message,

Macro Definition Documentation

#define DYNAMIX_CALL_NEXT_BIDDER (   message_tag,
  ... 
)    ::dynamix::call_next_bidder(this, message_tag, ##__VA_ARGS__)

Macro that calls the next bidder from a message with a higher bid.

Use it in the method which implements a given message. The return type is the same as the message return type.

Parameters
message_tagis the message tag for the required message (ie foo_msg)
argsare the arguments for this message. Typically the same as the arguments of the current method.
#define DYNAMIX_HAS_NEXT_BIDDER (   message_tag)    ::dynamix::has_next_bidder(this, message_tag)

Macro that checks if a bidder with a lower bid exists from a message with a higher bid.

Use it in the method which implements a given message.

Parameters
message_tagis the message tag for the required message (ie foo_msg)