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

bindump.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_BINDUMP_HPP
10 #define EAGINE_BINDUMP_HPP
11 
12 #include "callable_ref.hpp"
13 #include "config/basic.hpp"
14 #include "memory/block.hpp"
15 #include "types.hpp"
16 #include "valid_if/decl.hpp"
17 #include <iosfwd>
18 
19 namespace eagine {
20 
27 class bindump {
28 
29 public:
32  : _mb{mb} {}
33 
36 
38  using char_putter = callable_ref<bool(char)>;
39 
41  static void apply(byte_getter get_byte, char_putter put_char);
42 
44  friend auto operator<<(std::ostream&, const bindump&) -> std::ostream&;
45 
46 private:
48 };
49 
50 } // namespace eagine
51 
52 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
53 #include <eagine/bindump.inl>
54 #endif
55 
56 #endif // EAGINE_BINDUMP_HPP
Declaration of class template storing a reference to a callable object.
Definition: callable_ref.hpp:24
friend auto operator<<(std::ostream &, const bindump &) -> std::ostream &
Operator for writing instances of bindump to standard output streams.
Common code is placed in this namespace.
Definition: eagine.hpp:21
bindump(memory::const_block mb) noexcept
Construction initializing the dumped memory block.
Definition: bindump.hpp:31
static void apply(byte_getter get_byte, char_putter put_char)
Uses get_byte to read input bytes, encodes them and calls put_char.
Non-owning view of a contiguous range of memory with ValueType elements.
Definition: flatten_fwd.hpp:16
Class for encoding byte blocks into binary format.
Definition: bindump.hpp:27

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