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

c_api_wrap.hpp File Reference
#include "assert.hpp"
#include "cleanup_group.hpp"
#include "enum_bitfield.hpp"
#include "enum_class.hpp"
#include "extract.hpp"
#include "handle.hpp"
#include "int_constant.hpp"
#include "is_within_limits.hpp"
#include "nothing.hpp"
#include "string_span.hpp"
#include "type_identity.hpp"
#include "unreachable_reference.hpp"
#include "valid_if/always.hpp"
#include "valid_if/never.hpp"
#include <tuple>
#include <type_traits>

Go to the source code of this file.

Classes

struct  eagine::c_api_constant_base
 Common base class for wrapping C-API constant values. More...
 
struct  eagine::no_c_api_constant< T, Tag, IsIndexed >
 Class wrapping a constant with missing or unknown value. More...
 
struct  eagine::static_c_api_constant< ClassList, T, value, Tag, IsIndexed >
 Class wrapping a constant with value known at compile-time. More...
 
struct  eagine::dynamic_c_api_constant< ClassList, T, Tag, IsIndexed >
 Class wrapping a constant with value loaded at run-time. More...
 
class  eagine::bad_result< Info >
 Exception wrapping information about failed C-API function call result. More...
 
class  eagine::api_result< Result, Info, api_result_validity >
 Class wrapping the result of a C-API function call. More...
 
class  eagine::api_result_value< Result, api_result_validity::always >
 Specialization for always-valid result value. More...
 
class  eagine::api_result< Result, Info, api_result_validity::always >
 Specialization of api_result for always-valid result values. More...
 
class  eagine::api_result_value< Result, api_result_validity::maybe >
 Specialization for conditionally-valid result value. More...
 
class  eagine::static_c_api_function< ApiTraits, Tag, Signature, function >
 Wrapper for statically-linked C-API functions. More...
 
class  eagine::dynamic_c_api_function< ApiTraits, Tag, Signature >
 Wrapper for dynamically-linked C-API functions. More...
 
struct  eagine::default_c_api_traits
 Policy class customizing C-API constant value loading and function linking. More...
 
class  eagine::static_c_api_function< ApiTraits, Tag, RV(Params...), function >
 Wrapper for statically-linked C-API functions. More...
 
class  eagine::dynamic_c_api_function< ApiTraits, Tag, RV(Params...)>
 Wrapper for dynamically -linked C-API functions. More...
 

Namespaces

 eagine
 Common code is placed in this namespace.
 

Typedefs

template<typename ClassList , typename Constant , typename Tag = nothing_t, bool IsIndexed = false>
using eagine::opt_c_api_constant = typename get_opt_c_api_constant< ClassList, Constant, Tag, IsIndexed >::type
 Template alias used for switching between static and dynamic constants. More...
 
template<typename Result , typename Info >
using eagine::api_opt_result = api_result< Result, Info, api_result_validity::maybe >
 Alias for conditionally-valid result of a C-API function call. More...
 
template<typename Result , typename Info >
using eagine::api_no_result = api_result< Result, Info, api_result_validity::never >
 Alias for always-invalid result of a C-API function call. More...
 
template<typename ApiTraits , typename Tag , typename Signature , c_api_function_ptr< ApiTraits, Tag, Signature > function, bool IsAvailable, bool IsStatic>
using eagine::opt_c_api_function = std::conditional_t< IsAvailable, std::conditional_t< IsStatic, static_c_api_function< ApiTraits, Tag, Signature, function >, dynamic_c_api_function< ApiTraits, Tag, Signature > >, unimplemented_c_api_function< ApiTraits, Tag, Signature > >
 Template alias used for switching between static and dynamic function. More...
 

Enumerations

enum  eagine::api_result_validity { eagine::api_result_validity::always, eagine::api_result_validity::maybe, eagine::api_result_validity::never }
 Enumeration of C-API function call result validity. More...
 

Functions

template<typename Result >
static constexpr auto eagine::extract (api_result_value< Result, api_result_validity::never > &) noexcept -> Result &
 Overload of extract for api_result_value.
 
template<typename Result >
static constexpr auto eagine::extract (api_result_value< Result, api_result_validity::maybe > &&result) noexcept -> Result
 Specialization of extract for api_result_value.
 
template<typename Result >
static constexpr auto eagine::extract (api_result_value< Result, api_result_validity::maybe > &result) noexcept -> Result &
 Specialization of extract for api_result_value.
 
template<typename Result >
static constexpr auto eagine::extract (const api_result_value< Result, api_result_validity::maybe > &result) noexcept -> const Result &
 Specialization of extract for api_result_value.
 
template<typename Result , typename Info >
auto eagine::operator>> (api_result< Result, Info, api_result_validity::maybe > result, Result &dest) -> Result &
 Extraction operator for api_result_value. More...
 

Detailed Description

Copyright Matus Chochlik. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt


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