Commit f6157fb1 authored by Dominik Charousset's avatar Dominik Charousset

forward declaration header cppa_fwd.hpp

parent f4510014
......@@ -263,3 +263,4 @@ cppa/detail/event_based_actor_factory.hpp
cppa/factory.hpp
src/factory.cpp
cppa/message_id.hpp
cppa/cppa_fwd.hpp
......@@ -48,8 +48,6 @@ namespace cppa {
class serializer;
class deserializer;
class actor;
/**
* @brief A unique actor ID.
* @relates actor
......
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011, 2012 *
* 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/>. *
\******************************************************************************/
#ifndef CPPA_FWD_HPP
#define CPPA_FWD_HPP
namespace cppa {
class actor;
class group;
class channel;
class behavior;
class any_tuple;
class partial_function;
class uniform_type_info;
class primitive_variant;
enum primitive_type : unsigned char;
template<typename>
class option;
template<typename>
class intrusive_ptr;
typedef intrusive_ptr<actor> actor_ptr;
typedef intrusive_ptr<group> group_ptr;
typedef intrusive_ptr<channel> channel_ptr;
} // namespace cppa
#endif // CPPA_FWD_HPP
......@@ -37,7 +37,6 @@
#include <cstddef>
#include "cppa/util/at.hpp"
#include "cppa/util/type_list.hpp"
namespace cppa {
......@@ -45,7 +44,11 @@ namespace cppa {
namespace detail {
template<typename...> struct tdata;
template<typename...> struct pseudo_tuple;
}
} // namespace detail
namespace util {
template<typename...> struct type_list;
} // namespace util
// forward declaration of cow_tuple
template<typename...> class cow_tuple;
......@@ -62,6 +65,10 @@ const typename util::at<N, Tn...>::type& get(const cow_tuple<Tn...>&);
template<size_t N, typename... Tn>
const typename util::at<N, Tn...>::type& get(const detail::pseudo_tuple<Tn...>& tv);
// forward declarations of get(util::type_list<...>&)
template<size_t N, typename... Ts>
typename util::at<N, Ts...>::type get(const util::type_list<Ts...>&);
// forward declarations of get_ref(detail::tdata<...>&)
template<size_t N, typename... Tn>
typename util::at<N, Tn...>::type& get_ref(detail::tdata<Tn...>&);
......@@ -74,12 +81,6 @@ typename util::at<N, Tn...>::type& get_ref(cow_tuple<Tn...>&);
template<size_t N, typename... Tn>
typename util::at<N, Tn...>::type& get_ref(detail::pseudo_tuple<Tn...>& tv);
// support container-like access for type lists containing tokens
template<size_t N, typename... Ts>
typename util::at<N, Ts...>::type get(const util::type_list<Ts...>&) {
return {};
}
} // namespace cppa
#endif // CPPA_DOCUMENTATION
......
......@@ -42,7 +42,7 @@ namespace cppa {
* and strings (std::string, std::u16string and std::u32string).
* @relates primitive_variant
*/
enum primitive_type {
enum primitive_type : unsigned char {
pt_int8, /**< equivalent of @p std::int8_t */
pt_int16, /**< equivalent of @p std::int16_t */
pt_int32, /**< equivalent of @p std::int32_t */
......
......@@ -34,6 +34,7 @@
#include <typeinfo>
#include <type_traits>
#include "cppa/util/at.hpp"
#include "cppa/util/tbind.hpp"
#include "cppa/util/if_else.hpp"
#include "cppa/util/type_pair.hpp"
......@@ -933,4 +934,11 @@ struct tl_apply<type_list<Ts...>, VarArgTemplate> {
*/
} } // namespace cppa::util
namespace cppa {
template<size_t N, typename... Ts>
typename util::at<N, Ts...>::type get(const util::type_list<Ts...>&) {
return {};
}
} // namespace cppa
#endif // CPPA_UTIL_TYPE_LIST_HPP
#ifndef PING_PONG_HPP
#define PING_PONG_HPP
#include "cppa/actor.hpp"
//#include "cppa/actor.hpp"
#include <cstddef>
#include "cppa/cppa_fwd.hpp"
void ping(size_t num_pings);
......
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