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

api_traits.hpp
Go to the documentation of this file.
1 #ifndef OALPLUS_AL_API_API_TRAITS_HPP
9 #define OALPLUS_AL_API_API_TRAITS_HPP
10 
11 #include "result.hpp"
12 
13 namespace eagine::oalp {
14 //------------------------------------------------------------------------------
19 public:
21  template <typename R>
23 
25  template <typename R>
27 
29  template <typename R>
31 
33  template <typename Api, typename Type>
34  auto load_constant(Api& api, string_view name, type_identity<Type>)
35  -> std::tuple<Type, bool>;
36 
38  template <typename Api, typename Tag, typename Signature>
39  auto link_function(Api& api, Tag, string_view name, type_identity<Signature>)
40  -> std::add_pointer_t<Signature>;
41 
42 private:
43  std::string _full_name;
44 };
45 //------------------------------------------------------------------------------
46 } // namespace eagine::oalp
47 
48 #endif // OALPLUS_AL_API_API_TRAITS_HPP
Class wrapping the result of a C-API function call.
Definition: c_api_wrap.hpp:210
Primary template for conditionally valid values.
Definition: decl.hpp:49
auto load_constant(Api &api, string_view name, type_identity< Type >) -> std::tuple< Type, bool >
Loads an AL constant with the specified name and Type.
auto link_function(Api &api, Tag, string_view name, type_identity< Signature >) -> std::add_pointer_t< Signature >
Links an AL function with the specified name and Signature.
Template type used mostly for function type-tag dispatching.
Definition: type_identity.hpp:19
AL-related code is placed in this namespace.
Definition: oalplus.hpp:11
Policy customizing the generic C-API wrappers for the AL API.
Definition: api_traits.hpp:18
api_no_result< Result, al_no_result_info > al_no_result
Alias for always-invalid result of a missing AL API function call.
Definition: result.hpp:102
api_opt_result< Result, al_result_info > al_opt_result
Alias for conditionally-valid result of an AL API function call.
Definition: result.hpp:116
Policy class customizing C-API constant value loading and function linking.
Definition: c_api_wrap.hpp:901

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