libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
Go to the source code of this file.
Namespaces | |
namespace | jmmcg |
Link with -lrt to include these functions. | |
namespace | jmmcg::LIBJMMCG_VER_NAMESPACE |
namespace | jmmcg::LIBJMMCG_VER_NAMESPACE::syscall |
A wrapper for glibc or syscalls, etc. This function captures the return-code and if it is the specified failure-code, then according to the traits may capture any error information and throw it as an exception. | |
namespace | jmmcg::LIBJMMCG_VER_NAMESPACE::syscall::private_ |
Macros | |
#define | JMMCG_SYSCALL_WRAPPER(ErrMsg, RevInfo, Fn, ...) |
Use this nasty macro to wrap calling the C-style function for which the return code is basically a "single" failure-code and a range of successful ones. More... | |
#define | JMMCG_SYSCALL_WRAPPER_FC(FailureCode, ErrMsg, RevInfo, Fn, ...) |
#define | JMMCG_SYSCALL_WRAPPER_SWITCH(CaseLabels, ErrMsg, RevInfo, Fn, ...) |
Use this nasty macro to wrap calling the C-style function for which there may be many failure codes that need different handling for each. More... | |
Typedefs | |
using | jmmcg::LIBJMMCG_VER_NAMESPACE::syscall::exception_t = crt_exception< ppd::platform_api, ppd::heavyweight_threading > |
Functions | |
template<template< class, class ... > class Traits, template< class, template< class > class, template< class > class > class FailureTraits, template< class > class FailureCode, template< class > class FailureDetection, class FnReturnType , class ... FnArgs, class ... PassedInArgs> | |
FnReturnType | jmmcg::LIBJMMCG_VER_NAMESPACE::syscall::process (char const *const file_name, unsigned line_num, char const *const fn_name, tchar const *const rev_info, tchar const *const err_msg, FnReturnType(*fn)(FnArgs...), PassedInArgs ...args) noexcept(std::is_same< FnReturnType, void >::value) |
The function that wraps calling the C-style function. More... | |
#define JMMCG_SYSCALL_WRAPPER | ( | ErrMsg, | |
RevInfo, | |||
Fn, | |||
... | |||
) |
Use this nasty macro to wrap calling the C-style function for which the return code is basically a "single" failure-code and a range of successful ones.
Definition at line 239 of file syscall_wrapper.hpp.
#define JMMCG_SYSCALL_WRAPPER_FC | ( | FailureCode, | |
ErrMsg, | |||
RevInfo, | |||
Fn, | |||
... | |||
) |
Definition at line 247 of file syscall_wrapper.hpp.
#define JMMCG_SYSCALL_WRAPPER_SWITCH | ( | CaseLabels, | |
ErrMsg, | |||
RevInfo, | |||
Fn, | |||
... | |||
) |
Use this nasty macro to wrap calling the C-style function for which there may be many failure codes that need different handling for each.
Definition at line 259 of file syscall_wrapper.hpp.