Commit 5c50a3d4 authored by Dominik Charousset's avatar Dominik Charousset

cleaned up header guards

parent 3c64cc08
...@@ -178,7 +178,6 @@ cppa/tpartial_function.hpp ...@@ -178,7 +178,6 @@ cppa/tpartial_function.hpp
cppa/tuple_cast.hpp cppa/tuple_cast.hpp
cppa/type_lookup_table.hpp cppa/type_lookup_table.hpp
cppa/typed_actor.hpp cppa/typed_actor.hpp
cppa/typed_actor_ptr.hpp
cppa/typed_behavior.hpp cppa/typed_behavior.hpp
cppa/typed_continue_helper.hpp cppa/typed_continue_helper.hpp
cppa/typed_event_based_actor.hpp cppa/typed_event_based_actor.hpp
...@@ -186,12 +185,10 @@ cppa/uniform_type_info.hpp ...@@ -186,12 +185,10 @@ cppa/uniform_type_info.hpp
cppa/unit.hpp cppa/unit.hpp
cppa/util/abstract_uniform_type_info.hpp cppa/util/abstract_uniform_type_info.hpp
cppa/util/algorithm.hpp cppa/util/algorithm.hpp
cppa/util/arg_match_t.hpp
cppa/util/buffer.hpp cppa/util/buffer.hpp
cppa/util/call.hpp cppa/util/call.hpp
cppa/util/comparable.hpp cppa/util/comparable.hpp
cppa/util/compare_tuples.hpp cppa/util/compare_tuples.hpp
cppa/util/dptr.hpp
cppa/util/duration.hpp cppa/util/duration.hpp
cppa/util/get_mac_addresses.hpp cppa/util/get_mac_addresses.hpp
cppa/util/get_root_uuid.hpp cppa/util/get_root_uuid.hpp
...@@ -272,7 +269,6 @@ src/default_message_queue.cpp ...@@ -272,7 +269,6 @@ src/default_message_queue.cpp
src/demangle.cpp src/demangle.cpp
src/deserializer.cpp src/deserializer.cpp
src/duration.cpp src/duration.cpp
src/empty_tuple.cpp
src/event_based_actor.cpp src/event_based_actor.cpp
src/exception.cpp src/exception.cpp
src/execinfo_windows.cpp src/execinfo_windows.cpp
...@@ -358,3 +354,4 @@ unit_testing/test_typed_remote_actor.cpp ...@@ -358,3 +354,4 @@ unit_testing/test_typed_remote_actor.cpp
unit_testing/test_typed_spawn.cpp unit_testing/test_typed_spawn.cpp
unit_testing/test_uniform_type.cpp unit_testing/test_uniform_type.cpp
unit_testing/test_yield_interface.cpp unit_testing/test_yield_interface.cpp
cppa/arg_match.hpp
...@@ -28,10 +28,17 @@ ...@@ -28,10 +28,17 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ARG_MATCH_T_HPP #ifndef CPPA_ARG_MATCH_HPP
#define CPPA_ARG_MATCH_T_HPP #define CPPA_ARG_MATCH_HPP
#include "cppa/util/wrapped.hpp"
namespace cppa { namespace cppa {
namespace util { struct arg_match_t { }; } }
#endif // CPPA_ARG_MATCH_T_HPP struct arg_match_t { };
constexpr util::wrapped<arg_match_t> arg_match = util::wrapped<arg_match_t>{};
} // namespace cppa
#endif // CPPA_ARG_MATCH_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CONTINUE_HELPER_HPP #ifndef CPPA_CONTINUE_HELPER_HPP
#define CONTINUE_HELPER_HPP #define CPPA_CONTINUE_HELPER_HPP
#include <functional> #include <functional>
...@@ -89,4 +89,4 @@ class continue_helper { ...@@ -89,4 +89,4 @@ class continue_helper {
} // namespace cppa } // namespace cppa
#endif // CONTINUE_HELPER_HPP #endif // CPPA_CONTINUE_HELPER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_HPP #ifndef CPPA_CPPA_HPP
#define CPPA_HPP #define CPPA_CPPA_HPP
#include <tuple> #include <tuple>
#include <chrono> #include <chrono>
...@@ -717,4 +717,4 @@ struct hash<cppa::actor_addr> { ...@@ -717,4 +717,4 @@ struct hash<cppa::actor_addr> {
}; };
} // namespace std } // namespace std
#endif // CPPA_HPP #endif // CPPA_CPPA_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_FWD_HPP #ifndef CPPA_CPPA_FWD_HPP
#define CPPA_FWD_HPP #define CPPA_CPPA_FWD_HPP
#include <cstdint> #include <cstdint>
...@@ -81,4 +81,4 @@ typedef const message_header& msg_hdr_cref; ...@@ -81,4 +81,4 @@ typedef const message_header& msg_hdr_cref;
} // namespace cppa } // namespace cppa
#endif // CPPA_FWD_HPP #endif // CPPA_CPPA_FWD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ABSTRACT_TUPLE_HPP #ifndef CPPA_DETAIL_ABSTRACT_TUPLE_HPP
#define CPPA_ABSTRACT_TUPLE_HPP #define CPPA_DETAIL_ABSTRACT_TUPLE_HPP
#include <string> #include <string>
#include <iterator> #include <iterator>
...@@ -129,4 +129,4 @@ std::string get_tuple_type_names(const detail::abstract_tuple&); ...@@ -129,4 +129,4 @@ std::string get_tuple_type_names(const detail::abstract_tuple&);
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_ABSTRACT_TUPLE_HPP #endif // CPPA_DETAIL_ABSTRACT_TUPLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ACTOR_REGISTRY_HPP #ifndef CPPA_DETAIL_ACTOR_REGISTRY_HPP
#define CPPA_ACTOR_REGISTRY_HPP #define CPPA_DETAIL_ACTOR_REGISTRY_HPP
#include <map> #include <map>
#include <mutex> #include <mutex>
...@@ -112,4 +112,4 @@ class actor_registry : public singleton_mixin<actor_registry> { ...@@ -112,4 +112,4 @@ class actor_registry : public singleton_mixin<actor_registry> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_ACTOR_REGISTRY_HPP #endif // CPPA_DETAIL_ACTOR_REGISTRY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ATOM_VAL_HPP #ifndef CPPA_DETAIL_ATOM_VAL_HPP
#define CPPA_ATOM_VAL_HPP #define CPPA_DETAIL_ATOM_VAL_HPP
namespace cppa { namespace cppa {
namespace detail { namespace detail {
...@@ -70,4 +70,4 @@ constexpr std::uint64_t atom_val(const char* cstr, std::uint64_t interim = 0) { ...@@ -70,4 +70,4 @@ constexpr std::uint64_t atom_val(const char* cstr, std::uint64_t interim = 0) {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_ATOM_VAL_HPP #endif // CPPA_DETAIL_ATOM_VAL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef BEHAVIOR_IMPL_HPP #ifndef CPPA_DETAIL_BEHAVIOR_IMPL_HPP
#define BEHAVIOR_IMPL_HPP #define CPPA_DETAIL_BEHAVIOR_IMPL_HPP
#include "cppa/atom.hpp" #include "cppa/atom.hpp"
#include "cppa/optional.hpp" #include "cppa/optional.hpp"
...@@ -231,4 +231,4 @@ behavior_impl_ptr extract(const partial_function&); ...@@ -231,4 +231,4 @@ behavior_impl_ptr extract(const partial_function&);
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // BEHAVIOR_IMPL_HPP #endif // CPPA_DETAIL_BEHAVIOR_IMPL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef BEHAVIOR_STACK_HPP #ifndef CPPA_DETAIL_BEHAVIOR_STACK_HPP
#define BEHAVIOR_STACK_HPP #define CPPA_DETAIL_BEHAVIOR_STACK_HPP
#include <vector> #include <vector>
#include <memory> #include <memory>
...@@ -128,4 +128,4 @@ class behavior_stack ...@@ -128,4 +128,4 @@ class behavior_stack
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // BEHAVIOR_STACK_HPP #endif // CPPA_DETAIL_BEHAVIOR_STACK_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_BOXED_HPP #ifndef CPPA_DETAIL_BOXED_HPP
#define CPPA_BOXED_HPP #define CPPA_DETAIL_BOXED_HPP
#include "cppa/anything.hpp" #include "cppa/anything.hpp"
#include "cppa/util/wrapped.hpp" #include "cppa/util/wrapped.hpp"
...@@ -80,4 +80,4 @@ struct is_boxed<util::wrapped<T>(*)()> { ...@@ -80,4 +80,4 @@ struct is_boxed<util::wrapped<T>(*)()> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_BOXED_HPP #endif // CPPA_DETAIL_BOXED_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_CONTAINER_TUPLE_VIEW_HPP #ifndef CPPA_DETAIL_CONTAINER_TUPLE_VIEW_HPP
#define CPPA_CONTAINER_TUPLE_VIEW_HPP #define CPPA_DETAIL_CONTAINER_TUPLE_VIEW_HPP
#include <iostream> #include <iostream>
...@@ -99,4 +99,4 @@ class container_tuple_view : public abstract_tuple { ...@@ -99,4 +99,4 @@ class container_tuple_view : public abstract_tuple {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_CONTAINER_TUPLE_VIEW_HPP #endif // CPPA_DETAIL_CONTAINER_TUPLE_VIEW_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_FIBER_HPP #ifndef CPPA_DETAIL_CS_THREAD_HPP
#define CPPA_FIBER_HPP #define CPPA_DETAIL_CS_THREAD_HPP
namespace cppa { namespace cppa {
namespace detail { namespace detail {
...@@ -61,4 +61,4 @@ struct cs_thread { ...@@ -61,4 +61,4 @@ struct cs_thread {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_FIBER_HPP #endif // CPPA_DETAIL_CS_THREAD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_DECORATED_TUPLE_HPP #ifndef CPPA_DETAIL_DECORATED_TUPLE_HPP
#define CPPA_DECORATED_TUPLE_HPP #define CPPA_DETAIL_DECORATED_TUPLE_HPP
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
...@@ -121,4 +121,4 @@ class decorated_tuple : public abstract_tuple { ...@@ -121,4 +121,4 @@ class decorated_tuple : public abstract_tuple {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_DECORATED_TUPLE_HPP #endif // CPPA_DETAIL_DECORATED_TUPLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_DEMANGLE_HPP #ifndef CPPA_DETAIL_DEMANGLE_HPP
#define CPPA_DEMANGLE_HPP #define CPPA_DETAIL_DEMANGLE_HPP
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
...@@ -48,4 +48,4 @@ inline std::string demangle() { ...@@ -48,4 +48,4 @@ inline std::string demangle() {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_DEMANGLE_HPP #endif // CPPA_DETAIL_DEMANGLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_DISABLABLE_DELETE_HPP #ifndef CPPA_DETAIL_DISABLABLE_DELETE_HPP
#define CPPA_DISABLABLE_DELETE_HPP #define CPPA_DETAIL_DISABLABLE_DELETE_HPP
namespace cppa { namespace cppa {
namespace detail { namespace detail {
...@@ -62,4 +62,4 @@ class disablable_delete { ...@@ -62,4 +62,4 @@ class disablable_delete {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_DISABLABLE_DELETE_HPP #endif // CPPA_DETAIL_DISABLABLE_DELETE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef FD_UTIL_HPP #ifndef CPPA_DETAIL_FD_UTIL_HPP
#define FD_UTIL_HPP #define CPPA_DETAIL_FD_UTIL_HPP
#include <string> #include <string>
#include <utility> // std::pair #include <utility> // std::pair
...@@ -67,4 +67,4 @@ std::pair<native_socket_type, native_socket_type> create_pipe(); ...@@ -67,4 +67,4 @@ std::pair<native_socket_type, native_socket_type> create_pipe();
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // FD_UTIL_HPP #endif // CPPA_DETAIL_FD_UTIL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_FUNCTOR_BASED_ACTOR_HPP #ifndef CPPA_DETAIL_FUNCTOR_BASED_ACTOR_HPP
#define CPPA_FUNCTOR_BASED_ACTOR_HPP #define CPPA_DETAIL_FUNCTOR_BASED_ACTOR_HPP
#include <type_traits> #include <type_traits>
...@@ -124,4 +124,4 @@ class functor_based_actor : public event_based_actor { ...@@ -124,4 +124,4 @@ class functor_based_actor : public event_based_actor {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_FUNCTOR_BASED_ACTOR_HPP #endif // CPPA_DETAIL_FUNCTOR_BASED_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef FUNCTOR_BASED_BLOCKING_ACTOR_HPP #ifndef CPPA_DETAIL_FUNCTOR_BASED_BLOCKING_ACTOR_HPP
#define FUNCTOR_BASED_BLOCKING_ACTOR_HPP #define CPPA_DETAIL_FUNCTOR_BASED_BLOCKING_ACTOR_HPP
#include "cppa/blocking_actor.hpp" #include "cppa/blocking_actor.hpp"
...@@ -88,4 +88,4 @@ class functor_based_blocking_actor : public blocking_actor { ...@@ -88,4 +88,4 @@ class functor_based_blocking_actor : public blocking_actor {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // FUNCTOR_BASED_BLOCKING_ACTOR_HPP #endif // CPPA_DETAIL_FUNCTOR_BASED_BLOCKING_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_GROUP_MANAGER_HPP #ifndef CPPA_DETAIL_GROUP_MANAGER_HPP
#define CPPA_GROUP_MANAGER_HPP #define CPPA_DETAIL_GROUP_MANAGER_HPP
#include <map> #include <map>
#include <mutex> #include <mutex>
...@@ -74,4 +74,4 @@ class group_manager : public singleton_mixin<group_manager> { ...@@ -74,4 +74,4 @@ class group_manager : public singleton_mixin<group_manager> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_GROUP_MANAGER_HPP #endif // CPPA_DETAIL_GROUP_MANAGER_HPP
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef IEEE_754_HPP #ifndef CPPA_DETAIL_IEEE_754_HPP
#define IEEE_754_HPP #define CPPA_DETAIL_IEEE_754_HPP
#include <cmath> #include <cmath>
...@@ -143,4 +143,4 @@ typename ieee_754_trait<T>::float_type unpack754(T i) { ...@@ -143,4 +143,4 @@ typename ieee_754_trait<T>::float_type unpack754(T i) {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // IEEE_754_HPP #endif // CPPA_DETAIL_IEEE_754_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_IMPLICIT_CONVERSIONS_HPP #ifndef CPPA_DETAIL_IMPLICIT_CONVERSIONS_HPP
#define CPPA_IMPLICIT_CONVERSIONS_HPP #define CPPA_DETAIL_IMPLICIT_CONVERSIONS_HPP
#include <string> #include <string>
#include <type_traits> #include <type_traits>
...@@ -91,4 +91,4 @@ struct strip_and_convert { ...@@ -91,4 +91,4 @@ struct strip_and_convert {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_IMPLICIT_CONVERSIONS_HPP #endif // CPPA_DETAIL_IMPLICIT_CONVERSIONS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_MATCHES_HPP #ifndef CPPA_DETAIL_MATCHES_HPP
#define CPPA_MATCHES_HPP #define CPPA_DETAIL_MATCHES_HPP
#include <numeric> #include <numeric>
...@@ -350,4 +350,4 @@ inline bool matches_types(const any_tuple& tup, const util::type_list<Ts...>&) { ...@@ -350,4 +350,4 @@ inline bool matches_types(const any_tuple& tup, const util::type_list<Ts...>&) {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_MATCHES_HPP #endif // CPPA_DETAIL_MATCHES_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_MEMORY_HPP #ifndef CPPA_DETAIL_MEMORY_HPP
#define CPPA_MEMORY_HPP #define CPPA_DETAIL_MEMORY_HPP
#include <new> #include <new>
#include <vector> #include <vector>
...@@ -95,7 +95,7 @@ class instance_wrapper; ...@@ -95,7 +95,7 @@ class instance_wrapper;
template<typename T> template<typename T>
class basic_memory_cache; class basic_memory_cache;
#ifdef CPPA_DISABLE_MEM_MANAGEMENT #ifdef CPPA_DETAIL_DISABLE_MEM_MANAGEMENT
class memory { class memory {
...@@ -118,7 +118,7 @@ class memory { ...@@ -118,7 +118,7 @@ class memory {
}; };
#else // CPPA_DISABLE_MEM_MANAGEMENT #else // CPPA_DETAIL_DISABLE_MEM_MANAGEMENT
template<typename T> template<typename T>
class basic_memory_cache : public memory_cache { class basic_memory_cache : public memory_cache {
...@@ -239,9 +239,9 @@ class memory { ...@@ -239,9 +239,9 @@ class memory {
}; };
#endif // CPPA_DISABLE_MEM_MANAGEMENT #endif // CPPA_DETAIL_DISABLE_MEM_MANAGEMENT
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_MEMORY_HPP #endif // CPPA_DETAIL_MEMORY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_OBJECT_ARRAY_HPP #ifndef CPPA_DETAIL_OBJECT_ARRAY_HPP
#define CPPA_OBJECT_ARRAY_HPP #define CPPA_DETAIL_OBJECT_ARRAY_HPP
#include <vector> #include <vector>
...@@ -76,4 +76,4 @@ class object_array : public abstract_tuple { ...@@ -76,4 +76,4 @@ class object_array : public abstract_tuple {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_OBJECT_ARRAY_HPP #endif // CPPA_DETAIL_OBJECT_ARRAY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_OBJECT_IMPL_HPP #ifndef CPPA_DETAIL_OBJECT_IMPL_HPP
#define CPPA_OBJECT_IMPL_HPP #define CPPA_DETAIL_OBJECT_IMPL_HPP
#include "cppa/object.hpp" #include "cppa/object.hpp"
...@@ -63,4 +63,4 @@ struct obj_impl : object { ...@@ -63,4 +63,4 @@ struct obj_impl : object {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_OBJECT_IMPL_HPP #endif // CPPA_DETAIL_OBJECT_IMPL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_OPT_IMPLS_HPP #ifndef CPPA_DETAIL_OPT_IMPLS_HPP
#define CPPA_OPT_IMPLS_HPP #define CPPA_DETAIL_OPT_IMPLS_HPP
#include <sstream> #include <sstream>
...@@ -236,4 +236,4 @@ class opt1_rvalue_builder<false> { ...@@ -236,4 +236,4 @@ class opt1_rvalue_builder<false> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_OPT_IMPLS_HPP #endif // CPPA_DETAIL_OPT_IMPLS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef TRIVARIANT_DATA_HPP #ifndef CPPA_DETAIL_OPTIONAL_VARIANT_DATA
#define TRIVARIANT_DATA_HPP #define CPPA_DETAIL_OPTIONAL_VARIANT_DATA
#include <stdexcept> #include <stdexcept>
#include <type_traits> #include <type_traits>
...@@ -110,4 +110,4 @@ struct optional_variant_data_destructor { ...@@ -110,4 +110,4 @@ struct optional_variant_data_destructor {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // TRIVARIANT_DATA_HPP #endif // CPPA_DETAIL_OPTIONAL_VARIANT_DATA
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PAIR_MEMBER_HPP #ifndef CPPA_DETAIL_PAIR_MEMBER_HPP
#define CPPA_PAIR_MEMBER_HPP #define CPPA_DETAIL_PAIR_MEMBER_HPP
#include <utility> #include <utility>
...@@ -120,4 +120,4 @@ class pair_member : public util::abstract_uniform_type_info<std::pair<T1, T2>> { ...@@ -120,4 +120,4 @@ class pair_member : public util::abstract_uniform_type_info<std::pair<T1, T2>> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_PAIR_MEMBER_HPP #endif // CPPA_DETAIL_PAIR_MEMBER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PROJECTION_HPP #ifndef CPPA_DETAIL_PROJECTION_HPP
#define CPPA_PROJECTION_HPP #define CPPA_DETAIL_PROJECTION_HPP
#include "cppa/optional.hpp" #include "cppa/optional.hpp"
#include "cppa/guard_expr.hpp" #include "cppa/guard_expr.hpp"
...@@ -183,4 +183,4 @@ struct projection_from_type_list<ProjectionFuns, util::type_list<Ts...> > { ...@@ -183,4 +183,4 @@ struct projection_from_type_list<ProjectionFuns, util::type_list<Ts...> > {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_PROJECTION_HPP #endif // CPPA_DETAIL_PROJECTION_HPP
#ifndef PROPER_ACTOR_HPP #ifndef CPPA_DETAIL_PROPER_ACTOR_HPP
#define PROPER_ACTOR_HPP #define CPPA_DETAIL_PROPER_ACTOR_HPP
#include <type_traits> #include <type_traits>
...@@ -359,4 +359,4 @@ class proper_actor<Base, Policies, true> : public proper_actor_base<Base, ...@@ -359,4 +359,4 @@ class proper_actor<Base, Policies, true> : public proper_actor_base<Base,
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // PROPER_ACTOR_HPP #endif // CPPA_DETAIL_PROPER_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PSEUDO_TUPLE_HPP #ifndef CPPA_DETAIL_PSEUDO_TUPLE_HPP
#define CPPA_PSEUDO_TUPLE_HPP #define CPPA_DETAIL_PSEUDO_TUPLE_HPP
#include <cstddef> #include <cstddef>
...@@ -86,4 +86,4 @@ typename util::type_at<N, Ts...>::type& get_ref(detail::pseudo_tuple<Ts...>& tv) ...@@ -86,4 +86,4 @@ typename util::type_at<N, Ts...>::type& get_ref(detail::pseudo_tuple<Ts...>& tv)
} // namespace cppa } // namespace cppa
#endif // CPPA_PSEUDO_TUPLE_HPP #endif // CPPA_DETAIL_PSEUDO_TUPLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PTYPE_TO_TYPE_HPP #ifndef CPPA_DETAIL_PTYPE_TO_TYPE_HPP
#define CPPA_PTYPE_TO_TYPE_HPP #define CPPA_DETAIL_PTYPE_TO_TYPE_HPP
#include <cstdint> #include <cstdint>
...@@ -70,4 +70,4 @@ template<> struct ptype_to_type<pt_u32string> : util::wrapped<std::u32string> { ...@@ -70,4 +70,4 @@ template<> struct ptype_to_type<pt_u32string> : util::wrapped<std::u32string> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_PTYPE_TO_TYPE_HPP #endif // CPPA_DETAIL_PTYPE_TO_TYPE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_RAW_ACCESS_HPP #ifndef CPPA_DETAIL_RAW_ACCESS_HPP
#define CPPA_RAW_ACCESS_HPP #define CPPA_DETAIL_RAW_ACCESS_HPP
#include "cppa/actor.hpp" #include "cppa/actor.hpp"
#include "cppa/group.hpp" #include "cppa/group.hpp"
...@@ -86,4 +86,4 @@ class raw_access { ...@@ -86,4 +86,4 @@ class raw_access {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_RAW_ACCESS_HPP #endif // CPPA_DETAIL_RAW_ACCESS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_DETAIL_RESPONSE_FUTURE_UTIL_HPP #ifndef CPPA_DETAIL_RESPONSE_HANDLE_UTIL_HPP
#define CPPA_DETAIL_RESPONSE_FUTURE_UTIL_HPP #define CPPA_DETAIL_RESPONSE_HANDLE_UTIL_HPP
#include "cppa/on.hpp" #include "cppa/on.hpp"
#include "cppa/skip_message.hpp" #include "cppa/skip_message.hpp"
...@@ -57,4 +57,4 @@ behavior fs2bhvr(Actor* self, Fs... fs) { ...@@ -57,4 +57,4 @@ behavior fs2bhvr(Actor* self, Fs... fs) {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_DETAIL_RESPONSE_FUTURE_UTIL_HPP #endif // CPPA_DETAIL_RESPONSE_HANDLE_UTIL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SERIALIZE_TUPLE_HPP #ifndef CPPA_DETAIL_SERIALIZE_TUPLE_HPP
#define CPPA_SERIALIZE_TUPLE_HPP #define CPPA_DETAIL_SERIALIZE_TUPLE_HPP
#include <cstddef> #include <cstddef>
...@@ -60,4 +60,4 @@ struct serialize_tuple<util::empty_type_list, Pos> { ...@@ -60,4 +60,4 @@ struct serialize_tuple<util::empty_type_list, Pos> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_SERIALIZE_TUPLE_HPP #endif // CPPA_DETAIL_SERIALIZE_TUPLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SINGLETON_MANAGER_HPP #ifndef CPPA_DETAIL_SINGLETON_MANAGER_HPP
#define CPPA_SINGLETON_MANAGER_HPP #define CPPA_DETAIL_SINGLETON_MANAGER_HPP
#include <atomic> #include <atomic>
...@@ -127,4 +127,4 @@ class singleton_manager { ...@@ -127,4 +127,4 @@ class singleton_manager {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_SINGLETON_MANAGER_HPP #endif // CPPA_DETAIL_SINGLETON_MANAGER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SINGLETON_MIXIN_HPP #ifndef CPPA_DETAIL_SINGLETON_MIXIN_HPP
#define CPPA_SINGLETON_MIXIN_HPP #define CPPA_DETAIL_SINGLETON_MIXIN_HPP
#include <utility> #include <utility>
...@@ -77,4 +77,4 @@ class singleton_mixin<Derived, void> { ...@@ -77,4 +77,4 @@ class singleton_mixin<Derived, void> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_SINGLETON_MIXIN_HPP #endif // CPPA_DETAIL_SINGLETON_MIXIN_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SWAP_BYTES_HPP #ifndef CPPA_DETAIL_SWAP_BYTES_HPP
#define CPPA_SWAP_BYTES_HPP #define CPPA_DETAIL_SWAP_BYTES_HPP
#include <cstddef> #include <cstddef>
...@@ -70,4 +70,4 @@ inline T swap_bytes(T what) { ...@@ -70,4 +70,4 @@ inline T swap_bytes(T what) {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_SWAP_BYTES_HPP #endif // CPPA_DETAIL_SWAP_BYTES_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SYNC_REQUEST_BOUNCER_HPP #ifndef CPPA_DETAIL_SYNC_REQUEST_BOUNCER_HPP
#define CPPA_SYNC_REQUEST_BOUNCER_HPP #define CPPA_DETAIL_SYNC_REQUEST_BOUNCER_HPP
#include <cstdint> #include <cstdint>
...@@ -55,4 +55,4 @@ struct sync_request_bouncer { ...@@ -55,4 +55,4 @@ struct sync_request_bouncer {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_SYNC_REQUEST_BOUNCER_HPP #endif // CPPA_DETAIL_SYNC_REQUEST_BOUNCER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TDATA_HPP #ifndef CPPA_DETAIL_TDATA_HPP
#define CPPA_TDATA_HPP #define CPPA_DETAIL_TDATA_HPP
#include <typeinfo> #include <typeinfo>
#include <functional> #include <functional>
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "cppa/util/wrapped.hpp" #include "cppa/util/wrapped.hpp"
#include "cppa/util/type_list.hpp" #include "cppa/util/type_list.hpp"
#include "cppa/util/arg_match_t.hpp"
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
#include "cppa/util/rebindable_reference.hpp" #include "cppa/util/rebindable_reference.hpp"
...@@ -331,7 +330,7 @@ struct tdata<Head, Tail...> : tdata<Tail...> { ...@@ -331,7 +330,7 @@ struct tdata<Head, Tail...> : tdata<Tail...> {
} }
inline void* mutable_at(size_t p) { inline void* mutable_at(size_t p) {
# ifdef CPPA_DEBUG_MODE # ifdef CPPA_DETAIL_DEBUG_MODE
if (p == 0) { if (p == 0) {
if (std::is_same<decltype(ptr_to(head)), const void*>::value) { if (std::is_same<decltype(ptr_to(head)), const void*>::value) {
throw std::logic_error{"mutable_at with const head"}; throw std::logic_error{"mutable_at with const head"};
...@@ -460,4 +459,4 @@ typename util::type_at<N, Ts...>::type& get_ref(detail::tdata<Ts...>& tv) { ...@@ -460,4 +459,4 @@ typename util::type_at<N, Ts...>::type& get_ref(detail::tdata<Ts...>& tv) {
} // namespace cppa } // namespace cppa
#endif // CPPA_TDATA_HPP #endif // CPPA_DETAIL_TDATA_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TO_UNIFORM_NAME_HPP #ifndef CPPA_DETAIL_TO_UNIFORM_NAME_HPP
#define CPPA_TO_UNIFORM_NAME_HPP #define CPPA_DETAIL_TO_UNIFORM_NAME_HPP
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
...@@ -46,4 +46,4 @@ inline std::string to_uniform_name() { return to_uniform_name(typeid(T)); } ...@@ -46,4 +46,4 @@ inline std::string to_uniform_name() { return to_uniform_name(typeid(T)); }
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TO_UNIFORM_NAME_HPP #endif // CPPA_DETAIL_TO_UNIFORM_NAME_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TUPLE_CAST_IMPL_HPP #ifndef CPPA_DETAIL_TUPLE_CAST_IMPL_HPP
#define CPPA_TUPLE_CAST_IMPL_HPP #define CPPA_DETAIL_TUPLE_CAST_IMPL_HPP
#include "cppa/any_tuple.hpp" #include "cppa/any_tuple.hpp"
...@@ -90,4 +90,4 @@ struct tuple_cast_impl<wildcard_position::leading, Result, T...> { ...@@ -90,4 +90,4 @@ struct tuple_cast_impl<wildcard_position::leading, Result, T...> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TUPLE_CAST_IMPL_HPP #endif // CPPA_DETAIL_TUPLE_CAST_IMPL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TUPLE_ITERATOR_HPP #ifndef CPPA_DETAIL_TUPLE_ITERATOR_HPP
#define CPPA_TUPLE_ITERATOR_HPP #define CPPA_DETAIL_TUPLE_ITERATOR_HPP
#include <cstddef> #include <cstddef>
...@@ -111,4 +111,4 @@ class tuple_iterator { ...@@ -111,4 +111,4 @@ class tuple_iterator {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TUPLE_ITERATOR_HPP #endif // CPPA_DETAIL_TUPLE_ITERATOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TUPLE_VALS_HPP #ifndef CPPA_DETAIL_TUPLE_VALS_HPP
#define CPPA_TUPLE_VALS_HPP #define CPPA_DETAIL_TUPLE_VALS_HPP
#include <stdexcept> #include <stdexcept>
...@@ -142,4 +142,4 @@ struct tuple_vals_from_type_list< util::type_list<Ts...> > { ...@@ -142,4 +142,4 @@ struct tuple_vals_from_type_list< util::type_list<Ts...> > {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TUPLE_VALS_HPP #endif // CPPA_DETAIL_TUPLE_VALS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TUPLE_VIEW_HPP #ifndef CPPA_DETAIL_TUPLE_VIEW_HPP
#define CPPA_TUPLE_VIEW_HPP #define CPPA_DETAIL_TUPLE_VIEW_HPP
#include "cppa/guard_expr.hpp" #include "cppa/guard_expr.hpp"
...@@ -124,4 +124,4 @@ types_array<Ts...> tuple_view<Ts...>::m_types; ...@@ -124,4 +124,4 @@ types_array<Ts...> tuple_view<Ts...>::m_types;
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TUPLE_VIEW_HPP #endif // CPPA_DETAIL_TUPLE_VIEW_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TYPE_TO_PTYPE_HPP #ifndef CPPA_DETAIL_TYPE_TO_PTYPE_HPP
#define CPPA_TYPE_TO_PTYPE_HPP #define CPPA_DETAIL_TYPE_TO_PTYPE_HPP
#include <string> #include <string>
#include <limits> #include <limits>
...@@ -97,4 +97,4 @@ struct type_to_ptype : type_to_ptype_impl<typename util::rm_const_and_ref<T>::ty ...@@ -97,4 +97,4 @@ struct type_to_ptype : type_to_ptype_impl<typename util::rm_const_and_ref<T>::ty
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TYPE_TO_PTYPE_HPP #endif // CPPA_DETAIL_TYPE_TO_PTYPE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TYPED_ACTOR_UTIL_HPP #ifndef CPPA_DETAIL_TYPED_ACTOR_UTIL_HPP
#define CPPA_TYPED_ACTOR_UTIL_HPP #define CPPA_DETAIL_TYPED_ACTOR_UTIL_HPP
#include "cppa/cow_tuple.hpp" #include "cppa/cow_tuple.hpp"
#include "cppa/replies_to.hpp" #include "cppa/replies_to.hpp"
...@@ -144,4 +144,4 @@ struct deduce_output_type { ...@@ -144,4 +144,4 @@ struct deduce_output_type {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TYPED_ACTOR_UTIL_HPP #endif // CPPA_DETAIL_TYPED_ACTOR_UTIL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TYPES_ARRAY_HPP #ifndef CPPA_DETAIL_TYPES_ARRAY_HPP
#define CPPA_TYPES_ARRAY_HPP #define CPPA_DETAIL_TYPES_ARRAY_HPP
#include <atomic> #include <atomic>
#include <typeinfo> #include <typeinfo>
...@@ -214,4 +214,4 @@ const std::type_info* static_type_list<T0, T1, Ts...>::list = &typeid(util::type ...@@ -214,4 +214,4 @@ const std::type_info* static_type_list<T0, T1, Ts...>::list = &typeid(util::type
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_TYPES_ARRAY_HPP #endif // CPPA_DETAIL_TYPES_ARRAY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_UNBOXED_HPP #ifndef CPPA_DETAIL_UNBOXED_HPP
#define CPPA_UNBOXED_HPP #define CPPA_DETAIL_UNBOXED_HPP
#include <memory> #include <memory>
...@@ -72,4 +72,4 @@ struct unboxed<std::unique_ptr<util::guard<T>>> { ...@@ -72,4 +72,4 @@ struct unboxed<std::unique_ptr<util::guard<T>>> {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_UNBOXED_HPP #endif // CPPA_DETAIL_UNBOXED_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_UNIFORM_TYPE_INFO_MAP_HPP #ifndef CPPA_DETAIL_UNIFORM_TYPE_INFO_MAP_HPP
#define CPPA_UNIFORM_TYPE_INFO_MAP_HPP #define CPPA_DETAIL_UNIFORM_TYPE_INFO_MAP_HPP
#include <set> #include <set>
#include <map> #include <map>
...@@ -157,4 +157,4 @@ class uniform_type_info_map { ...@@ -157,4 +157,4 @@ class uniform_type_info_map {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_UNIFORM_TYPE_INFO_MAP_HPP #endif // CPPA_DETAIL_UNIFORM_TYPE_INFO_MAP_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_VALUE_GUARD_HPP #ifndef CPPA_DETAIL_VALUE_GUARD_HPP
#define CPPA_VALUE_GUARD_HPP #define CPPA_DETAIL_VALUE_GUARD_HPP
#include <type_traits> #include <type_traits>
...@@ -129,4 +129,4 @@ typedef value_guard<util::empty_type_list> empty_value_guard; ...@@ -129,4 +129,4 @@ typedef value_guard<util::empty_type_list> empty_value_guard;
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_VALUE_GUARD_HPP #endif // CPPA_DETAIL_VALUE_GUARD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_YIELD_INTERFACE_HPP #ifndef CPPA_DETAIL_YIELD_INTERFACE_HPP
#define CPPA_YIELD_INTERFACE_HPP #define CPPA_DETAIL_YIELD_INTERFACE_HPP
#include <string> #include <string>
...@@ -64,4 +64,4 @@ std::string to_string(detail::yield_state ys); ...@@ -64,4 +64,4 @@ std::string to_string(detail::yield_state ys);
} // namespace cppa } // namespace cppa
#endif // CPPA_YIELD_INTERFACE_HPP #endif // CPPA_DETAIL_YIELD_INTERFACE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_UNTYPED_ACTOR_HPP #ifndef CPPA_EVENT_BASED_ACTOR_HPP
#define CPPA_UNTYPED_ACTOR_HPP #define CPPA_EVENT_BASED_ACTOR_HPP
#include "cppa/on.hpp" #include "cppa/on.hpp"
#include "cppa/extend.hpp" #include "cppa/extend.hpp"
...@@ -82,4 +82,4 @@ class event_based_actor : public extend<local_actor, event_based_actor>:: ...@@ -82,4 +82,4 @@ class event_based_actor : public extend<local_actor, event_based_actor>::
} // namespace cppa } // namespace cppa
#endif // CPPA_UNTYPED_ACTOR_HPP #endif // CPPA_EVENT_BASED_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_MIXED_HPP #ifndef CPPA_EXTEND_HPP
#define CPPA_MIXED_HPP #define CPPA_EXTEND_HPP
// saves some typing // saves some typing
#define CPPA_MIXIN template<class, class> class #define CPPA_MIXIN template<class, class> class
...@@ -70,4 +70,4 @@ struct extend { ...@@ -70,4 +70,4 @@ struct extend {
} // namespace cppa } // namespace cppa
#endif // CPPA_MIXED_HPP #endif // CPPA_EXTEND_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SINGLE_READER_QUEUE_HPP #ifndef CPPA_INTRUSIVE_SINGLE_READER_QUEUE_HPP
#define CPPA_SINGLE_READER_QUEUE_HPP #define CPPA_INTRUSIVE_SINGLE_READER_QUEUE_HPP
#include <list> #include <list>
#include <mutex> #include <mutex>
...@@ -381,4 +381,4 @@ class single_reader_queue { ...@@ -381,4 +381,4 @@ class single_reader_queue {
} // namespace intrusive } // namespace intrusive
} // namespace cppa } // namespace cppa
#endif // CPPA_SINGLE_READER_QUEUE_HPP #endif // CPPA_INTRUSIVE_SINGLE_READER_QUEUE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ACCEPTOR_HPP #ifndef CPPA_IO_ACCEPTOR_HPP
#define CPPA_ACCEPTOR_HPP #define CPPA_IO_ACCEPTOR_HPP
#include <memory> #include <memory>
...@@ -81,4 +81,4 @@ typedef std::unique_ptr<acceptor> acceptor_uptr; ...@@ -81,4 +81,4 @@ typedef std::unique_ptr<acceptor> acceptor_uptr;
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_ACCEPTOR_HPP #endif // CPPA_IO_ACCEPTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_BROKER_HPP #ifndef CPPA_IO_BROKER_HPP
#define CPPA_BROKER_HPP #define CPPA_IO_BROKER_HPP
#include <map> #include <map>
...@@ -223,4 +223,4 @@ class broker : public extend<local_actor>:: ...@@ -223,4 +223,4 @@ class broker : public extend<local_actor>::
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_BROKER_HPP #endif // CPPA_IO_BROKER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef IO_SERVICE_HPP #ifndef CPPA_IO_CONNECTION_HANDLE_HPP
#define IO_SERVICE_HPP #define CPPA_IO_CONNECTION_HANDLE_HPP
#include "cppa/detail/handle.hpp" #include "cppa/detail/handle.hpp"
...@@ -57,5 +57,4 @@ class connection_handle : public detail::handle<connection_handle> { ...@@ -57,5 +57,4 @@ class connection_handle : public detail::handle<connection_handle> {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_CONNECTION_HANDLE_HPP
#endif // IO_SERVICE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CONTINUABLE_WRITER_HPP #ifndef CPPA_IO_CONTINUABLE_WRITER_HPP
#define CONTINUABLE_WRITER_HPP #define CPPA_IO_CONTINUABLE_WRITER_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
...@@ -141,5 +141,4 @@ inline native_socket_type continuable::write_handle() const { ...@@ -141,5 +141,4 @@ inline native_socket_type continuable::write_handle() const {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_CONTINUABLE_WRITER_HPP
#endif // CONTINUABLE_WRITER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_MESSAGE_QUEUE_HPP #ifndef CPPA_IO_DEFAULT_MESSAGE_QUEUE_HPP
#define CPPA_MESSAGE_QUEUE_HPP #define CPPA_IO_DEFAULT_MESSAGE_QUEUE_HPP
#include <vector> #include <vector>
...@@ -74,7 +74,4 @@ typedef intrusive_ptr<default_message_queue> default_message_queue_ptr; ...@@ -74,7 +74,4 @@ typedef intrusive_ptr<default_message_queue> default_message_queue_ptr;
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_DEFAULT_MESSAGE_QUEUE_HPP
#endif // CPPA_MESSAGE_QUEUE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef EVENT_HPP #ifndef CPPA_IO_EVENT_HPP
#define EVENT_HPP #define CPPA_IO_EVENT_HPP
namespace cppa { namespace cppa {
namespace io { namespace io {
...@@ -61,4 +61,4 @@ inline event_bitmask from_int_bitmask(unsigned mask) { ...@@ -61,4 +61,4 @@ inline event_bitmask from_int_bitmask(unsigned mask) {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // EVENT_HPP #endif // CPPA_IO_EVENT_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_INPUT_STREAM_HPP #ifndef CPPA_IO_INPUT_STREAM_HPP
#define CPPA_INPUT_STREAM_HPP #define CPPA_IO_INPUT_STREAM_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
...@@ -77,4 +77,4 @@ typedef intrusive_ptr<input_stream> input_stream_ptr; ...@@ -77,4 +77,4 @@ typedef intrusive_ptr<input_stream> input_stream_ptr;
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_INPUT_STREAM_HPP #endif // CPPA_IO_INPUT_STREAM_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef MIDDLEMAN_HPP #ifndef CPPA_IO_MIDDLEMAN_HPP
#define MIDDLEMAN_HPP #define CPPA_IO_MIDDLEMAN_HPP
#include <map> #include <map>
#include <vector> #include <vector>
...@@ -215,4 +215,4 @@ const node_id_ptr& middleman::node() const { ...@@ -215,4 +215,4 @@ const node_id_ptr& middleman::node() const {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // MIDDLEMAN_HPP #endif // CPPA_IO_MIDDLEMAN_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef MIDDLEMAN_EVENT_HANDLER_HPP #ifndef CPPA_IO_MIDDLEMAN_EVENT_HANDLER_HPP
#define MIDDLEMAN_EVENT_HANDLER_HPP #define CPPA_IO_MIDDLEMAN_EVENT_HANDLER_HPP
#include <vector> #include <vector>
#include <utility> #include <utility>
...@@ -138,5 +138,4 @@ class middleman_event_handler { ...@@ -138,5 +138,4 @@ class middleman_event_handler {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_MIDDLEMAN_EVENT_HANDLER_HPP
#endif // MIDDLEMAN_EVENT_HANDLER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_OUTPUT_STREAM_HPP #ifndef CPPA_IO_OUTPUT_STREAM_HPP
#define CPPA_OUTPUT_STREAM_HPP #define CPPA_IO_OUTPUT_STREAM_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
...@@ -78,4 +78,4 @@ typedef intrusive_ptr<output_stream> output_stream_ptr; ...@@ -78,4 +78,4 @@ typedef intrusive_ptr<output_stream> output_stream_ptr;
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_OUTPUT_STREAM_HPP #endif // CPPA_IO_OUTPUT_STREAM_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_peer_IMPL_HPP #ifndef CPPA_IO_PEER_HPP
#define CPPA_peer_IMPL_HPP #define CPPA_IO_PEER_HPP
#include <map> #include <map>
#include <cstdint> #include <cstdint>
...@@ -149,4 +149,4 @@ class peer : public extend<continuable>::with<buffered_writing> { ...@@ -149,4 +149,4 @@ class peer : public extend<continuable>::with<buffered_writing> {
} // namespace cppa } // namespace cppa
#endif // CPPA_peer_IMPL_HPP #endif // CPPA_IO_PEER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef IPV4_PEER_ACCEPTOR_HPP #ifndef CPPA_IO_TCP_PEER_ACCEPTOR_HPP
#define IPV4_PEER_ACCEPTOR_HPP #define CPPA_IO_TCP_PEER_ACCEPTOR_HPP
#include "cppa/actor.hpp" #include "cppa/actor.hpp"
...@@ -74,5 +74,4 @@ class peer_acceptor : public continuable { ...@@ -74,5 +74,4 @@ class peer_acceptor : public continuable {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_TCP_PEER_ACCEPTOR_HPP
#endif // IPV4_PEER_ACCEPTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef REMOTE_ACTOR_PROXY_HPP #ifndef CPPA_IO_REMOTE_ACTOR_PROXY_HPP
#define REMOTE_ACTOR_PROXY_HPP #define CPPA_IO_REMOTE_ACTOR_PROXY_HPP
#include "cppa/extend.hpp" #include "cppa/extend.hpp"
#include "cppa/actor_proxy.hpp" #include "cppa/actor_proxy.hpp"
...@@ -115,5 +115,4 @@ class remote_actor_proxy : public actor_proxy { ...@@ -115,5 +115,4 @@ class remote_actor_proxy : public actor_proxy {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // remote_actor_proxy_HPP #endif // remote_actor_proxy_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_IPV4_ACCEPTOR_HPP #ifndef CPPA_IO_TCP_ACCEPTOR_HPP
#define CPPA_IPV4_ACCEPTOR_HPP #define CPPA_IO_TCP_ACCEPTOR_HPP
#include <memory> #include <memory>
#include <cstdint> #include <cstdint>
...@@ -83,5 +83,4 @@ class tcp_acceptor : public acceptor { ...@@ -83,5 +83,4 @@ class tcp_acceptor : public acceptor {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_TCP_ACCEPTOR_HPP
#endif // CPPA_IPV4_ACCEPTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_IPV4_IO_STREAM_HPP #ifndef CPPA_IO_TCP_IO_STREAM_HPP
#define CPPA_IPV4_IO_STREAM_HPP #define CPPA_IO_TCP_IO_STREAM_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/io/stream.hpp" #include "cppa/io/stream.hpp"
...@@ -80,5 +80,4 @@ class tcp_io_stream : public stream { ...@@ -80,5 +80,4 @@ class tcp_io_stream : public stream {
} // namespace io } // namespace io
} // namespace cppa } // namespace cppa
#endif // CPPA_IO_TCP_IO_STREAM_HPP
#endif // CPPA_IPV4_IO_STREAM_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_CONTEXT_HPP #ifndef CPPA_LOCAL_ACTOR_HPP
#define CPPA_CONTEXT_HPP #define CPPA_LOCAL_ACTOR_HPP
#include <atomic> #include <atomic>
#include <cstdint> #include <cstdint>
...@@ -667,4 +667,4 @@ inline void local_actor::planned_exit_reason(std::uint32_t value) { ...@@ -667,4 +667,4 @@ inline void local_actor::planned_exit_reason(std::uint32_t value) {
} // namespace cppa } // namespace cppa
#endif // CPPA_CONTEXT_HPP #endif // CPPA_LOCAL_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_RECURSIVE_QUEUE_NODE_HPP #ifndef CPPA_MAILBOX_ELEMENT_HPP
#define CPPA_RECURSIVE_QUEUE_NODE_HPP #define CPPA_MAILBOX_ELEMENT_HPP
#include <cstdint> #include <cstdint>
...@@ -84,4 +84,4 @@ typedef std::unique_ptr<mailbox_element, detail::disposer> ...@@ -84,4 +84,4 @@ typedef std::unique_ptr<mailbox_element, detail::disposer>
} // namespace cppa } // namespace cppa
#endif // CPPA_RECURSIVE_QUEUE_NODE_HPP #endif // CPPA_MAILBOX_ELEMENT_HPP
...@@ -305,7 +305,6 @@ class stream_matcher { ...@@ -305,7 +305,6 @@ class stream_matcher {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
namespace cppa { namespace cppa {
/** /**
......
...@@ -625,7 +625,6 @@ struct get_case_result { ...@@ -625,7 +625,6 @@ struct get_case_result {
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
namespace cppa { namespace cppa {
/** /**
...@@ -1056,7 +1055,6 @@ inline T lift_to_match_expr(T arg) { ...@@ -1056,7 +1055,6 @@ inline T lift_to_match_expr(T arg) {
} }
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_MATCH_EXPR_HPP #endif // CPPA_MATCH_EXPR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef MAY_HAVE_TIMEOUT_HPP #ifndef CPPA_MAY_HAVE_TIMEOUT_HPP
#define MAY_HAVE_TIMEOUT_HPP #define CPPA_MAY_HAVE_TIMEOUT_HPP
namespace cppa { namespace cppa {
...@@ -55,4 +55,4 @@ struct may_have_timeout<timeout_definition<F>> { ...@@ -55,4 +55,4 @@ struct may_have_timeout<timeout_definition<F>> {
} // namespace cppa } // namespace cppa
#endif // MAY_HAVE_TIMEOUT_HPP #endif // CPPA_MAY_HAVE_TIMEOUT_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef PRIORITY_HPP #ifndef CPPA_PRIORITY_HPP
#define PRIORITY_HPP #define CPPA_PRIORITY_HPP
#include <cstdint> #include <cstdint>
...@@ -42,4 +42,4 @@ enum class message_priority : std::uint32_t { ...@@ -42,4 +42,4 @@ enum class message_priority : std::uint32_t {
} // namespace cppa } // namespace cppa
#endif // PRIORITY_HPP #endif // CPPA_PRIORITY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PROCESS_INFORMATION_HPP #ifndef CPPA_NODE_ID_HPP
#define CPPA_PROCESS_INFORMATION_HPP #define CPPA_NODE_ID_HPP
#include <array> #include <array>
#include <string> #include <string>
...@@ -151,4 +151,4 @@ std::string to_string(const node_id::host_id_type& node_id); ...@@ -151,4 +151,4 @@ std::string to_string(const node_id::host_id_type& node_id);
} // namespace cppa } // namespace cppa
#endif // CPPA_PROCESS_INFORMATION_HPP #endif // CPPA_NODE_ID_HPP
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "cppa/unit.hpp" #include "cppa/unit.hpp"
#include "cppa/atom.hpp" #include "cppa/atom.hpp"
#include "cppa/anything.hpp" #include "cppa/anything.hpp"
#include "cppa/arg_match.hpp"
#include "cppa/any_tuple.hpp" #include "cppa/any_tuple.hpp"
#include "cppa/guard_expr.hpp" #include "cppa/guard_expr.hpp"
#include "cppa/match_expr.hpp" #include "cppa/match_expr.hpp"
...@@ -47,7 +48,6 @@ ...@@ -47,7 +48,6 @@
#include "cppa/util/duration.hpp" #include "cppa/util/duration.hpp"
#include "cppa/util/type_list.hpp" #include "cppa/util/type_list.hpp"
#include "cppa/util/arg_match_t.hpp"
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
#include "cppa/detail/boxed.hpp" #include "cppa/detail/boxed.hpp"
...@@ -128,7 +128,7 @@ struct rvalue_builder { ...@@ -128,7 +128,7 @@ struct rvalue_builder {
typedef typename util::tl_back<Pattern>::type back_type; typedef typename util::tl_back<Pattern>::type back_type;
static constexpr bool is_complete = static constexpr bool is_complete =
!std::is_same<util::arg_match_t, back_type>::value; !std::is_same<arg_match_t, back_type>::value;
typedef typename util::tl_apply<Transformers, tdata>::type fun_container; typedef typename util::tl_apply<Transformers, tdata>::type fun_container;
...@@ -295,9 +295,9 @@ constexpr typename detail::boxed<T>::type val() { ...@@ -295,9 +295,9 @@ constexpr typename detail::boxed<T>::type val() {
return typename detail::boxed<T>::type(); return typename detail::boxed<T>::type();
} }
typedef typename detail::boxed<util::arg_match_t>::type boxed_arg_match_t; typedef typename detail::boxed<arg_match_t>::type boxed_arg_match_t;
constexpr boxed_arg_match_t arg_match = boxed_arg_match_t(); //constexpr boxed_arg_match_t arg_match = boxed_arg_match_t();
template<typename T, typename... Ts> template<typename T, typename... Ts>
detail::rvalue_builder< detail::rvalue_builder<
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef DEVICE_INFO_HPP #ifndef CPPA_OPENCL_DEVICE_INFO_HPP
#define DEVICE_INFO_HPP #define CPPA_OPENCL_DEVICE_INFO_HPP
#include "cppa/opencl/global.hpp" #include "cppa/opencl/global.hpp"
#include "cppa/opencl/program.hpp" #include "cppa/opencl/program.hpp"
...@@ -89,4 +89,4 @@ inline dim_vec device_info::get_max_work_items_per_dim() { ...@@ -89,4 +89,4 @@ inline dim_vec device_info::get_max_work_items_per_dim() {
} // namespace cppa } // namespace cppa
#endif // DEVICE_INFO_HPP #endif // CPPA_OPENCL_DEVICE_INFO_HPP
...@@ -58,5 +58,4 @@ cl_int clRetainDeviceDummy (cl_device_id); ...@@ -58,5 +58,4 @@ cl_int clRetainDeviceDummy (cl_device_id);
} // namespace opencl } // namespace opencl
} // namespace cppa } // namespace cppa
#endif // CPPA_OPENCL_GLOBAL_HPP #endif // CPPA_OPENCL_GLOBAL_HPP
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef OPENCL_METAINFO_HPP #ifndef CPPA_OPENCL_METAINFO_HPP
#define OPENCL_METAINFO_HPP #define CPPA_OPENCL_METAINFO_HPP
#include <atomic> #include <atomic>
#include <vector> #include <vector>
...@@ -81,5 +81,4 @@ opencl_metainfo* get_opencl_metainfo(); ...@@ -81,5 +81,4 @@ opencl_metainfo* get_opencl_metainfo();
} // namespace opencl } // namespace opencl
} // namespace cppa } // namespace cppa
#endif // CPPA_OPENCL_METAINFO_HPP
#endif // OPENCL_METAINFO_HPP
...@@ -73,5 +73,4 @@ class program { ...@@ -73,5 +73,4 @@ class program {
} // namespace opencl } // namespace opencl
} // namespace cppa } // namespace cppa
#endif // CPPA_OPENCL_PROGRAM_HPP #endif // CPPA_OPENCL_PROGRAM_HPP
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef SMART_PTR_HPP #ifndef CPPA_OPENCL_SMART_PTR_HPP
#define SMART_PTR_HPP #define CPPA_OPENCL_SMART_PTR_HPP
#include <memory> #include <memory>
#include <algorithm> #include <algorithm>
...@@ -123,5 +123,4 @@ typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue> ...@@ -123,5 +123,4 @@ typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue>
} // namespace opencl } // namespace opencl
} // namespace cppa } // namespace cppa
#endif // CPPA_OPENCL_SMART_PTR_HPP
#endif // SMART_PTR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_OPTION_HPP #ifndef CPPA_OPTIONAL_HPP
#define CPPA_OPTION_HPP #define CPPA_OPTIONAL_HPP
#include <new> #include <new>
#include <utility> #include <utility>
...@@ -345,4 +345,4 @@ bool operator!=(const T& lhs, const optional<U>& rhs) { ...@@ -345,4 +345,4 @@ bool operator!=(const T& lhs, const optional<U>& rhs) {
} // namespace cppa } // namespace cppa
#endif // CPPA_OPTION_HPP #endif // CPPA_OPTIONAL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef OPTIONAL_VARIANT_HPP #ifndef CPPA_OPTIONAL_VARIANT_HPP
#define OPTIONAL_VARIANT_HPP #define CPPA_OPTIONAL_VARIANT_HPP
#include <ostream> #include <ostream>
#include <stdexcept> #include <stdexcept>
...@@ -454,4 +454,4 @@ inline optional_variant<Ts...> make_optional_variant(optional_variant<Ts...> val ...@@ -454,4 +454,4 @@ inline optional_variant<Ts...> make_optional_variant(optional_variant<Ts...> val
} // namespace cppa } // namespace cppa
#endif // OPTIONAL_VARIANT_HPP #endif // CPPA_OPTIONAL_VARIANT_HPP
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. * * along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_CONTEXT_SWITCHING_ACTOR_HPP #ifndef CPPA_POLICY_CONTEXT_SWITCHING_RESUME_HPP
#define CPPA_CONTEXT_SWITCHING_ACTOR_HPP #define CPPA_POLICY_CONTEXT_SWITCHING_RESUME_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/logging.hpp" #include "cppa/logging.hpp"
...@@ -132,4 +132,4 @@ class context_switching_resume { ...@@ -132,4 +132,4 @@ class context_switching_resume {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_CONTEXT_SWITCHING_ACTOR_HPP #endif // CPPA_POLICY_CONTEXT_SWITCHING_RESUME_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_COOPERATIVE_SCHEDULING_HPP #ifndef CPPA_POLICY_COOPERATIVE_SCHEDULING_HPP
#define CPPA_COOPERATIVE_SCHEDULING_HPP #define CPPA_POLICY_COOPERATIVE_SCHEDULING_HPP
#include <atomic> #include <atomic>
...@@ -88,5 +88,4 @@ class cooperative_scheduling { ...@@ -88,5 +88,4 @@ class cooperative_scheduling {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_COOPERATIVE_SCHEDULING_HPP
#endif // CPPA_COOPERATIVE_SCHEDULING_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ABSTRACT_EVENT_BASED_ACTOR_HPP #ifndef CPPA_POLICY_EVENT_BASED_RESUME_HPP
#define CPPA_ABSTRACT_EVENT_BASED_ACTOR_HPP #define CPPA_POLICY_EVENT_BASED_RESUME_HPP
#include <tuple> #include <tuple>
#include <stack> #include <stack>
...@@ -191,5 +191,4 @@ class event_based_resume { ...@@ -191,5 +191,4 @@ class event_based_resume {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_EVENT_BASED_RESUME_HPP
#endif // CPPA_ABSTRACT_EVENT_BASED_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_INVOKE_POLICY_HPP #ifndef CPPA_POLICY_INVOKE_POLICY_HPP
#define CPPA_INVOKE_POLICY_HPP #define CPPA_POLICY_INVOKE_POLICY_HPP
#include <list> #include <list>
#include <memory> #include <memory>
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "cppa/partial_function.hpp" #include "cppa/partial_function.hpp"
#include "cppa/response_promise.hpp" #include "cppa/response_promise.hpp"
#include "cppa/util/dptr.hpp"
#include "cppa/detail/memory.hpp" #include "cppa/detail/memory.hpp"
#include "cppa/detail/matches.hpp" #include "cppa/detail/matches.hpp"
...@@ -204,7 +203,7 @@ class invoke_policy { ...@@ -204,7 +203,7 @@ class invoke_policy {
message_id& mid, message_id& mid,
Fun& fun, Fun& fun,
MaybeResponseHandle hdl = MaybeResponseHandle{}) { MaybeResponseHandle hdl = MaybeResponseHandle{}) {
# if CPPA_LOG_LEVEL >= CPPA_DEBUG # if CPPA_LOG_LEVEL >= CPPA_POLICY_DEBUG
auto msg_str = to_string(msg); auto msg_str = to_string(msg);
# endif # endif
auto res = fun(msg); // might change mid auto res = fun(msg); // might change mid
...@@ -335,9 +334,9 @@ class invoke_policy { ...@@ -335,9 +334,9 @@ class invoke_policy {
} }
case msg_type::sync_response: { case msg_type::sync_response: {
CPPA_LOG_DEBUG("handle as synchronous response: " CPPA_LOG_DEBUG("handle as synchronous response: "
<< CPPA_TARG(node->msg, to_string) << ", " << CPPA_POLICY_TARG(node->msg, to_string) << ", "
<< CPPA_MARG(node->mid, integer_value) << ", " << CPPA_POLICY_MARG(node->mid, integer_value) << ", "
<< CPPA_MARG(awaited_response, integer_value)); << CPPA_POLICY_MARG(awaited_response, integer_value));
if (awaited_response.valid() && node->mid == awaited_response) { if (awaited_response.valid() && node->mid == awaited_response) {
auto previous_node = dptr()->hm_begin(self, node); auto previous_node = dptr()->hm_begin(self, node);
auto res = invoke_fun(self, auto res = invoke_fun(self,
...@@ -389,5 +388,4 @@ class invoke_policy { ...@@ -389,5 +388,4 @@ class invoke_policy {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_INVOKE_POLICY_HPP
#endif // CPPA_INVOKE_POLICY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_THREADED_HPP #ifndef CPPA_POLICY_NESTABLE_INVOKE_HPP
#define CPPA_THREADED_HPP #define CPPA_POLICY_NESTABLE_INVOKE_HPP
#include <mutex> #include <mutex>
#include <chrono> #include <chrono>
...@@ -38,17 +38,12 @@ ...@@ -38,17 +38,12 @@
#include "cppa/exit_reason.hpp" #include "cppa/exit_reason.hpp"
#include "cppa/mailbox_element.hpp" #include "cppa/mailbox_element.hpp"
#include "cppa/util/dptr.hpp"
#include "cppa/detail/sync_request_bouncer.hpp" #include "cppa/detail/sync_request_bouncer.hpp"
#include "cppa/intrusive/single_reader_queue.hpp" #include "cppa/intrusive/single_reader_queue.hpp"
#include "cppa/policy/invoke_policy.hpp" #include "cppa/policy/invoke_policy.hpp"
namespace cppa {
namespace detail { class receive_policy; } }
namespace cppa { namespace cppa {
namespace policy { namespace policy {
...@@ -87,5 +82,4 @@ class nestable_invoke : public invoke_policy<nestable_invoke> { ...@@ -87,5 +82,4 @@ class nestable_invoke : public invoke_policy<nestable_invoke> {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_NESTABLE_INVOKE_HPP
#endif // CPPA_THREADED_HPP
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \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 2.1 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 NO_RESUME_HPP #ifndef NO_RESUME_HPP
#define NO_RESUME_HPP #define NO_RESUME_HPP
...@@ -71,5 +101,4 @@ class no_resume { ...@@ -71,5 +101,4 @@ class no_resume {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // NO_RESUME_HPP #endif // NO_RESUME_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_NO_SCHEDULING_HPP #ifndef CPPA_POLICY_NO_SCHEDULING_HPP
#define CPPA_NO_SCHEDULING_HPP #define CPPA_POLICY_NO_SCHEDULING_HPP
#include <mutex> #include <mutex>
#include <thread> #include <thread>
...@@ -79,7 +79,7 @@ class no_scheduling { ...@@ -79,7 +79,7 @@ class no_scheduling {
void launch(Actor* self, execution_unit*) { void launch(Actor* self, execution_unit*) {
CPPA_REQUIRE(self != nullptr); CPPA_REQUIRE(self != nullptr);
CPPA_PUSH_AID(self->id()); CPPA_PUSH_AID(self->id());
CPPA_LOG_TRACE(CPPA_ARG(self)); CPPA_LOG_TRACE(CPPA_POLICY_ARG(self));
intrusive_ptr<Actor> mself{self}; intrusive_ptr<Actor> mself{self};
self->attach_to_scheduler(); self->attach_to_scheduler();
std::thread([=] { std::thread([=] {
...@@ -124,5 +124,4 @@ class no_scheduling { ...@@ -124,5 +124,4 @@ class no_scheduling {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_NO_SCHEDULING_HPP
#endif // CPPA_NO_SCHEDULING_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef NOT_PRIORITIZING_HPP #ifndef CPPA_POLICY_NOT_PRIORITIZING_HPP
#define NOT_PRIORITIZING_HPP #define CPPA_POLICY_NOT_PRIORITIZING_HPP
#include <list> #include <list>
#include <iterator> #include <iterator>
...@@ -101,4 +101,4 @@ class not_prioritizing { ...@@ -101,4 +101,4 @@ class not_prioritizing {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // NOT_PRIORITIZING_HPP #endif // CPPA_POLICY_NOT_PRIORITIZING_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef PRIORITIZING_HPP #ifndef CPPA_POLICY_PRIORITIZING_HPP
#define PRIORITIZING_HPP #define CPPA_POLICY_PRIORITIZING_HPP
#include <list> #include <list>
#include <iostream> #include <iostream>
...@@ -142,5 +142,4 @@ class prioritizing { ...@@ -142,5 +142,4 @@ class prioritizing {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_PRIORITIZING_HPP
#endif // PRIORITIZING_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PRIORITY_POLICY_HPP #ifndef CPPA_POLICY_PRIORITY_POLICY_HPP
#define CPPA_PRIORITY_POLICY_HPP #define CPPA_POLICY_PRIORITY_POLICY_HPP
namespace cppa { class mailbox_element; } namespace cppa { class mailbox_element; }
...@@ -75,5 +75,4 @@ class priority_policy { ...@@ -75,5 +75,4 @@ class priority_policy {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_PRIORITY_POLICY_HPP
#endif // CPPA_PRIORITY_POLICY_HPP
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_RESUME_POLICY_HPP #ifndef CPPA_POLICY_RESUME_POLICY_HPP
#define CPPA_RESUME_POLICY_HPP #define CPPA_POLICY_RESUME_POLICY_HPP
#include "cppa/cppa_fwd.hpp"
#include "cppa/resumable.hpp" #include "cppa/resumable.hpp"
// this header consists all type definitions needed to // this header consists all type definitions needed to
...@@ -38,10 +39,6 @@ ...@@ -38,10 +39,6 @@
namespace cppa { namespace cppa {
class execution_unit;
namespace util { class duration; }
namespace detail { struct cs_thread; }
namespace policy { namespace policy {
/** /**
...@@ -79,4 +76,4 @@ class resume_policy { ...@@ -79,4 +76,4 @@ class resume_policy {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_RESUME_POLICY_HPP #endif // CPPA_POLICY_RESUME_POLICY_HPP
...@@ -28,17 +28,12 @@ ...@@ -28,17 +28,12 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SCHEDULING_POLICY_HPP #ifndef CPPA_POLICY_SCHEDULING_POLICY_HPP
#define CPPA_SCHEDULING_POLICY_HPP #define CPPA_POLICY_SCHEDULING_POLICY_HPP
namespace cppa { #include "cppa/cppa_fwd.hpp"
class any_tuple;
class execution_unit;
class message_header;
namespace util { class duration; }
namespace cppa {
namespace policy { namespace policy {
enum class timed_fetch_result { enum class timed_fetch_result {
...@@ -121,5 +116,4 @@ class scheduling_policy { ...@@ -121,5 +116,4 @@ class scheduling_policy {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_SCHEDULING_POLICY_HPP
#endif // CPPA_SCHEDULING_POLICY_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_THREADLESS_HPP #ifndef CPPA_POLICY_SEQUENTIAL_INVOKE_HPP
#define CPPA_THREADLESS_HPP #define CPPA_POLICY_SEQUENTIAL_INVOKE_HPP
#include "cppa/atom.hpp" #include "cppa/atom.hpp"
#include "cppa/behavior.hpp" #include "cppa/behavior.hpp"
...@@ -74,5 +74,4 @@ class sequential_invoke : public invoke_policy<sequential_invoke> { ...@@ -74,5 +74,4 @@ class sequential_invoke : public invoke_policy<sequential_invoke> {
} // namespace policy } // namespace policy
} // namespace cppa } // namespace cppa
#endif // CPPA_POLICY_SEQUENTIAL_INVOKE_HPP
#endif // CPPA_THREADLESS_HPP
...@@ -60,7 +60,6 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, ...@@ -60,7 +60,6 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
namespace cppa { namespace cppa {
class primitive_variant; class primitive_variant;
...@@ -382,6 +381,4 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, ...@@ -382,6 +381,4 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif // CPPA_PRIMITIVE_VARIANT_HPP #endif // CPPA_PRIMITIVE_VARIANT_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ACTOR_WIDGET_MIXIN_HPP #ifndef CPPA_QTSUPPORT_ACTOR_WIDGET_MIXIN_HPP
#define CPPA_ACTOR_WIDGET_MIXIN_HPP #define CPPA_QTSUPPORT_ACTOR_WIDGET_MIXIN_HPP
#include <QEvent> #include <QEvent>
#include <QApplication> #include <QApplication>
...@@ -97,4 +97,4 @@ class actor_widget_mixin : public Base { ...@@ -97,4 +97,4 @@ class actor_widget_mixin : public Base {
} // namespace cppa } // namespace cppa
#endif // CPPA_ACTOR_WIDGET_MIXIN_HPP #endif // CPPA_QTSUPPORT_ACTOR_WIDGET_MIXIN_HPP
...@@ -28,13 +28,12 @@ ...@@ -28,13 +28,12 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_FSM_ACTOR_HPP #ifndef CPPA_SB_ACTOR_HPP
#define CPPA_FSM_ACTOR_HPP #define CPPA_SB_ACTOR_HPP
#include <utility> #include <utility>
#include <type_traits> #include <type_traits>
#include "cppa/util/dptr.hpp"
#include "cppa/event_based_actor.hpp" #include "cppa/event_based_actor.hpp"
namespace cppa { namespace cppa {
...@@ -62,7 +61,7 @@ class sb_actor : public Base { ...@@ -62,7 +61,7 @@ class sb_actor : public Base {
* the initial actor behavior to <tt>Derived::init_state</tt>. * the initial actor behavior to <tt>Derived::init_state</tt>.
*/ */
behavior make_behavior() override { behavior make_behavior() override {
return util::dptr<Derived>(this)->init_state; return static_cast<Derived*>(this)->init_state;
} }
protected: protected:
...@@ -74,4 +73,4 @@ class sb_actor : public Base { ...@@ -74,4 +73,4 @@ class sb_actor : public Base {
} // namespace cppa } // namespace cppa
#endif // CPPA_FSM_ACTOR_HPP #endif // CPPA_SB_ACTOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_MATCH_HINT_HPP #ifndef CPPA_SKIP_MESSAGE_HPP
#define CPPA_MATCH_HINT_HPP #define CPPA_SKIP_MESSAGE_HPP
namespace cppa { namespace cppa {
...@@ -54,4 +54,4 @@ std::ostream& operator<<(std::ostream&, skip_message_t); ...@@ -54,4 +54,4 @@ std::ostream& operator<<(std::ostream&, skip_message_t);
} // namespace cppa } // namespace cppa
#endif // CPPA_MATCH_HINT_HPP #endif // CPPA_SKIP_MESSAGE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef TIMEOUT_DEFINITION_HPP #ifndef CPPA_TIMEOUT_DEFINITION_HPP
#define TIMEOUT_DEFINITION_HPP #define CPPA_TIMEOUT_DEFINITION_HPP
#include <functional> #include <functional>
...@@ -51,4 +51,4 @@ typedef timeout_definition<std::function<void()> > generic_timeout_definition; ...@@ -51,4 +51,4 @@ typedef timeout_definition<std::function<void()> > generic_timeout_definition;
} // namespace cppa } // namespace cppa
#endif // TIMEOUT_DEFINITION_HPP #endif // CPPA_TIMEOUT_DEFINITION_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef TYPED_BEHAVIOR_HPP #ifndef CPPA_TYPED_BEHAVIOR_HPP
#define TYPED_BEHAVIOR_HPP #define CPPA_TYPED_BEHAVIOR_HPP
#include "cppa/behavior.hpp" #include "cppa/behavior.hpp"
#include "cppa/match_expr.hpp" #include "cppa/match_expr.hpp"
...@@ -238,4 +238,4 @@ class typed_behavior { ...@@ -238,4 +238,4 @@ class typed_behavior {
} // namespace cppa } // namespace cppa
#endif // TYPED_BEHAVIOR_HPP #endif // CPPA_TYPED_BEHAVIOR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_ABSTRACT_UNIFORM_TYPE_INFO_HPP #ifndef CPPA_UTIL_ABSTRACT_UNIFORM_TYPE_INFO_HPP
#define CPPA_ABSTRACT_UNIFORM_TYPE_INFO_HPP #define CPPA_UTIL_ABSTRACT_UNIFORM_TYPE_INFO_HPP
#include "cppa/any_tuple.hpp" #include "cppa/any_tuple.hpp"
#include "cppa/deserializer.hpp" #include "cppa/deserializer.hpp"
...@@ -134,5 +134,4 @@ class abstract_uniform_type_info : public uniform_type_info { ...@@ -134,5 +134,4 @@ class abstract_uniform_type_info : public uniform_type_info {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_ABSTRACT_UNIFORM_TYPE_INFO_HPP
#endif // CPPA_ABSTRACT_UNIFORM_TYPE_INFO_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_UTIL_SPLIT_HPP #ifndef CPPA_UTIL_ALGORITHM_HPP
#define CPPA_UTIL_SPLIT_HPP #define CPPA_UTIL_ALGORITHM_HPP
#include <cmath> // fabs #include <cmath> // fabs
#include <string> #include <string>
...@@ -105,5 +105,4 @@ safe_equal(const T& lhs, const U& rhs) { ...@@ -105,5 +105,4 @@ safe_equal(const T& lhs, const U& rhs) {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_ALGORITHM_HPP
#endif // CPPA_UTIL_SPLIT_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_BUFFER_HPP #ifndef CPPA_UTIL_BUFFER_HPP
#define CPPA_BUFFER_HPP #define CPPA_UTIL_BUFFER_HPP
#include <cstddef> // size_t #include <cstddef> // size_t
...@@ -317,4 +317,4 @@ inline size_t buffer::adjust(size_t alloc_size) const { ...@@ -317,4 +317,4 @@ inline size_t buffer::adjust(size_t alloc_size) const {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_BUFFER_HPP #endif // CPPA_UTIL_BUFFER_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CALL_HPP #ifndef CPPA_UTIL_CALL_HPP
#define CALL_HPP #define CPPA_UTIL_CALL_HPP
#include "cppa/get.hpp" #include "cppa/get.hpp"
#include "cppa/util/int_list.hpp" #include "cppa/util/int_list.hpp"
...@@ -63,5 +63,4 @@ inline auto call_mv(F& f, Ts&&... args) -> decltype(f(std::move(args)...)) { ...@@ -63,5 +63,4 @@ inline auto call_mv(F& f, Ts&&... args) -> decltype(f(std::move(args)...)) {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_CALL_HPP
#endif // CALL_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_COMPARABLE_HPP #ifndef CPPA_UTIL_COMPARABLE_HPP
#define CPPA_COMPARABLE_HPP #define CPPA_UTIL_COMPARABLE_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -128,5 +128,4 @@ class comparable<Subclass, Subclass> { ...@@ -128,5 +128,4 @@ class comparable<Subclass, Subclass> {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_COMPARABLE_HPP
#endif // CPPA_COMPARABLE_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_COMPARE_TUPLES_HPP #ifndef CPPA_UTIL_COMPARE_TUPLES_HPP
#define CPPA_COMPARE_TUPLES_HPP #define CPPA_UTIL_COMPARE_TUPLES_HPP
#include "cppa/get.hpp" #include "cppa/get.hpp"
...@@ -61,10 +61,9 @@ struct cmp_helper<0, LhsTuple, RhsTuple> { ...@@ -61,10 +61,9 @@ struct cmp_helper<0, LhsTuple, RhsTuple> {
} }
}; };
} // namespace util } // namespace detail
} // namespace cppa } // namespace cppa
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -108,5 +107,4 @@ bool compare_first_elements(const LhsTuple<LhsTs...>& lhs, ...@@ -108,5 +107,4 @@ bool compare_first_elements(const LhsTuple<LhsTs...>& lhs,
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_COMPARE_TUPLES_HPP
#endif // CPPA_COMPARE_TUPLES_HPP
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \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 2.1 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_DTHIS_HPP
#define CPPA_DTHIS_HPP
#include <type_traits>
namespace cppa {
namespace util {
/**
* @brief Returns <tt>static_cast<Subtype*>(ptr)</tt> if @p Subtype is a
* derived type of @p MixinType, returns @p ptr without cast otherwise.
*/
template<class Subtype, class MixinType>
typename std::conditional<
std::is_base_of<MixinType, Subtype>::value,
Subtype,
MixinType
>::type*
dptr(MixinType* ptr) {
typedef typename std::conditional<
std::is_base_of<MixinType, Subtype>::value,
Subtype,
MixinType
>::type
result_type;
return static_cast<result_type*>(ptr);
}
} // namespace util
} // namespace cppa
#endif // CPPA_DTHIS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_DURATION_HPP #ifndef CPPA_UTIL_DURATION_HPP
#define CPPA_DURATION_HPP #define CPPA_UTIL_DURATION_HPP
#include <string> #include <string>
#include <chrono> #include <chrono>
...@@ -73,7 +73,7 @@ template<> struct ratio_to_time_unit_helper<60, 1> { ...@@ -73,7 +73,7 @@ template<> struct ratio_to_time_unit_helper<60, 1> {
/** /**
* @brief Converts an STL time period to a * @brief Converts an STL time period to a
* {@link cppa::util::time_unit time_unit}. * {@link time_unit time_unit}.
*/ */
template<typename Period> template<typename Period>
constexpr time_unit get_time_unit_from_period() { constexpr time_unit get_time_unit_from_period() {
...@@ -81,7 +81,7 @@ constexpr time_unit get_time_unit_from_period() { ...@@ -81,7 +81,7 @@ constexpr time_unit get_time_unit_from_period() {
} }
/** /**
* @brief Time duration consisting of a {@link cppa::util::time_unit time_unit} * @brief Time duration consisting of a {@link time_unit time_unit}
* and a 64 bit unsigned integer. * and a 64 bit unsigned integer.
*/ */
class duration { class duration {
...@@ -162,34 +162,32 @@ inline bool operator!=(const duration& lhs, const duration& rhs) { ...@@ -162,34 +162,32 @@ inline bool operator!=(const duration& lhs, const duration& rhs) {
return !(lhs == rhs); return !(lhs == rhs);
} }
} // namespace util
} // namespace cppa
/** /**
* @relates cppa::util::duration * @relates duration
*/ */
template<class Clock, class Duration> template<class Clock, class Duration>
std::chrono::time_point<Clock, Duration>& std::chrono::time_point<Clock, Duration>&
operator+=(std::chrono::time_point<Clock, Duration>& lhs, operator+=(std::chrono::time_point<Clock, Duration>& lhs, const duration& rhs) {
const cppa::util::duration& rhs) {
switch (rhs.unit) { switch (rhs.unit) {
case cppa::util::time_unit::seconds: case time_unit::seconds:
lhs += std::chrono::seconds(rhs.count); lhs += std::chrono::seconds(rhs.count);
break; break;
case cppa::util::time_unit::milliseconds: case time_unit::milliseconds:
lhs += std::chrono::milliseconds(rhs.count); lhs += std::chrono::milliseconds(rhs.count);
break; break;
case cppa::util::time_unit::microseconds: case time_unit::microseconds:
lhs += std::chrono::microseconds(rhs.count); lhs += std::chrono::microseconds(rhs.count);
break; break;
case cppa::util::time_unit::invalid: case time_unit::invalid:
break; break;
} }
return lhs; return lhs;
} }
#endif // CPPA_DURATION_HPP } // namespace util
} // namespace cppa
#endif // CPPA_UTIL_DURATION_HPP
...@@ -42,5 +42,4 @@ std::vector<std::string> get_mac_addresses(); ...@@ -42,5 +42,4 @@ std::vector<std::string> get_mac_addresses();
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_GET_MAC_ADDRESSES_HPP #endif // CPPA_UTIL_GET_MAC_ADDRESSES_HPP
...@@ -41,5 +41,4 @@ std::string get_root_uuid(); ...@@ -41,5 +41,4 @@ std::string get_root_uuid();
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_GET_ROOT_UUID_HPP #endif // CPPA_UTIL_GET_ROOT_UUID_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef GUARD_HPP #ifndef CPPA_UTIL_GUARD_HPP
#define GUARD_HPP #define CPPA_UTIL_GUARD_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -46,5 +46,4 @@ struct guard { ...@@ -46,5 +46,4 @@ struct guard {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_GUARD_HPP
#endif // GUARD_HPP
...@@ -510,5 +510,4 @@ constexpr auto get_right_indices(const T&) ...@@ -510,5 +510,4 @@ constexpr auto get_right_indices(const T&)
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_INT_LIST_HPP #endif // CPPA_UTIL_INT_LIST_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_LEFT_OR_RIGHT_HPP #ifndef CPPA_UTIL_LEFT_OR_RIGHT_HPP
#define CPPA_LEFT_OR_RIGHT_HPP #define CPPA_UTIL_LEFT_OR_RIGHT_HPP
#include "cppa/unit.hpp" #include "cppa/unit.hpp"
...@@ -75,5 +75,4 @@ struct if_not_left<unit_t, Right> { ...@@ -75,5 +75,4 @@ struct if_not_left<unit_t, Right> {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_LEFT_OR_RIGHT_HPP
#endif // CPPA_LEFT_OR_RIGHT_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_FIXED_VECTOR_HPP #ifndef CPPA_UTIL_LIMITED_VECTOR_HPP
#define CPPA_FIXED_VECTOR_HPP #define CPPA_UTIL_LIMITED_VECTOR_HPP
#include <cstddef> #include <cstddef>
#include <iterator> #include <iterator>
...@@ -274,5 +274,4 @@ class limited_vector { ...@@ -274,5 +274,4 @@ class limited_vector {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_LIMITED_VECTOR_HPP
#endif // CPPA_FIXED_VECTOR_HPP
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PRODUCER_CONSUMER_LIST_HPP #ifndef CPPA_UTIL_PRODUCER_CONSUMER_LIST_HPP
#define CPPA_PRODUCER_CONSUMER_LIST_HPP #define CPPA_UTIL_PRODUCER_CONSUMER_LIST_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
#define CPPA_CACHE_LINE_SIZE 64 #define CPPA_UTIL_CACHE_LINE_SIZE 64
#include <chrono> #include <chrono>
#include <thread> #include <thread>
...@@ -105,7 +105,7 @@ class producer_consumer_list { ...@@ -105,7 +105,7 @@ class producer_consumer_list {
static constexpr size_type payload_size = static constexpr size_type payload_size =
sizeof(pointer) + sizeof(std::atomic<node*>); sizeof(pointer) + sizeof(std::atomic<node*>);
static constexpr size_type cline_size = CPPA_CACHE_LINE_SIZE; static constexpr size_type cline_size = CPPA_UTIL_CACHE_LINE_SIZE;
static constexpr size_type pad_size = static constexpr size_type pad_size =
(cline_size * ((payload_size / cline_size) + 1)) - payload_size; (cline_size * ((payload_size / cline_size) + 1)) - payload_size;
...@@ -117,16 +117,16 @@ class producer_consumer_list { ...@@ -117,16 +117,16 @@ class producer_consumer_list {
private: private:
static_assert(sizeof(node*) < CPPA_CACHE_LINE_SIZE, static_assert(sizeof(node*) < CPPA_UTIL_CACHE_LINE_SIZE,
"sizeof(node*) >= CPPA_CACHE_LINE_SIZE"); "sizeof(node*) >= CPPA_UTIL_CACHE_LINE_SIZE");
// for one consumer at a time // for one consumer at a time
std::atomic<node*> m_first; std::atomic<node*> m_first;
char m_pad1[CPPA_CACHE_LINE_SIZE - sizeof(node*)]; char m_pad1[CPPA_UTIL_CACHE_LINE_SIZE - sizeof(node*)];
// for one producers at a time // for one producers at a time
std::atomic<node*> m_last; std::atomic<node*> m_last;
char m_pad2[CPPA_CACHE_LINE_SIZE - sizeof(node*)]; char m_pad2[CPPA_UTIL_CACHE_LINE_SIZE - sizeof(node*)];
// shared among producers // shared among producers
std::atomic<bool> m_consumer_lock; std::atomic<bool> m_consumer_lock;
...@@ -203,5 +203,4 @@ class producer_consumer_list { ...@@ -203,5 +203,4 @@ class producer_consumer_list {
} // namespace util } // namespace util
} // namespace cppa } // namespace cppa
#endif // CPPA_UTIL_PRODUCER_CONSUMER_LIST_HPP
#endif // CPPA_PRODUCER_CONSUMER_LIST_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PT_DISPATCH_HPP #ifndef CPPA_UTIL_PT_DISPATCH_HPP
#define CPPA_PT_DISPATCH_HPP #define CPPA_UTIL_PT_DISPATCH_HPP
#include "cppa/primitive_type.hpp" #include "cppa/primitive_type.hpp"
#include "cppa/util/pt_token.hpp" #include "cppa/util/pt_token.hpp"
...@@ -68,4 +68,4 @@ void pt_dispatch(primitive_type ptype, Fun&& f) { ...@@ -68,4 +68,4 @@ void pt_dispatch(primitive_type ptype, Fun&& f) {
} // namespace cppa } // namespace cppa
#endif // CPPA_PT_DISPATCH_HPP #endif // CPPA_UTIL_PT_DISPATCH_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PT_TOKEN_HPP #ifndef CPPA_UTIL_PT_TOKEN_HPP
#define CPPA_PT_TOKEN_HPP #define CPPA_UTIL_PT_TOKEN_HPP
#include "cppa/primitive_type.hpp" #include "cppa/primitive_type.hpp"
...@@ -46,4 +46,4 @@ struct pt_token { static const primitive_type value = PT; }; ...@@ -46,4 +46,4 @@ struct pt_token { static const primitive_type value = PT; };
} // namespace cppa } // namespace cppa
#endif // CPPA_PT_TOKEN_HPP #endif // CPPA_UTIL_PT_TOKEN_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_PURGE_REFS_HPP #ifndef CPPA_UTIL_PURGE_REFS_HPP
#define CPPA_PURGE_REFS_HPP #define CPPA_UTIL_PURGE_REFS_HPP
#include <functional> #include <functional>
...@@ -77,4 +77,4 @@ struct purge_refs { ...@@ -77,4 +77,4 @@ struct purge_refs {
} // namespace cppa } // namespace cppa
#endif // CPPA_PURGE_REFS_HPP #endif // CPPA_UTIL_PURGE_REFS_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_REBINDABLE_REFERENCE_HPP #ifndef CPPA_UTIL_REBINDABLE_REFERENCE_HPP
#define CPPA_REBINDABLE_REFERENCE_HPP #define CPPA_UTIL_REBINDABLE_REFERENCE_HPP
#include "cppa/config.hpp" #include "cppa/config.hpp"
...@@ -135,4 +135,4 @@ unwrap_ref(const util::rebindable_reference<T>& ref) { ...@@ -135,4 +135,4 @@ unwrap_ref(const util::rebindable_reference<T>& ref) {
} // namespace cppa } // namespace cppa
#endif // CPPA_REBINDABLE_REFERENCE_HPP #endif // CPPA_UTIL_REBINDABLE_REFERENCE_HPP
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
* *
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_RIPEMD_160_HPP #ifndef CPPA_UTIL_RIPEMD_160_HPP
#define CPPA_RIPEMD_160_HPP #define CPPA_UTIL_RIPEMD_160_HPP
#include <array> #include <array>
#include <string> #include <string>
...@@ -83,4 +83,4 @@ void ripemd_160(std::array<std::uint8_t, 20>& storage, const std::string& data); ...@@ -83,4 +83,4 @@ void ripemd_160(std::array<std::uint8_t, 20>& storage, const std::string& data);
} // namespace cppa } // namespace cppa
#endif // CPPA_RIPEMD_160_HPP #endif // CPPA_UTIL_RIPEMD_160_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SCOPE_GUARD_HPP #ifndef CPPA_UTIL_SCOPE_GUARD_HPP
#define CPPA_SCOPE_GUARD_HPP #define CPPA_UTIL_SCOPE_GUARD_HPP
#include <utility> #include <utility>
...@@ -88,4 +88,4 @@ scope_guard<Fun> make_scope_guard(Fun f) { ...@@ -88,4 +88,4 @@ scope_guard<Fun> make_scope_guard(Fun f) {
} // namespace cppa } // namespace cppa
#endif // CPPA_SCOPE_GUARD_HPP #endif // CPPA_UTIL_SCOPE_GUARD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SHARED_LOCK_GUARD_HPP #ifndef CPPA_UTIL_SHARED_LOCK_GUARD_HPP
#define CPPA_SHARED_LOCK_GUARD_HPP #define CPPA_UTIL_SHARED_LOCK_GUARD_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -67,4 +67,4 @@ class shared_lock_guard { ...@@ -67,4 +67,4 @@ class shared_lock_guard {
} // namespace cppa } // namespace cppa
#endif // CPPA_SHARED_LOCK_GUARD_HPP #endif // CPPA_UTIL_SHARED_LOCK_GUARD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_SHARED_SPINLOCK_HPP #ifndef CPPA_UTIL_SHARED_SPINLOCK_HPP
#define CPPA_SHARED_SPINLOCK_HPP #define CPPA_UTIL_SHARED_SPINLOCK_HPP
#include <atomic> #include <atomic>
#include <cstddef> #include <cstddef>
...@@ -68,4 +68,4 @@ class shared_spinlock { ...@@ -68,4 +68,4 @@ class shared_spinlock {
} // namespace cppa } // namespace cppa
#endif // CPPA_SHARED_SPINLOCK_HPP #endif // CPPA_UTIL_SHARED_SPINLOCK_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TBIND_HPP #ifndef CPPA_UTIL_TBIND_HPP
#define CPPA_TBIND_HPP #define CPPA_UTIL_TBIND_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -50,4 +50,4 @@ struct tbind { ...@@ -50,4 +50,4 @@ struct tbind {
} // namespace cppa } // namespace cppa
#endif // CPPA_TBIND_HPP #endif // CPPA_UTIL_TBIND_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_TYPE_PAIR_HPP #ifndef CPPA_UTIL_TYPE_PAIR_HPP
#define CPPA_TYPE_PAIR_HPP #define CPPA_UTIL_TYPE_PAIR_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -63,4 +63,4 @@ struct is_type_pair<type_pair<First, Second> > { ...@@ -63,4 +63,4 @@ struct is_type_pair<type_pair<First, Second> > {
} // namespace cppa } // namespace cppa
#endif // CPPA_TYPE_PAIR_HPP #endif // CPPA_UTIL_TYPE_PAIR_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_UPGRADE_LOCK_GUARD_HPP #ifndef CPPA_UTIL_UPGRADE_LOCK_GUARD_HPP
#define CPPA_UPGRADE_LOCK_GUARD_HPP #define CPPA_UTIL_UPGRADE_LOCK_GUARD_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -64,4 +64,4 @@ class upgrade_lock_guard { ...@@ -64,4 +64,4 @@ class upgrade_lock_guard {
} // namespace cppa } // namespace cppa
#endif // CPPA_UPGRADE_LOCK_GUARD_HPP #endif // CPPA_UTIL_UPGRADE_LOCK_GUARD_HPP
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
\******************************************************************************/ \******************************************************************************/
#ifndef CPPA_WRAPPED_HPP #ifndef CPPA_UTIL_WRAPPED_HPP
#define CPPA_WRAPPED_HPP #define CPPA_UTIL_WRAPPED_HPP
namespace cppa { namespace cppa {
namespace util { namespace util {
...@@ -52,4 +52,4 @@ struct wrapped< wrapped<T> > { ...@@ -52,4 +52,4 @@ struct wrapped< wrapped<T> > {
} // namespace cppa } // namespace cppa
#endif // CPPA_WRAPPED_HPP #endif // CPPA_UTIL_WRAPPED_HPP
...@@ -402,4 +402,3 @@ void peer::dispose() { ...@@ -402,4 +402,3 @@ void peer::dispose() {
} // namespace io } // namespace io
} // namespace cppa } // 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