1 //  Copyright (c) 2007-2014 Hartmut Kaiser
2 //  Copyright (c) 2011      Bryce Lelbach
3 //
4 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
5 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef HPX_RUNTIME_COMPONENTS_FWD_HPP
8 #define HPX_RUNTIME_COMPONENTS_FWD_HPP
9 
10 #include <hpx/config.hpp>
11 #include <hpx/traits/managed_component_policies.hpp>
12 
13 #include <cstddef>
14 #include <string>
15 
16 namespace hpx
17 {
18     enum logging_destination
19     {
20         destination_hpx = 0,
21         destination_timing = 1,
22         destination_agas = 2,
23         destination_parcel = 3,
24         destination_app = 4,
25         destination_debuglog = 5
26     };
27 
28     /// \namespace components
29     namespace components
30     {
31         /// \ cond NODETAIL
32         namespace detail
33         {
34             struct this_type {};
35         }
36         /// \ endcond
37 
38         ///////////////////////////////////////////////////////////////////////
39         template <typename Component = detail::this_type>
40         class fixed_component_base;
41 
42         template <typename Component>
43         class fixed_component;
44 
45         template <typename Component = detail::this_type>
46         class abstract_simple_component_base;
47 
48         template <typename Component = detail::this_type>
49         class component_base;
50 
51         template <typename Component>
52         class component;
53 
54         template <typename Component>
55         using simple_component = component<Component>;
56 
57         template <typename Component>
58         using simple_component_base = component_base<Component>;
59 
60         template <typename Component, typename Derived = detail::this_type>
61         class abstract_managed_component_base;
62 
63         template <typename Component, typename Wrapper = detail::this_type,
64             typename CtorPolicy = traits::construct_without_back_ptr,
65             typename DtorPolicy = traits::managed_object_controls_lifetime>
66         class managed_component_base;
67 
68         template <typename Component, typename Derived = detail::this_type>
69         class managed_component;
70 
71         struct HPX_API_EXPORT component_factory_base;
72 
73         template <typename Component>
74         struct component_factory;
75 
76         class runtime_support;
77         class memory;
78 
79         class pinned_ptr;
80 
81         namespace stubs
82         {
83             struct runtime_support;
84             struct memory;
85         }
86 
87         namespace server
88         {
89             class HPX_API_EXPORT runtime_support;
90             class HPX_API_EXPORT memory;
91         }
92 
93         HPX_EXPORT void console_logging(logging_destination dest,
94             std::size_t level, std::string const& msg);
95         HPX_EXPORT void cleanup_logging();
96         HPX_EXPORT void activate_logging();
97     }
98 
99     HPX_EXPORT components::server::runtime_support* get_runtime_support_ptr();
100 }
101 
102 #endif
103