libsir 2.2.5
Standard Incident Reporter
|
C++ interface to libsir. More...
Go to the source code of this file.
Data Structures | |
struct | sir::error |
Contains basic information about an error. More... | |
struct | sir::error_info |
Contains all available information about an error. More... | |
class | sir::exception |
The exception type thrown by libsir. More... | |
class | sir::policy |
Defines the partially abstract interface for a policy which controls the behavior of logger at runtime. More... | |
class | sir::default_policy |
In the event that no custom configuration or behavior is desired, provides defaults for everything. More... | |
class | sir::adapter |
Defines the abstract interface for an adapter, which ultimately becomes a public base class of logger (there can be more than one). More... | |
class | sir::default_adapter< TPolicy > |
The default adapter implementation. More... | |
class | sir::std_format_adapter< TPolicy > |
Adapter for std::format (when available). More... | |
class | sir::boost_format_adapter< TPolicy > |
Adapter for boost::format (when available). More... | |
class | sir::fmt_format_adapter< TPolicy > |
Adapter for {fmt} (when available). More... | |
class | sir::std_iostream_adapter< TPolicy > |
Provides a std::iostream interface to libsir's logging functions. More... | |
class | sir::logger< RAII, TPolicy, TAdapters > |
The primary C++ interface to libsir. More... | |
Namespaces | |
namespace | sir |
libsir C++ wrapper implementation. | |
Concepts | |
concept | sir::DerivedFromPolicy |
Ensures that T derives from policy. | |
concept | sir::DerivedFromStreamBuf |
Ensures that T derives from std::streambuf. | |
concept | sir::DerivedFromT |
True if all Ts are derived classes of TBase, otherwise false. | |
Typedefs | |
template<size_t N, typename ... Ts> | |
using | sir::NthTypeOf = typename std::tuple_element<N, std::tuple<Ts...>>::type |
Utility template for obtaining the type of Nth item in a parameter pack. | |
using | sir::default_logger = logger<true, default_policy, default_adapter> |
A logger that implements the default adapter. | |
using | sir::std_format_logger |
A logger that implements the default adapter and the std::format adapter. | |
using | sir::boost_logger |
A logger that implements the default adapter and the boost::format adapter. | |
using | sir::fmt_logger |
A logger that implements the default adapter and the fmt::format adapter. | |
using | sir::iostream_logger |
A logger that implements the default adapter and the std::iostream adapter. | |
Functions | |
template<DerivedFromPolicy TPolicy> | |
static bool | sir::throw_on_policy (bool expr) noexcept(false) |
Handles a potential error; if an error is present and the policy in place requires throwing an exception, retrieves the associated error code and message from libsir, then throws. | |
template<size_t N, typename TBase , typename ... Ts> | |
consteval auto | sir::all_derived_from_t () |
Ensures (at compile time) that all Ts are derived classes of TBase. | |
C++ interface to libsir.
SPDX-License-Identifier: MIT
Copyright (c) 2018-2024 Ryan M. Lederman leder.nosp@m.man@.nosp@m.gmail.nosp@m..com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.