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

build_info.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_LOGGING_TYPE_BUILD_INFO_HPP
10 #define EAGINE_LOGGING_TYPE_BUILD_INFO_HPP
11 
12 #include "../../build_info.hpp"
13 #include "../entry.hpp"
14 
15 namespace eagine {
16 //------------------------------------------------------------------------------
17 static inline auto
18 adapt_log_entry_arg(identifier name, const build_info& value) {
19  return [name, value](logger_backend& backend) {
20  if(const auto opt_maj{value.version_major()}) {
21  backend.add_integer(name, EAGINE_ID(VerMajor), extract(opt_maj));
22  if(const auto opt_min{value.version_minor()}) {
23  backend.add_integer(
24  name, EAGINE_ID(VerMinor), extract(opt_min));
25  if(const auto opt_ptch{value.version_patch()}) {
26  backend.add_integer(
27  name, EAGINE_ID(VerPatch), extract(opt_ptch));
28  if(const auto opt_cmit{value.version_commit()}) {
29  backend.add_integer(
30  name, EAGINE_ID(VerCommit), extract(opt_cmit));
31  }
32  }
33  }
34  }
35  };
36 }
37 //------------------------------------------------------------------------------
38 } // namespace eagine
39 
40 #endif // EAGINE_LOGGING_TYPE_BUILD_INFO_HPP
#define EAGINE_ID(NAME)
Macro for constructing instances of eagine::identifier.
Definition: identifier.hpp:353
Common code is placed in this namespace.
Definition: eagine.hpp:21
static constexpr auto extract(api_result_value< Result, api_result_validity::never > &) noexcept -> Result &
Overload of extract for api_result_value.
Definition: c_api_wrap.hpp:270
basic_identifier< 10, 6, default_identifier_char_set, identifier_t > identifier
Default identifier type used throughout the project.
Definition: identifier.hpp:346

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