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

resources.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_RESOURCES_HPP
10 #define EAGINE_RESOURCES_HPP
11 
12 #include "embed.hpp"
13 #include "logging/logger.hpp"
14 #include "main_ctx.hpp"
15 #include "memory/buffer_fwd.hpp"
16 #include "string_span.hpp"
17 
18 namespace eagine {
19 //------------------------------------------------------------------------------
20 auto fetch_resource(
21  string_view description,
22  string_view key,
23  memory::const_block embedded_blk,
24  memory::buffer& buf,
25  application_config& args,
26  logger& log) -> memory::const_block;
27 //------------------------------------------------------------------------------
28 inline auto fetch_resource(
29  string_view description,
30  string_view key,
31  memory::const_block embedded_blk,
32  main_ctx& ctx) -> memory::const_block {
33  return fetch_resource(
34  description,
35  key,
36  embedded_blk,
37  ctx.scratch_space(),
38  ctx.config(),
39  ctx.log());
40 }
41 //------------------------------------------------------------------------------
42 auto ca_certificate_pem(
43  memory::const_block embedded_blk,
44  memory::buffer&,
45  application_config&,
46  logger&) -> memory::const_block;
47 //------------------------------------------------------------------------------
48 inline auto ca_certificate_pem(memory::const_block embedded_blk, main_ctx& ctx)
50  return ca_certificate_pem(
51  embedded_blk, ctx.scratch_space(), ctx.config(), ctx.log());
52 }
53 //------------------------------------------------------------------------------
54 } // namespace eagine
55 
56 #if !EAGINE_LINK_LIBRARY || defined(EAGINE_IMPLEMENTING_LIBRARY)
57 #include <eagine/resources.inl>
58 #endif
59 
60 #endif // EAGINE_RESOURCES_HPP
basic_string_span< const char > string_view
Alias for const string views.
Definition: string_span.hpp:116
Common code is placed in this namespace.
Definition: eagine.hpp:21
basic_block< true > const_block
Alias for const byte memory span.
Definition: block.hpp:32

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