Commit 71f28b45 authored by Dominik Charousset's avatar Dominik Charousset

added `skip_message` utility function

this utility function allows users to skip messages manually
parent e896953f
......@@ -133,6 +133,7 @@ set(LIBCPPA_SRC
src/middleman.cpp
src/object.cpp
src/object_array.cpp
src/on.cpp
src/opt.cpp
src/partial_function.cpp
src/primitive_variant.cpp
......
......@@ -227,24 +227,29 @@ namespace cppa {
/**
* @brief A wildcard that matches the argument types
* of a given callback. Must be the last argument to {@link on()}.
* of a given callback. Must be the last argument to {@link on()}.
* @see {@link math_actor_example.cpp Math Actor Example}
*/
constexpr ___ arg_match;
constexpr __unspecified__ arg_match;
/**
* @brief Left-hand side of a partial function expression.
*
* Equal to <tt>on(arg_match)</tt>.
*/
constexpr ___ on_arg_match;
constexpr __unspecified__ on_arg_match;
/**
* @brief Right-hand side expression to *not* match a particular pattern.
*/
constexpr __unspecified__ skip_message;
/**
* @brief A wildcard that matches any value of type @p T.
* @see {@link math_actor_example.cpp Math Actor Example}
*/
template<typename T>
___ val();
__unspecified__ val();
/**
* @brief A wildcard that matches any number of any values.
......@@ -259,7 +264,7 @@ constexpr anything any_vals;
* {@link cppa::any_vals any_vals} and {@link cppa::arg_match arg_match}.
*/
template<typename Arg0, typename... Args>
___ on(const Arg0& arg0, const Args&... args);
__unspecified__ on(const Arg0& arg0, const Args&... args);
/**
* @brief Left-hand side of a partial function expression that matches types.
......@@ -268,7 +273,7 @@ ___ on(const Arg0& arg0, const Args&... args);
* can be used as wildcard to match any number of elements of any types.
*/
template<typename... Ts>
___ on();
__unspecified__ on();
/**
* @brief Left-hand side of a partial function expression that matches types.
......@@ -278,10 +283,12 @@ ___ on();
* can be used as wildcard to match any number of elements of any types.
*/
template<atom_value... Atoms, typename... Ts>
___ on();
__unspecified__ on();
#else
bool skip_message();
template<typename T>
constexpr typename detail::boxed<T>::type val() {
return typename detail::boxed<T>::type();
......
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* *
* This file is part of libcppa. *
* libcppa is free software: you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License *
* or (at your option) any later version. *
* *
* libcppa is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/
#include "cppa/on.hpp"
namespace cppa {
bool skip_message() { return false; }
} // namespace cppa
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment