Commit 3c64cc08 authored by Dominik Charousset's avatar Dominik Charousset

Enforce coding conventions for namespaces

parent f84fe1f5
...@@ -278,7 +278,6 @@ src/exception.cpp ...@@ -278,7 +278,6 @@ src/exception.cpp
src/execinfo_windows.cpp src/execinfo_windows.cpp
src/execution_unit.cpp src/execution_unit.cpp
src/exit_reason.cpp src/exit_reason.cpp
src/factory.cpp
src/fd_util.cpp src/fd_util.cpp
src/functor_based_actor.cpp src/functor_based_actor.cpp
src/functor_based_blocking_actor.cpp src/functor_based_blocking_actor.cpp
......
...@@ -39,12 +39,15 @@ ...@@ -39,12 +39,15 @@
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
#include "cppa/abstract_channel.hpp" #include "cppa/abstract_channel.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class group_manager; class group_manager;
class peer_connection; class peer_connection;
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -135,6 +135,7 @@ using ::backtrace; ...@@ -135,6 +135,7 @@ using ::backtrace;
using ::backtrace_symbols_fd; using ::backtrace_symbols_fd;
} // namespace detail } // namespace detail
} // namespace cppa } // namespace cppa
#endif #endif
// //
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
#include "cppa/detail/tuple_iterator.hpp" #include "cppa/detail/tuple_iterator.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class abstract_tuple : public ref_counted { class abstract_tuple : public ref_counted {
...@@ -125,6 +126,7 @@ constexpr types_only_eq_type types_only_eq; ...@@ -125,6 +126,7 @@ constexpr types_only_eq_type types_only_eq;
std::string get_tuple_type_names(const detail::abstract_tuple&); std::string get_tuple_type_names(const detail::abstract_tuple&);
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_ABSTRACT_TUPLE_HPP #endif // CPPA_ABSTRACT_TUPLE_HPP
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#include "cppa/detail/singleton_mixin.hpp" #include "cppa/detail/singleton_mixin.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class singleton_manager; class singleton_manager;
...@@ -108,6 +109,7 @@ class actor_registry : public singleton_mixin<actor_registry> { ...@@ -108,6 +109,7 @@ class actor_registry : public singleton_mixin<actor_registry> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_ACTOR_REGISTRY_HPP #endif // CPPA_ACTOR_REGISTRY_HPP
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#ifndef CPPA_ATOM_VAL_HPP #ifndef CPPA_ATOM_VAL_HPP
#define CPPA_ATOM_VAL_HPP #define CPPA_ATOM_VAL_HPP
namespace cppa { namespace detail { namespace cppa {
namespace detail {
namespace { namespace {
...@@ -66,6 +67,7 @@ constexpr std::uint64_t atom_val(const char* cstr, std::uint64_t interim = 0) { ...@@ -66,6 +67,7 @@ constexpr std::uint64_t atom_val(const char* cstr, std::uint64_t interim = 0) {
static_cast<size_t>(*cstr))); static_cast<size_t>(*cstr)));
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_ATOM_VAL_HPP #endif // CPPA_ATOM_VAL_HPP
...@@ -49,7 +49,8 @@ typedef optional<any_tuple> bhvr_invoke_result; ...@@ -49,7 +49,8 @@ typedef optional<any_tuple> bhvr_invoke_result;
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<class T> struct is_message_id_wrapper { template<class T> struct is_message_id_wrapper {
template<class U> static char (&test(typename U::message_id_wrapper_tag))[1]; template<class U> static char (&test(typename U::message_id_wrapper_tag))[1];
...@@ -227,6 +228,7 @@ behavior_impl_ptr combine(behavior_impl_ptr, const partial_function&); ...@@ -227,6 +228,7 @@ behavior_impl_ptr combine(behavior_impl_ptr, const partial_function&);
behavior_impl_ptr combine(const partial_function&, behavior_impl_ptr); behavior_impl_ptr combine(const partial_function&, behavior_impl_ptr);
behavior_impl_ptr extract(const partial_function&); behavior_impl_ptr extract(const partial_function&);
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // BEHAVIOR_IMPL_HPP #endif // BEHAVIOR_IMPL_HPP
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include "cppa/message_id.hpp" #include "cppa/message_id.hpp"
#include "cppa/mailbox_element.hpp" #include "cppa/mailbox_element.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
struct behavior_stack_mover; struct behavior_stack_mover;
...@@ -124,6 +125,7 @@ class behavior_stack ...@@ -124,6 +125,7 @@ class behavior_stack
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // BEHAVIOR_STACK_HPP #endif // BEHAVIOR_STACK_HPP
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "cppa/anything.hpp" #include "cppa/anything.hpp"
#include "cppa/util/wrapped.hpp" #include "cppa/util/wrapped.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct boxed { struct boxed {
...@@ -76,6 +77,7 @@ struct is_boxed<util::wrapped<T>(*)()> { ...@@ -76,6 +77,7 @@ struct is_boxed<util::wrapped<T>(*)()> {
static constexpr bool value = true; static constexpr bool value = true;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_BOXED_HPP #endif // CPPA_BOXED_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
#include "cppa/detail/disablable_delete.hpp" #include "cppa/detail/disablable_delete.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<class Container> template<class Container>
class container_tuple_view : public abstract_tuple { class container_tuple_view : public abstract_tuple {
...@@ -95,6 +96,7 @@ class container_tuple_view : public abstract_tuple { ...@@ -95,6 +96,7 @@ class container_tuple_view : public abstract_tuple {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_CONTAINER_TUPLE_VIEW_HPP #endif // CPPA_CONTAINER_TUPLE_VIEW_HPP
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#ifndef CPPA_FIBER_HPP #ifndef CPPA_FIBER_HPP
#define CPPA_FIBER_HPP #define CPPA_FIBER_HPP
namespace cppa { namespace detail { namespace cppa {
namespace detail {
struct cst_impl; struct cst_impl;
...@@ -57,6 +58,7 @@ struct cs_thread { ...@@ -57,6 +58,7 @@ struct cs_thread {
}; };
} } // namespace cppa::util } // namespace detail
} // namespace cppa
#endif // CPPA_FIBER_HPP #endif // CPPA_FIBER_HPP
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
#include "cppa/detail/serialize_tuple.hpp" #include "cppa/detail/serialize_tuple.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class decorated_tuple : public abstract_tuple { class decorated_tuple : public abstract_tuple {
...@@ -117,6 +118,7 @@ class decorated_tuple : public abstract_tuple { ...@@ -117,6 +118,7 @@ class decorated_tuple : public abstract_tuple {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_DECORATED_TUPLE_HPP #endif // CPPA_DECORATED_TUPLE_HPP
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
#include "cppa/detail/types_array.hpp" #include "cppa/detail/types_array.hpp"
#include "cppa/detail/type_to_ptype.hpp" #include "cppa/detail/type_to_ptype.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
typedef std::unique_ptr<uniform_type_info> unique_uti; typedef std::unique_ptr<uniform_type_info> unique_uti;
...@@ -585,6 +586,7 @@ class default_uniform_type_info<typed_actor<Rs...>> ...@@ -585,6 +586,7 @@ class default_uniform_type_info<typed_actor<Rs...>>
}; };
} } // namespace detail } // namespace detail
} // namespace cppa
#endif // CPPA_DEFAULT_UNIFORM_TYPE_INFO_IMPL_HPP #endif // CPPA_DEFAULT_UNIFORM_TYPE_INFO_IMPL_HPP
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
std::string demangle(const char* typeid_name); std::string demangle(const char* typeid_name);
std::string demangle(const std::type_info& tinf); std::string demangle(const std::type_info& tinf);
...@@ -44,6 +45,7 @@ inline std::string demangle() { ...@@ -44,6 +45,7 @@ inline std::string demangle() {
return demangle(typeid(T)); return demangle(typeid(T));
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_DEMANGLE_HPP #endif // CPPA_DEMANGLE_HPP
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#ifndef CPPA_DISABLABLE_DELETE_HPP #ifndef CPPA_DISABLABLE_DELETE_HPP
#define CPPA_DISABLABLE_DELETE_HPP #define CPPA_DISABLABLE_DELETE_HPP
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class disablable_delete { class disablable_delete {
...@@ -58,6 +59,7 @@ class disablable_delete { ...@@ -58,6 +59,7 @@ class disablable_delete {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_DISABLABLE_DELETE_HPP #endif // CPPA_DISABLABLE_DELETE_HPP
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
#include "cppa/config.hpp" #include "cppa/config.hpp"
namespace cppa { namespace detail { namespace fd_util { namespace cppa {
namespace detail {
namespace fd_util {
std::string last_socket_error_as_string(); std::string last_socket_error_as_string();
...@@ -61,6 +63,8 @@ void handle_read_result(ssize_t result, bool is_nonblocking_io); ...@@ -61,6 +63,8 @@ void handle_read_result(ssize_t result, bool is_nonblocking_io);
std::pair<native_socket_type, native_socket_type> create_pipe(); std::pair<native_socket_type, native_socket_type> create_pipe();
} } } // namespace cppa::detail::fd_util } // namespace fd_util
} // namespace detail
} // namespace cppa
#endif // FD_UTIL_HPP #endif // FD_UTIL_HPP
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "cppa/event_based_actor.hpp" #include "cppa/event_based_actor.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class functor_based_actor : public event_based_actor { class functor_based_actor : public event_based_actor {
...@@ -120,6 +121,7 @@ class functor_based_actor : public event_based_actor { ...@@ -120,6 +121,7 @@ class functor_based_actor : public event_based_actor {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_FUNCTOR_BASED_ACTOR_HPP #endif // CPPA_FUNCTOR_BASED_ACTOR_HPP
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include "cppa/detail/singleton_mixin.hpp" #include "cppa/detail/singleton_mixin.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class group_manager : public singleton_mixin<group_manager> { class group_manager : public singleton_mixin<group_manager> {
...@@ -70,6 +71,7 @@ class group_manager : public singleton_mixin<group_manager> { ...@@ -70,6 +71,7 @@ class group_manager : public singleton_mixin<group_manager> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_GROUP_MANAGER_HPP #endif // CPPA_GROUP_MANAGER_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include "cppa/util/comparable.hpp" #include "cppa/util/comparable.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename Subtype> template<typename Subtype>
class handle : util::comparable<Subtype> { class handle : util::comparable<Subtype> {
...@@ -80,6 +81,7 @@ class handle : util::comparable<Subtype> { ...@@ -80,6 +81,7 @@ class handle : util::comparable<Subtype> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_DETAIL_HANDLE_HPP #endif // CPPA_DETAIL_HANDLE_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include <cmath> #include <cmath>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct ieee_754_trait; struct ieee_754_trait;
...@@ -139,6 +140,7 @@ typename ieee_754_trait<T>::float_type unpack754(T i) { ...@@ -139,6 +140,7 @@ typename ieee_754_trait<T>::float_type unpack754(T i) {
return result; return result;
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // IEEE_754_HPP #endif // IEEE_754_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
namespace cppa { class local_actor; } namespace cppa { class local_actor; }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct implicit_conversions { struct implicit_conversions {
...@@ -87,6 +88,7 @@ struct strip_and_convert { ...@@ -87,6 +88,7 @@ struct strip_and_convert {
type; type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_IMPLICIT_CONVERSIONS_HPP #endif // CPPA_IMPLICIT_CONVERSIONS_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "cppa/util/type_list.hpp" #include "cppa/util/type_list.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<wildcard_position, class Tuple, typename...> template<wildcard_position, class Tuple, typename...>
struct matcher; struct matcher;
...@@ -346,6 +347,7 @@ inline bool matches_types(const any_tuple& tup, const util::type_list<Ts...>&) { ...@@ -346,6 +347,7 @@ inline bool matches_types(const any_tuple& tup, const util::type_list<Ts...>&) {
return matches<Ts...>(tup); return matches<Ts...>(tup);
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_MATCHES_HPP #endif // CPPA_MATCHES_HPP
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
namespace cppa { class mailbox_element; } namespace cppa { class mailbox_element; }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
namespace { namespace {
...@@ -240,6 +241,7 @@ class memory { ...@@ -240,6 +241,7 @@ class memory {
#endif // CPPA_DISABLE_MEM_MANAGEMENT #endif // CPPA_DISABLE_MEM_MANAGEMENT
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_MEMORY_HPP #endif // CPPA_MEMORY_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "cppa/object.hpp" #include "cppa/object.hpp"
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class object_array : public abstract_tuple { class object_array : public abstract_tuple {
...@@ -72,6 +73,7 @@ class object_array : public abstract_tuple { ...@@ -72,6 +73,7 @@ class object_array : public abstract_tuple {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_OBJECT_ARRAY_HPP #endif // CPPA_OBJECT_ARRAY_HPP
...@@ -40,7 +40,8 @@ const utype& uniform_type_info(); ...@@ -40,7 +40,8 @@ const utype& uniform_type_info();
} }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct obj_impl : object { struct obj_impl : object {
...@@ -59,6 +60,7 @@ struct obj_impl : object { ...@@ -59,6 +60,7 @@ struct obj_impl : object {
} }
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_OBJECT_IMPL_HPP #endif // CPPA_OBJECT_IMPL_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
// this header contains implementation details for opt.hpp // this header contains implementation details for opt.hpp
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct conv_arg_impl { struct conv_arg_impl {
...@@ -232,6 +233,7 @@ class opt1_rvalue_builder<false> { ...@@ -232,6 +233,7 @@ class opt1_rvalue_builder<false> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_OPT_IMPLS_HPP #endif // CPPA_OPT_IMPLS_HPP
...@@ -49,7 +49,8 @@ ...@@ -49,7 +49,8 @@
return CPPA_OPTIONAL_VARIANT_DATA_CONCAT(v, pos) ; \ return CPPA_OPTIONAL_VARIANT_DATA_CONCAT(v, pos) ; \
} }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct lift_void { typedef T type; }; struct lift_void { typedef T type; };
...@@ -106,6 +107,7 @@ struct optional_variant_data_destructor { ...@@ -106,6 +107,7 @@ struct optional_variant_data_destructor {
inline void operator()(T& storage) const { storage.~T(); } inline void operator()(T& storage) const { storage.~T(); }
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // TRIVARIANT_DATA_HPP #endif // TRIVARIANT_DATA_HPP
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#include "cppa/detail/types_array.hpp" #include "cppa/detail/types_array.hpp"
#include "cppa/detail/type_to_ptype.hpp" #include "cppa/detail/type_to_ptype.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T1, typename T2, bool PrimitiveTypes> // default: true template<typename T1, typename T2, bool PrimitiveTypes> // default: true
struct pair_member_impl { struct pair_member_impl {
...@@ -116,6 +117,7 @@ class pair_member : public util::abstract_uniform_type_info<std::pair<T1, T2>> { ...@@ -116,6 +117,7 @@ class pair_member : public util::abstract_uniform_type_info<std::pair<T1, T2>> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_PAIR_MEMBER_HPP #endif // CPPA_PAIR_MEMBER_HPP
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include "cppa/detail/tdata.hpp" #include "cppa/detail/tdata.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename Fun, typename Tuple, long... Is> template<typename Fun, typename Tuple, long... Is>
inline bool is_defined_at(Fun& f, Tuple& tup, util::int_list<Is...>) { inline bool is_defined_at(Fun& f, Tuple& tup, util::int_list<Is...>) {
...@@ -179,6 +180,7 @@ struct projection_from_type_list<ProjectionFuns, util::type_list<Ts...> > { ...@@ -179,6 +180,7 @@ struct projection_from_type_list<ProjectionFuns, util::type_list<Ts...> > {
typedef projection<ProjectionFuns, Ts...> type; typedef projection<ProjectionFuns, Ts...> type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_PROJECTION_HPP #endif // CPPA_PROJECTION_HPP
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
// tuple-like access to an array of void pointers // tuple-like access to an array of void pointers
template<typename... T> template<typename... T>
...@@ -66,7 +67,8 @@ struct pseudo_tuple_from_type_list<util::type_list<Ts...> > { ...@@ -66,7 +67,8 @@ struct pseudo_tuple_from_type_list<util::type_list<Ts...> > {
typedef pseudo_tuple<Ts...> type; typedef pseudo_tuple<Ts...> type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/util/wrapped.hpp" #include "cppa/util/wrapped.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
// maps the primitive_type PT to the corresponding type // maps the primitive_type PT to the corresponding type
template<primitive_type PT> template<primitive_type PT>
...@@ -66,6 +67,7 @@ template<> struct ptype_to_type<pt_u8string > : util::wrapped<std::string > { ...@@ -66,6 +67,7 @@ template<> struct ptype_to_type<pt_u8string > : util::wrapped<std::string > {
template<> struct ptype_to_type<pt_u16string> : util::wrapped<std::u16string> { }; template<> struct ptype_to_type<pt_u16string> : util::wrapped<std::u16string> { };
template<> struct ptype_to_type<pt_u32string> : util::wrapped<std::u32string> { }; template<> struct ptype_to_type<pt_u32string> : util::wrapped<std::u32string> { };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_PTYPE_TO_TYPE_HPP #endif // CPPA_PTYPE_TO_TYPE_HPP
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include "cppa/abstract_group.hpp" #include "cppa/abstract_group.hpp"
#include "cppa/abstract_channel.hpp" #include "cppa/abstract_channel.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class raw_access { class raw_access {
...@@ -82,6 +83,7 @@ class raw_access { ...@@ -82,6 +83,7 @@ class raw_access {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_RAW_ACCESS_HPP #endif // CPPA_RAW_ACCESS_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
namespace cppa { class serializer; } namespace cppa { class serializer; }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename List, size_t Pos = 0> template<typename List, size_t Pos = 0>
struct serialize_tuple { struct serialize_tuple {
...@@ -56,6 +57,7 @@ struct serialize_tuple<util::empty_type_list, Pos> { ...@@ -56,6 +57,7 @@ struct serialize_tuple<util::empty_type_list, Pos> {
inline static void _(serializer&, const T*) { } inline static void _(serializer&, const T*) { }
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_SERIALIZE_TUPLE_HPP #endif // CPPA_SERIALIZE_TUPLE_HPP
...@@ -39,9 +39,11 @@ namespace cppa { namespace scheduler { class coordinator; } } ...@@ -39,9 +39,11 @@ namespace cppa { namespace scheduler { class coordinator; } }
namespace cppa { namespace io { class middleman; } } namespace cppa { namespace io { class middleman; } }
namespace cppa { namespace opencl { class opencl_metainfo; } } namespace cppa {
namespace opencl { class opencl_metainfo; } }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class group_manager; class group_manager;
class abstract_tuple; class abstract_tuple;
...@@ -122,6 +124,7 @@ class singleton_manager { ...@@ -122,6 +124,7 @@ class singleton_manager {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_SINGLETON_MANAGER_HPP #endif // CPPA_SINGLETON_MANAGER_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include <utility> #include <utility>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class singleton_manager; class singleton_manager;
...@@ -73,6 +74,7 @@ class singleton_mixin<Derived, void> { ...@@ -73,6 +74,7 @@ class singleton_mixin<Derived, void> {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_SINGLETON_MIXIN_HPP #endif // CPPA_SINGLETON_MIXIN_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include <cstddef> #include <cstddef>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct byte_access { struct byte_access {
...@@ -66,6 +67,7 @@ inline T swap_bytes(T what) { ...@@ -66,6 +67,7 @@ inline T swap_bytes(T what) {
return byte_swapper<sizeof(T), T>::_(what); return byte_swapper<sizeof(T), T>::_(what);
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_SWAP_BYTES_HPP #endif // CPPA_SWAP_BYTES_HPP
...@@ -42,7 +42,8 @@ class mailbox_element; ...@@ -42,7 +42,8 @@ class mailbox_element;
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
struct sync_request_bouncer { struct sync_request_bouncer {
std::uint32_t rsn; std::uint32_t rsn;
...@@ -51,6 +52,7 @@ struct sync_request_bouncer { ...@@ -51,6 +52,7 @@ struct sync_request_bouncer {
void operator()(const mailbox_element& e) const; void operator()(const mailbox_element& e) const;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_SYNC_REQUEST_BOUNCER_HPP #endif // CPPA_SYNC_REQUEST_BOUNCER_HPP
...@@ -56,7 +56,8 @@ class uniform_type_info; ...@@ -56,7 +56,8 @@ class uniform_type_info;
const uniform_type_info* uniform_typeid(const std::type_info&); const uniform_type_info* uniform_typeid(const std::type_info&);
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
inline void* ptr_to(T& what) { return &what; } inline void* ptr_to(T& what) { return &what; }
...@@ -440,7 +441,8 @@ void rebind_tdata(tdata<Ts...>& td, const tdata<Us...>& arg, const Vs&... args) ...@@ -440,7 +441,8 @@ void rebind_tdata(tdata<Ts...>& td, const tdata<Us...>& arg, const Vs&... args)
rebind_tdata(td.tail(), arg.tail(), args...); rebind_tdata(td.tail(), arg.tail(), args...);
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include <string> #include <string>
#include <typeinfo> #include <typeinfo>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
std::string to_uniform_name(const std::string& demangled_name); std::string to_uniform_name(const std::string& demangled_name);
std::string to_uniform_name(const std::type_info& tinfo); std::string to_uniform_name(const std::type_info& tinfo);
...@@ -42,6 +43,7 @@ std::string to_uniform_name(const std::type_info& tinfo); ...@@ -42,6 +43,7 @@ std::string to_uniform_name(const std::type_info& tinfo);
template<class T> template<class T>
inline std::string to_uniform_name() { return to_uniform_name(typeid(T)); } inline std::string to_uniform_name() { return to_uniform_name(typeid(T)); }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TO_UNIFORM_NAME_HPP #endif // CPPA_TO_UNIFORM_NAME_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "cppa/detail/types_array.hpp" #include "cppa/detail/types_array.hpp"
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
enum class tuple_cast_impl_id { enum class tuple_cast_impl_id {
no_wildcard, no_wildcard,
...@@ -86,6 +87,7 @@ struct tuple_cast_impl<wildcard_position::leading, Result, T...> { ...@@ -86,6 +87,7 @@ struct tuple_cast_impl<wildcard_position::leading, Result, T...> {
} }
}; };
} } } // namespace detail
} // namespace cppa
#endif // CPPA_TUPLE_CAST_IMPL_HPP #endif // CPPA_TUPLE_CAST_IMPL_HPP
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "cppa/config.hpp" #include "cppa/config.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<class Tuple> template<class Tuple>
class tuple_iterator { class tuple_iterator {
...@@ -107,6 +108,7 @@ class tuple_iterator { ...@@ -107,6 +108,7 @@ class tuple_iterator {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TUPLE_ITERATOR_HPP #endif // CPPA_TUPLE_ITERATOR_HPP
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
#include "cppa/detail/serialize_tuple.hpp" #include "cppa/detail/serialize_tuple.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename... Ts> template<typename... Ts>
class tuple_vals : public abstract_tuple { class tuple_vals : public abstract_tuple {
...@@ -138,6 +139,7 @@ struct tuple_vals_from_type_list< util::type_list<Ts...> > { ...@@ -138,6 +139,7 @@ struct tuple_vals_from_type_list< util::type_list<Ts...> > {
typedef tuple_vals<Ts...> type; typedef tuple_vals<Ts...> type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TUPLE_VALS_HPP #endif // CPPA_TUPLE_VALS_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "cppa/detail/tuple_vals.hpp" #include "cppa/detail/tuple_vals.hpp"
#include "cppa/detail/abstract_tuple.hpp" #include "cppa/detail/abstract_tuple.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
struct tuple_view_copy_helper { struct tuple_view_copy_helper {
size_t pos; size_t pos;
...@@ -120,6 +121,7 @@ class tuple_view : public abstract_tuple { ...@@ -120,6 +121,7 @@ class tuple_view : public abstract_tuple {
template<typename... Ts> template<typename... Ts>
types_array<Ts...> tuple_view<Ts...>::m_types; types_array<Ts...> tuple_view<Ts...>::m_types;
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TUPLE_VIEW_HPP #endif // CPPA_TUPLE_VIEW_HPP
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<primitive_type PT> template<primitive_type PT>
struct wrapped_ptype { static const primitive_type ptype = PT; }; struct wrapped_ptype { static const primitive_type ptype = PT; };
...@@ -93,6 +94,7 @@ template<> struct type_to_ptype_impl<atom_value> : wrapped_ptype<pt_atom ...@@ -93,6 +94,7 @@ template<> struct type_to_ptype_impl<atom_value> : wrapped_ptype<pt_atom
template<typename T> template<typename T>
struct type_to_ptype : type_to_ptype_impl<typename util::rm_const_and_ref<T>::type> { }; struct type_to_ptype : type_to_ptype_impl<typename util::rm_const_and_ref<T>::type> { };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TYPE_TO_PTYPE_HPP #endif // CPPA_TYPE_TO_PTYPE_HPP
...@@ -43,7 +43,8 @@ class typed_continue_helper; ...@@ -43,7 +43,8 @@ class typed_continue_helper;
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename R, typename T> template<typename R, typename T>
struct deduce_signature_helper; struct deduce_signature_helper;
...@@ -140,6 +141,7 @@ struct deduce_output_type { ...@@ -140,6 +141,7 @@ struct deduce_output_type {
type; type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TYPED_ACTOR_UTIL_HPP #endif // CPPA_TYPED_ACTOR_UTIL_HPP
...@@ -43,7 +43,8 @@ class uniform_type_info; ...@@ -43,7 +43,8 @@ class uniform_type_info;
const uniform_type_info* uniform_typeid(const std::type_info&); const uniform_type_info* uniform_typeid(const std::type_info&);
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
enum type_info_impl { std_tinf, cppa_tinf }; enum type_info_impl { std_tinf, cppa_tinf };
...@@ -210,6 +211,7 @@ struct static_type_list<T0, T1, Ts...> { ...@@ -210,6 +211,7 @@ struct static_type_list<T0, T1, Ts...> {
template<typename T0, typename T1, typename... Ts> template<typename T0, typename T1, typename... Ts>
const std::type_info* static_type_list<T0, T1, Ts...>::list = &typeid(util::type_list<T0, T1, Ts...>); const std::type_info* static_type_list<T0, T1, Ts...>::list = &typeid(util::type_list<T0, T1, Ts...>);
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_TYPES_ARRAY_HPP #endif // CPPA_TYPES_ARRAY_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "cppa/util/guard.hpp" #include "cppa/util/guard.hpp"
#include "cppa/util/wrapped.hpp" #include "cppa/util/wrapped.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<typename T> template<typename T>
struct unboxed { struct unboxed {
...@@ -68,6 +69,7 @@ struct unboxed<std::unique_ptr<util::guard<T>>> { ...@@ -68,6 +69,7 @@ struct unboxed<std::unique_ptr<util::guard<T>>> {
typedef T type; typedef T type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_UNBOXED_HPP #endif // CPPA_UNBOXED_HPP
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
namespace cppa { class uniform_type_info; } namespace cppa { class uniform_type_info; }
namespace cppa { namespace detail { namespace cppa {
namespace detail {
// ordered according to demangled type name (see uniform_type_info_map.cpp) // ordered according to demangled type name (see uniform_type_info_map.cpp)
using mapped_type_list = util::type_list< using mapped_type_list = util::type_list<
...@@ -153,6 +154,7 @@ class uniform_type_info_map { ...@@ -153,6 +154,7 @@ class uniform_type_info_map {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_UNIFORM_TYPE_INFO_MAP_HPP #endif // CPPA_UNIFORM_TYPE_INFO_MAP_HPP
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
#include "cppa/detail/tdata.hpp" #include "cppa/detail/tdata.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
// 'absorbs' callables and instances of `anything` // 'absorbs' callables and instances of `anything`
template<typename T> template<typename T>
...@@ -125,6 +126,7 @@ class value_guard { ...@@ -125,6 +126,7 @@ class value_guard {
typedef value_guard<util::empty_type_list> empty_value_guard; typedef value_guard<util::empty_type_list> empty_value_guard;
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_VALUE_GUARD_HPP #endif // CPPA_VALUE_GUARD_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include <string> #include <string>
namespace cppa { namespace detail { namespace cppa {
namespace detail {
struct cs_thread; struct cs_thread;
...@@ -54,7 +55,8 @@ void yield(yield_state); ...@@ -54,7 +55,8 @@ void yield(yield_state);
// switches to @p what and returns to @p from after yield(...) // switches to @p what and returns to @p from after yield(...)
yield_state call(detail::cs_thread* what, detail::cs_thread* from); yield_state call(detail::cs_thread* what, detail::cs_thread* from);
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include <cstdint> #include <cstdint>
namespace cppa { namespace exit_reason { namespace cppa {
namespace exit_reason {
/** /**
* @brief Indicates that the actor is still alive. * @brief Indicates that the actor is still alive.
...@@ -91,6 +92,7 @@ static constexpr std::uint32_t user_defined = 0x10000; ...@@ -91,6 +92,7 @@ static constexpr std::uint32_t user_defined = 0x10000;
const char* as_string(std::uint32_t value); const char* as_string(std::uint32_t value);
} } // namespace cppa::exit_reason } // namespace exit_reason
} // namespace cppa
#endif // CPPA_EXIT_REASON_HPP #endif // CPPA_EXIT_REASON_HPP
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include "cppa/config.hpp" #include "cppa/config.hpp"
namespace cppa { namespace intrusive { namespace cppa {
namespace intrusive {
/** /**
* @brief Denotes in which state queue and reader are after an enqueue. * @brief Denotes in which state queue and reader are after an enqueue.
...@@ -377,6 +378,7 @@ class single_reader_queue { ...@@ -377,6 +378,7 @@ class single_reader_queue {
}; };
} } // namespace cppa::util } // namespace intrusive
} // namespace cppa
#endif // CPPA_SINGLE_READER_QUEUE_HPP #endif // CPPA_SINGLE_READER_QUEUE_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include "cppa/detail/handle.hpp" #include "cppa/detail/handle.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
class broker; class broker;
...@@ -53,6 +54,7 @@ class accept_handle : public detail::handle<accept_handle> { ...@@ -53,6 +54,7 @@ class accept_handle : public detail::handle<accept_handle> {
}; };
} } // namespace cppa::io } // namespace io
} // namespace cppa
#endif // CPPA_IO_ACCEPT_HANDLE_HPP #endif // CPPA_IO_ACCEPT_HANDLE_HPP
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include "cppa/io/input_stream.hpp" #include "cppa/io/input_stream.hpp"
#include "cppa/io/output_stream.hpp" #include "cppa/io/output_stream.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief A pair of input and output stream pointers. * @brief A pair of input and output stream pointers.
...@@ -77,7 +78,7 @@ class acceptor { ...@@ -77,7 +78,7 @@ class acceptor {
typedef std::unique_ptr<acceptor> acceptor_uptr; typedef std::unique_ptr<acceptor> acceptor_uptr;
} // namespace io
} } // namespace cppa::util } // namespace cppa
#endif // CPPA_ACCEPTOR_HPP #endif // CPPA_ACCEPTOR_HPP
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include "cppa/io/continuable.hpp" #include "cppa/io/continuable.hpp"
#include "cppa/io/output_stream.hpp" #include "cppa/io/output_stream.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
template<class Base, class Subtype> template<class Base, class Subtype>
class buffered_writing : public Base { class buffered_writing : public Base {
...@@ -130,6 +131,7 @@ class buffered_writing : public Base { ...@@ -130,6 +131,7 @@ class buffered_writing : public Base {
}; };
} } // namespace cppa::io } // namespace io
} // namespace cppa
#endif // CPPA_IO_BUFFERED_WRITING_HPP #endif // CPPA_IO_BUFFERED_WRITING_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include "cppa/detail/handle.hpp" #include "cppa/detail/handle.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
class broker; class broker;
...@@ -53,6 +54,8 @@ class connection_handle : public detail::handle<connection_handle> { ...@@ -53,6 +54,8 @@ class connection_handle : public detail::handle<connection_handle> {
}; };
} } // namespace cppa::network } // namespace io
} // namespace cppa
#endif // IO_SERVICE_HPP #endif // IO_SERVICE_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/io/event.hpp" #include "cppa/io/event.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief Denotes the return value of * @brief Denotes the return value of
...@@ -137,6 +138,8 @@ inline native_socket_type continuable::write_handle() const { ...@@ -137,6 +138,8 @@ inline native_socket_type continuable::write_handle() const {
return m_wr; return m_wr;
} }
} } // namespace cppa::network } // namespace io
} // namespace cppa
#endif // CONTINUABLE_WRITER_HPP #endif // CONTINUABLE_WRITER_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
#include "cppa/message_header.hpp" #include "cppa/message_header.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
class default_message_queue : public ref_counted { class default_message_queue : public ref_counted {
...@@ -70,7 +71,9 @@ class default_message_queue : public ref_counted { ...@@ -70,7 +71,9 @@ class default_message_queue : public ref_counted {
typedef intrusive_ptr<default_message_queue> default_message_queue_ptr; typedef intrusive_ptr<default_message_queue> default_message_queue_ptr;
} } // namespace cppa::network } // namespace io
} // namespace cppa
......
...@@ -31,11 +31,13 @@ ...@@ -31,11 +31,13 @@
#ifndef EVENT_HPP #ifndef EVENT_HPP
#define EVENT_HPP #define EVENT_HPP
namespace cppa { namespace io { namespace cppa {
namespace io {
typedef int event_bitmask; typedef int event_bitmask;
namespace event { namespace { namespace event {
namespace {
constexpr event_bitmask none = 0x00; constexpr event_bitmask none = 0x00;
constexpr event_bitmask read = 0x01; constexpr event_bitmask read = 0x01;
...@@ -43,7 +45,8 @@ constexpr event_bitmask write = 0x02; ...@@ -43,7 +45,8 @@ constexpr event_bitmask write = 0x02;
constexpr event_bitmask both = 0x03; constexpr event_bitmask both = 0x03;
constexpr event_bitmask error = 0x04; constexpr event_bitmask error = 0x04;
} } // namespace <anonymous>::event } // namespace <anonymous>
} // namespace event
template<unsigned InputEvent, unsigned OutputEvent, unsigned ErrorEvent> template<unsigned InputEvent, unsigned OutputEvent, unsigned ErrorEvent>
inline event_bitmask from_int_bitmask(unsigned mask) { inline event_bitmask from_int_bitmask(unsigned mask) {
...@@ -55,6 +58,7 @@ inline event_bitmask from_int_bitmask(unsigned mask) { ...@@ -55,6 +58,7 @@ inline event_bitmask from_int_bitmask(unsigned mask) {
return result; return result;
} }
} } // namespace cppa::io } // namespace io
} // namespace cppa
#endif // EVENT_HPP #endif // EVENT_HPP
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
#include "cppa/intrusive_ptr.hpp" #include "cppa/intrusive_ptr.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief An abstract input stream interface. * @brief An abstract input stream interface.
...@@ -73,6 +74,7 @@ class input_stream : public virtual ref_counted { ...@@ -73,6 +74,7 @@ class input_stream : public virtual ref_counted {
*/ */
typedef intrusive_ptr<input_stream> input_stream_ptr; typedef intrusive_ptr<input_stream> input_stream_ptr;
} } // namespace cppa::util } // namespace io
} // namespace cppa
#endif // CPPA_INPUT_STREAM_HPP #endif // CPPA_INPUT_STREAM_HPP
...@@ -50,7 +50,8 @@ typedef weak_intrusive_ptr<actor_proxy> weak_actor_proxy_ptr; ...@@ -50,7 +50,8 @@ typedef weak_intrusive_ptr<actor_proxy> weak_actor_proxy_ptr;
} // namespace cppa } // namespace cppa
namespace cppa { namespace io { namespace cppa {
namespace io {
class peer; class peer;
class continuable; class continuable;
...@@ -211,6 +212,7 @@ const node_id_ptr& middleman::node() const { ...@@ -211,6 +212,7 @@ const node_id_ptr& middleman::node() const {
return m_node; return m_node;
} }
} } // namespace cppa::io } // namespace io
} // namespace cppa
#endif // MIDDLEMAN_HPP #endif // MIDDLEMAN_HPP
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include "cppa/io/event.hpp" #include "cppa/io/event.hpp"
#include "cppa/io/continuable.hpp" #include "cppa/io/continuable.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
struct fd_meta_info { struct fd_meta_info {
native_socket_type fd; native_socket_type fd;
...@@ -134,6 +135,8 @@ class middleman_event_handler { ...@@ -134,6 +135,8 @@ class middleman_event_handler {
}; };
} } // namespace cppa::detail } // namespace io
} // namespace cppa
#endif // MIDDLEMAN_EVENT_HANDLER_HPP #endif // MIDDLEMAN_EVENT_HANDLER_HPP
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include "cppa/ref_counted.hpp" #include "cppa/ref_counted.hpp"
#include "cppa/intrusive_ptr.hpp" #include "cppa/intrusive_ptr.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief An abstract output stream interface. * @brief An abstract output stream interface.
...@@ -74,6 +75,7 @@ class output_stream : public virtual ref_counted { ...@@ -74,6 +75,7 @@ class output_stream : public virtual ref_counted {
*/ */
typedef intrusive_ptr<output_stream> output_stream_ptr; typedef intrusive_ptr<output_stream> output_stream_ptr;
} } // namespace cppa::util } // namespace io
} // namespace cppa
#endif // CPPA_OUTPUT_STREAM_HPP #endif // CPPA_OUTPUT_STREAM_HPP
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
#include "cppa/io/buffered_writing.hpp" #include "cppa/io/buffered_writing.hpp"
#include "cppa/io/default_message_queue.hpp" #include "cppa/io/default_message_queue.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
class middleman_impl; class middleman_impl;
...@@ -144,6 +145,8 @@ class peer : public extend<continuable>::with<buffered_writing> { ...@@ -144,6 +145,8 @@ class peer : public extend<continuable>::with<buffered_writing> {
}; };
} } // namespace cppa::network } // namespace io
} // namespace cppa
#endif // CPPA_peer_IMPL_HPP #endif // CPPA_peer_IMPL_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "cppa/io/tcp_acceptor.hpp" #include "cppa/io/tcp_acceptor.hpp"
#include "cppa/io/continuable.hpp" #include "cppa/io/continuable.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
class default_protocol; class default_protocol;
...@@ -70,6 +71,8 @@ class peer_acceptor : public continuable { ...@@ -70,6 +71,8 @@ class peer_acceptor : public continuable {
}; };
} } // namespace cppa::detail } // namespace io
} // namespace cppa
#endif // IPV4_PEER_ACCEPTOR_HPP #endif // IPV4_PEER_ACCEPTOR_HPP
...@@ -36,16 +36,20 @@ ...@@ -36,16 +36,20 @@
#include "cppa/memory_cached.hpp" #include "cppa/memory_cached.hpp"
#include "cppa/intrusive/single_reader_queue.hpp" #include "cppa/intrusive/single_reader_queue.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class memory; class memory;
class instance_wrapper; class instance_wrapper;
template<typename> template<typename>
class basic_memory_cache; class basic_memory_cache;
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace io {
namespace cppa {
namespace io {
class middleman; class middleman;
...@@ -108,6 +112,8 @@ class remote_actor_proxy : public actor_proxy { ...@@ -108,6 +112,8 @@ class remote_actor_proxy : public actor_proxy {
}; };
} } // namespace cppa::network } // namespace io
} // namespace cppa
#endif // remote_actor_proxy_HPP #endif // remote_actor_proxy_HPP
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "cppa/io/input_stream.hpp" #include "cppa/io/input_stream.hpp"
#include "cppa/io/output_stream.hpp" #include "cppa/io/output_stream.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief A stream capable of both reading and writing. * @brief A stream capable of both reading and writing.
...@@ -52,6 +53,7 @@ class stream : public input_stream, public output_stream { ...@@ -52,6 +53,7 @@ class stream : public input_stream, public output_stream {
*/ */
typedef intrusive_ptr<stream> stream_ptr; typedef intrusive_ptr<stream> stream_ptr;
} } // namespace cppa::util } // namespace io
} // namespace cppa
#endif // CPPA_IO_STREAM_HPP #endif // CPPA_IO_STREAM_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/io/acceptor.hpp" #include "cppa/io/acceptor.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief An implementation of the {@link acceptor} interface for TCP sockets. * @brief An implementation of the {@link acceptor} interface for TCP sockets.
...@@ -79,6 +80,8 @@ class tcp_acceptor : public acceptor { ...@@ -79,6 +80,8 @@ class tcp_acceptor : public acceptor {
}; };
} } // namespace cppa::detail } // namespace io
} // namespace cppa
#endif // CPPA_IPV4_ACCEPTOR_HPP #endif // CPPA_IPV4_ACCEPTOR_HPP
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "cppa/config.hpp" #include "cppa/config.hpp"
#include "cppa/io/stream.hpp" #include "cppa/io/stream.hpp"
namespace cppa { namespace io { namespace cppa {
namespace io {
/** /**
* @brief An implementation of the {@link stream} interface for TCP sockets. * @brief An implementation of the {@link stream} interface for TCP sockets.
...@@ -76,6 +77,8 @@ class tcp_io_stream : public stream { ...@@ -76,6 +77,8 @@ class tcp_io_stream : public stream {
}; };
} } // namespace cppa::detail } // namespace io
} // namespace cppa
#endif // CPPA_IPV4_IO_STREAM_HPP #endif // CPPA_IPV4_IO_STREAM_HPP
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#include "cppa/util/tbind.hpp" #include "cppa/util/tbind.hpp"
#include "cppa/util/type_list.hpp" #include "cppa/util/type_list.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
class match_helper { class match_helper {
...@@ -301,7 +302,9 @@ class stream_matcher { ...@@ -301,7 +302,9 @@ class stream_matcher {
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
#include "cppa/detail/pseudo_tuple.hpp" #include "cppa/detail/pseudo_tuple.hpp"
#include "cppa/detail/behavior_impl.hpp" #include "cppa/detail/behavior_impl.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<long N> template<long N>
struct long_constant { static constexpr long value = N; }; struct long_constant { static constexpr long value = N; };
...@@ -621,7 +622,9 @@ struct get_case_result { ...@@ -621,7 +622,9 @@ struct get_case_result {
typedef typename T::second_type::result_type type; typedef typename T::second_type::result_type type;
}; };
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -55,7 +55,8 @@ ...@@ -55,7 +55,8 @@
#include "cppa/detail/value_guard.hpp" #include "cppa/detail/value_guard.hpp"
#include "cppa/detail/implicit_conversions.hpp" #include "cppa/detail/implicit_conversions.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<bool IsFun, typename T> template<bool IsFun, typename T>
struct add_ptr_to_fun_ { typedef T* type; }; struct add_ptr_to_fun_ { typedef T* type; };
...@@ -218,7 +219,8 @@ struct pattern_type : pattern_type_<util::is_callable<T>::value && !detail::is_b ...@@ -218,7 +219,8 @@ struct pattern_type : pattern_type_<util::is_callable<T>::value && !detail::is_b
}; };
} } // cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
#include "cppa/util/scope_guard.hpp" #include "cppa/util/scope_guard.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename T, typename R> template<typename T, typename R>
class command : public ref_counted { class command : public ref_counted {
...@@ -157,6 +158,7 @@ class command : public ref_counted { ...@@ -157,6 +158,7 @@ class command : public ref_counted {
} }
}; };
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_COMMAND_HPP #endif // CPPA_OPENCL_COMMAND_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "cppa/opencl/program.hpp" #include "cppa/opencl/program.hpp"
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
class device_info { class device_info {
...@@ -84,7 +85,8 @@ inline dim_vec device_info::get_max_work_items_per_dim() { ...@@ -84,7 +85,8 @@ inline dim_vec device_info::get_max_work_items_per_dim() {
return m_max_work_items_per_dim; return m_max_work_items_per_dim;
} }
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // DEVICE_INFO_HPP #endif // DEVICE_INFO_HPP
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include <CL/opencl.h> #include <CL/opencl.h>
#endif #endif
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
/** /**
* @brief A vector of up to three elements used for OpenCL dimensions. * @brief A vector of up to three elements used for OpenCL dimensions.
...@@ -54,6 +55,8 @@ std::string get_opencl_error(cl_int err); ...@@ -54,6 +55,8 @@ std::string get_opencl_error(cl_int err);
cl_int clReleaseDeviceDummy (cl_device_id); cl_int clReleaseDeviceDummy (cl_device_id);
cl_int clRetainDeviceDummy (cl_device_id); cl_int clRetainDeviceDummy (cl_device_id);
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_GLOBAL_HPP #endif // CPPA_OPENCL_GLOBAL_HPP
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
#include "cppa/detail/singleton_mixin.hpp" #include "cppa/detail/singleton_mixin.hpp"
#include "cppa/detail/singleton_manager.hpp" #include "cppa/detail/singleton_manager.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
class opencl_metainfo { class opencl_metainfo {
...@@ -77,6 +78,8 @@ class opencl_metainfo { ...@@ -77,6 +78,8 @@ class opencl_metainfo {
opencl_metainfo* get_opencl_metainfo(); opencl_metainfo* get_opencl_metainfo();
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // OPENCL_METAINFO_HPP #endif // OPENCL_METAINFO_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/opencl/global.hpp" #include "cppa/opencl/global.hpp"
#include "cppa/opencl/smart_ptr.hpp" #include "cppa/opencl/smart_ptr.hpp"
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename Signature> template<typename Signature>
class actor_facade; class actor_facade;
...@@ -69,6 +70,8 @@ class program { ...@@ -69,6 +70,8 @@ class program {
}; };
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // CPPA_OPENCL_PROGRAM_HPP #endif // CPPA_OPENCL_PROGRAM_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include <algorithm> #include <algorithm>
#include <type_traits> #include <type_traits>
namespace cppa { namespace opencl { namespace cppa {
namespace opencl {
template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)> template<typename T, cl_int (*ref)(T), cl_int (*deref)(T)>
class smart_ptr { class smart_ptr {
...@@ -119,6 +120,8 @@ typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy> ...@@ -119,6 +120,8 @@ typedef smart_ptr<cl_device_id, clRetainDeviceDummy, clReleaseDeviceDummy>
typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue> typedef smart_ptr<cl_command_queue, clRetainCommandQueue, clReleaseCommandQueue>
command_queue_ptr; command_queue_ptr;
} } // namespace cppa::opencl } // namespace opencl
} // namespace cppa
#endif // SMART_PTR_HPP #endif // SMART_PTR_HPP
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include "cppa/intrusive/single_reader_queue.hpp" #include "cppa/intrusive/single_reader_queue.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
class cooperative_scheduling { class cooperative_scheduling {
...@@ -84,6 +85,8 @@ class cooperative_scheduling { ...@@ -84,6 +85,8 @@ class cooperative_scheduling {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_COOPERATIVE_SCHEDULING_HPP #endif // CPPA_COOPERATIVE_SCHEDULING_HPP
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
#include "cppa/detail/cs_thread.hpp" #include "cppa/detail/cs_thread.hpp"
#include "cppa/detail/functor_based_actor.hpp" #include "cppa/detail/functor_based_actor.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
class event_based_resume { class event_based_resume {
...@@ -187,6 +188,8 @@ class event_based_resume { ...@@ -187,6 +188,8 @@ class event_based_resume {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_ABSTRACT_EVENT_BASED_ACTOR_HPP #endif // CPPA_ABSTRACT_EVENT_BASED_ACTOR_HPP
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
#include "cppa/util/scope_guard.hpp" #include "cppa/util/scope_guard.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
enum receive_policy_flag { enum receive_policy_flag {
// receives can be nested // receives can be nested
...@@ -385,6 +386,8 @@ class invoke_policy { ...@@ -385,6 +386,8 @@ class invoke_policy {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_INVOKE_POLICY_HPP #endif // CPPA_INVOKE_POLICY_HPP
...@@ -46,9 +46,11 @@ ...@@ -46,9 +46,11 @@
#include "cppa/policy/invoke_policy.hpp" #include "cppa/policy/invoke_policy.hpp"
namespace cppa { namespace detail { class receive_policy; } } namespace cppa {
namespace detail { class receive_policy; } }
namespace cppa { namespace policy { namespace cppa {
namespace policy {
class nestable_invoke : public invoke_policy<nestable_invoke> { class nestable_invoke : public invoke_policy<nestable_invoke> {
...@@ -82,6 +84,8 @@ class nestable_invoke : public invoke_policy<nestable_invoke> { ...@@ -82,6 +84,8 @@ class nestable_invoke : public invoke_policy<nestable_invoke> {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_THREADED_HPP #endif // CPPA_THREADED_HPP
...@@ -8,13 +8,11 @@ ...@@ -8,13 +8,11 @@
#include "cppa/exit_reason.hpp" #include "cppa/exit_reason.hpp"
#include "cppa/policy/resume_policy.hpp" #include "cppa/policy/resume_policy.hpp"
namespace cppa { namespace cppa { namespace detail { struct cs_thread; } }
namespace detail {
struct cs_thread;
} // namespace detail
} // namespace cppa
namespace cppa { namespace policy { namespace cppa {
namespace policy {
// this policy simply forwards calls to @p await_data to the scheduling // this policy simply forwards calls to @p await_data to the scheduling
// policy and throws an exception whenever @p resume is called; // policy and throws an exception whenever @p resume is called;
...@@ -70,6 +68,8 @@ class no_resume { ...@@ -70,6 +68,8 @@ class no_resume {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // NO_RESUME_HPP #endif // NO_RESUME_HPP
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
#include "cppa/intrusive/single_reader_queue.hpp" #include "cppa/intrusive/single_reader_queue.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
class no_scheduling { class no_scheduling {
...@@ -120,6 +121,8 @@ class no_scheduling { ...@@ -120,6 +121,8 @@ class no_scheduling {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_NO_SCHEDULING_HPP #endif // CPPA_NO_SCHEDULING_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "cppa/message_priority.hpp" #include "cppa/message_priority.hpp"
#include "cppa/detail/sync_request_bouncer.hpp" #include "cppa/detail/sync_request_bouncer.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
class prioritizing { class prioritizing {
...@@ -138,6 +139,8 @@ class prioritizing { ...@@ -138,6 +139,8 @@ class prioritizing {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // PRIORITIZING_HPP #endif // PRIORITIZING_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
namespace cppa { class mailbox_element; } namespace cppa { class mailbox_element; }
namespace cppa { namespace policy { namespace cppa {
namespace policy {
/** /**
* @brief The priority_policy <b>concept</b> class. Please note that this * @brief The priority_policy <b>concept</b> class. Please note that this
...@@ -71,6 +72,8 @@ class priority_policy { ...@@ -71,6 +72,8 @@ class priority_policy {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_PRIORITY_POLICY_HPP #endif // CPPA_PRIORITY_POLICY_HPP
...@@ -118,6 +118,8 @@ class scheduling_policy { ...@@ -118,6 +118,8 @@ class scheduling_policy {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_SCHEDULING_POLICY_HPP #endif // CPPA_SCHEDULING_POLICY_HPP
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "cppa/policy/invoke_policy.hpp" #include "cppa/policy/invoke_policy.hpp"
namespace cppa { namespace policy { namespace cppa {
namespace policy {
/** /**
* @brief An actor that is scheduled or otherwise managed. * @brief An actor that is scheduled or otherwise managed.
...@@ -70,6 +71,8 @@ class sequential_invoke : public invoke_policy<sequential_invoke> { ...@@ -70,6 +71,8 @@ class sequential_invoke : public invoke_policy<sequential_invoke> {
}; };
} } // namespace cppa::policy } // namespace policy
} // namespace cppa
#endif // CPPA_THREADLESS_HPP #endif // CPPA_THREADLESS_HPP
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
#include "cppa/detail/type_to_ptype.hpp" #include "cppa/detail/type_to_ptype.hpp"
#include "cppa/detail/ptype_to_type.hpp" #include "cppa/detail/ptype_to_type.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<primitive_type FT, class T, class V> template<primitive_type FT, class T, class V>
void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
...@@ -56,7 +57,9 @@ template<primitive_type FT, class T, class V> ...@@ -56,7 +57,9 @@ template<primitive_type FT, class T, class V>
void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
typename std::enable_if<std::is_arithmetic<T>::value, int>::type* = 0); typename std::enable_if<std::is_arithmetic<T>::value, int>::type* = 0);
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
namespace cppa { namespace cppa {
...@@ -353,7 +356,8 @@ inline bool equal(const primitive_variant& lhs, const T& rhs) { ...@@ -353,7 +356,8 @@ inline bool equal(const primitive_variant& lhs, const T& rhs) {
} // namespace cppa } // namespace cppa
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<primitive_type FT, class T, class V> template<primitive_type FT, class T, class V>
void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
...@@ -375,7 +379,9 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs, ...@@ -375,7 +379,9 @@ void ptv_set(primitive_type& lhs_type, T& lhs, V&& rhs,
lhs_type = FT; lhs_type = FT;
} }
} } // namespace cppa::detail } // namespace detail
} // namespace cppa
#endif // CPPA_PRIMITIVE_VARIANT_HPP #endif // CPPA_PRIMITIVE_VARIANT_HPP
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include "cppa/detail/to_uniform_name.hpp" #include "cppa/detail/to_uniform_name.hpp"
#include "cppa/detail/uniform_type_info_map.hpp" #include "cppa/detail/uniform_type_info_map.hpp"
namespace cppa { namespace util { namespace cppa {
namespace util {
/** /**
* @brief Implements all pure virtual functions of {@link uniform_type_info} * @brief Implements all pure virtual functions of {@link uniform_type_info}
...@@ -130,6 +131,8 @@ class abstract_uniform_type_info : public uniform_type_info { ...@@ -130,6 +131,8 @@ class abstract_uniform_type_info : public uniform_type_info {
}; };
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_ABSTRACT_UNIFORM_TYPE_INFO_HPP #endif // CPPA_ABSTRACT_UNIFORM_TYPE_INFO_HPP
...@@ -41,7 +41,8 @@ ...@@ -41,7 +41,8 @@
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
namespace cppa { namespace util { namespace cppa {
namespace util {
std::vector<std::string> split(const std::string& str, std::vector<std::string> split(const std::string& str,
char delim = ' ', char delim = ' ',
...@@ -101,6 +102,8 @@ safe_equal(const T& lhs, const U& rhs) { ...@@ -101,6 +102,8 @@ safe_equal(const T& lhs, const U& rhs) {
return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon(); return std::fabs(lhs - rhs) <= std::numeric_limits<res_type>::epsilon();
} }
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_UTIL_SPLIT_HPP #endif // CPPA_UTIL_SPLIT_HPP
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#ifndef CPPA_ARG_MATCH_T_HPP #ifndef CPPA_ARG_MATCH_T_HPP
#define CPPA_ARG_MATCH_T_HPP #define CPPA_ARG_MATCH_T_HPP
namespace cppa { namespace util { struct arg_match_t { }; } } namespace cppa {
namespace util { struct arg_match_t { }; } }
#endif // CPPA_ARG_MATCH_T_HPP #endif // CPPA_ARG_MATCH_T_HPP
...@@ -37,7 +37,8 @@ namespace cppa { class deserializer; } ...@@ -37,7 +37,8 @@ namespace cppa { class deserializer; }
namespace cppa { namespace io { class input_stream; } } namespace cppa { namespace io { class input_stream; } }
namespace cppa { namespace util { namespace cppa {
namespace util {
class input_stream; class input_stream;
...@@ -313,6 +314,7 @@ inline size_t buffer::adjust(size_t alloc_size) const { ...@@ -313,6 +314,7 @@ inline size_t buffer::adjust(size_t alloc_size) const {
: (alloc_size - remainder) + m_chunk_size; : (alloc_size - remainder) + m_chunk_size;
} }
} } // namespace cppa::detail } // namespace util
} // namespace cppa
#endif // CPPA_BUFFER_HPP #endif // CPPA_BUFFER_HPP
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "cppa/get.hpp" #include "cppa/get.hpp"
#include "cppa/util/int_list.hpp" #include "cppa/util/int_list.hpp"
namespace cppa { namespace util { namespace cppa {
namespace util {
template<typename F, class Tuple, long... Is> template<typename F, class Tuple, long... Is>
inline auto apply_args(F& f, Tuple& tup, util::int_list<Is...>) inline auto apply_args(F& f, Tuple& tup, util::int_list<Is...>)
...@@ -59,6 +60,8 @@ inline auto call_mv(F& f, Ts&&... args) -> decltype(f(std::move(args)...)) { ...@@ -59,6 +60,8 @@ inline auto call_mv(F& f, Ts&&... args) -> decltype(f(std::move(args)...)) {
return f(std::move(args)...); return f(std::move(args)...);
} }
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CALL_HPP #endif // CALL_HPP
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#ifndef CPPA_COMPARABLE_HPP #ifndef CPPA_COMPARABLE_HPP
#define CPPA_COMPARABLE_HPP #define CPPA_COMPARABLE_HPP
namespace cppa { namespace util { namespace cppa {
namespace util {
/** /**
* @brief Barton–Nackman trick implementation. * @brief Barton–Nackman trick implementation.
...@@ -124,6 +125,8 @@ class comparable<Subclass, Subclass> { ...@@ -124,6 +125,8 @@ class comparable<Subclass, Subclass> {
}; };
} } // cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_COMPARABLE_HPP #endif // CPPA_COMPARABLE_HPP
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include "cppa/util/type_list.hpp" #include "cppa/util/type_list.hpp"
#include "cppa/util/type_traits.hpp" #include "cppa/util/type_traits.hpp"
namespace cppa { namespace detail { namespace cppa {
namespace detail {
template<size_t N, template<typename...> class Tuple, typename... Ts> template<size_t N, template<typename...> class Tuple, typename... Ts>
const typename util::type_at<N, Ts...>::type& const typename util::type_at<N, Ts...>::type&
...@@ -60,9 +61,12 @@ struct cmp_helper<0, LhsTuple, RhsTuple> { ...@@ -60,9 +61,12 @@ struct cmp_helper<0, LhsTuple, RhsTuple> {
} }
}; };
} } // namespace cppa::detail } // namespace util
} // namespace cppa
namespace cppa { namespace util {
namespace cppa {
namespace util {
template<template<typename...> class LhsTuple, typename... LhsTs, template<template<typename...> class LhsTuple, typename... LhsTs,
template<typename...> class RhsTuple, typename... RhsTs> template<typename...> class RhsTuple, typename... RhsTs>
...@@ -101,6 +105,8 @@ bool compare_first_elements(const LhsTuple<LhsTs...>& lhs, ...@@ -101,6 +105,8 @@ bool compare_first_elements(const LhsTuple<LhsTs...>& lhs,
RhsTuple<RhsTs...>>::cmp(lhs, rhs); RhsTuple<RhsTs...>>::cmp(lhs, rhs);
} }
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_COMPARE_TUPLES_HPP #endif // CPPA_COMPARE_TUPLES_HPP
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include <type_traits> #include <type_traits>
namespace cppa { namespace util { namespace cppa {
namespace util {
/** /**
* @brief Returns <tt>static_cast<Subtype*>(ptr)</tt> if @p Subtype is a * @brief Returns <tt>static_cast<Subtype*>(ptr)</tt> if @p Subtype is a
...@@ -55,6 +56,8 @@ dptr(MixinType* ptr) { ...@@ -55,6 +56,8 @@ dptr(MixinType* ptr) {
return static_cast<result_type*>(ptr); return static_cast<result_type*>(ptr);
} }
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_DTHIS_HPP #endif // CPPA_DTHIS_HPP
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include <cstdint> #include <cstdint>
#include <stdexcept> #include <stdexcept>
namespace cppa { namespace util { namespace cppa {
namespace util {
/** /**
* @brief SI time units to specify timeouts. * @brief SI time units to specify timeouts.
...@@ -161,7 +162,9 @@ inline bool operator!=(const duration& lhs, const duration& rhs) { ...@@ -161,7 +162,9 @@ inline bool operator!=(const duration& lhs, const duration& rhs) {
return !(lhs == rhs); return !(lhs == rhs);
} }
} } // namespace cppa::util } // namespace util
} // namespace cppa
/** /**
* @relates cppa::util::duration * @relates cppa::util::duration
......
...@@ -34,10 +34,13 @@ ...@@ -34,10 +34,13 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace cppa { namespace util { namespace cppa {
namespace util {
std::vector<std::string> get_mac_addresses(); std::vector<std::string> get_mac_addresses();
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_UTIL_GET_MAC_ADDRESSES_HPP #endif // CPPA_UTIL_GET_MAC_ADDRESSES_HPP
...@@ -33,10 +33,13 @@ ...@@ -33,10 +33,13 @@
#include <string> #include <string>
namespace cppa { namespace util { namespace cppa {
namespace util {
std::string get_root_uuid(); std::string get_root_uuid();
} } // namespace cppa::util } // namespace util
} // namespace cppa
#endif // CPPA_UTIL_GET_ROOT_UUID_HPP #endif // CPPA_UTIL_GET_ROOT_UUID_HPP
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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