OGLplus  (0.59.0) a C++ wrapper for rendering APIs

watchdog.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_WATCHDOG_HPP
10 #define EAGINE_WATCHDOG_HPP
11 
12 #include "config/basic.hpp"
13 #include "main_ctx_object.hpp"
14 #include <memory>
15 
16 namespace eagine {
17 
18 class process_watchdog_impl;
19 
23 public:
24  process_watchdog(main_ctx_parent parent) noexcept
25  : main_ctx_object{EAGINE_ID(Watchdog), parent} {}
26 
28  void declare_initialized() noexcept;
29 
31  void notify_alive() noexcept;
32 
34  void announce_shutdown() noexcept;
35 
36 private:
37  std::shared_ptr<process_watchdog_impl> _pimpl;
38  auto _impl() noexcept -> process_watchdog_impl*;
39 };
40 
41 } // namespace eagine
42 
43 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
44 #include <eagine/watchdog.inl>
45 #endif
46 
47 #endif // EAGINE_WATCHDOG_HPP
Helper class used to initialize main context objects.
Definition: main_ctx_object.hpp:45
#define EAGINE_ID(NAME)
Macro for constructing instances of eagine::identifier.
Definition: identifier.hpp:353
Base class for main context objects.
Definition: main_ctx_object.hpp:71
Common code is placed in this namespace.
Definition: eagine.hpp:21
void declare_initialized() noexcept
Tells the system that this process finished initialization.
void notify_alive() noexcept
Tells the system that this process is alive. Should be called repeatedly.
void announce_shutdown() noexcept
Announce to the system that this process is shutting down.
Class implementing process watchdog functionality.
Definition: watchdog.hpp:22

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).