mimic++ v9.3.0
Loading...
Searching...
No Matches
mimicpp::util::Stacktrace Class Reference

A simple type-erased stacktrace abstraction. More...

#include <Stacktrace.hpp>

Public Member Functions

 ~Stacktrace ()=default
 Defaulted destructor.
 Stacktrace ()
 Default constructor.
template<typename Backend>
 Stacktrace (Backend backend)
 Constructor storing the given stacktrace-backend.
 Stacktrace (Stacktrace const &)=default
 Defaulted copy-constructor.
Stacktraceoperator= (Stacktrace const &)=default
 Defaulted copy-assignment-operator.
 Stacktrace (Stacktrace &&)=default
 Defaulted move-constructor.
Stacktraceoperator= (Stacktrace &&)=default
 Defaulted move-assignment-operator.
std::size_t size () const
 Queries the underlying stacktrace-backend for its size.
bool empty () const
 Queries the underlying stacktrace-backend whether it's empty.
std::string description (std::size_t const at) const
 Queries the underlying stacktrace-backend for the description of the selected stacktrace-entry.
std::string source_file (std::size_t const at) const
 Queries the underlying stacktrace-backend for the source-file of the selected stacktrace-entry.
std::size_t source_line (std::size_t const at) const
 Queries the underlying stacktrace-backend for the source-line of the selected stacktrace-entry.

Friends

bool operator== (Stacktrace const &lhs, Stacktrace const &rhs)

Detailed Description

A simple type-erased stacktrace abstraction.

Constructor & Destructor Documentation

◆ ~Stacktrace()

mimicpp::util::Stacktrace::~Stacktrace ( )
default

Defaulted destructor.

◆ Stacktrace() [1/4]

mimicpp::util::Stacktrace::Stacktrace ( )
inline

Default constructor.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stacktrace() [2/4]

template<typename Backend>
mimicpp::util::Stacktrace::Stacktrace ( Backend backend)
inlineexplicitnodiscard

Constructor storing the given stacktrace-backend.

Parameters
backendThe actual stacktrace-backend object.

◆ Stacktrace() [3/4]

mimicpp::util::Stacktrace::Stacktrace ( Stacktrace const & )
default

Defaulted copy-constructor.

Here is the call graph for this function:

◆ Stacktrace() [4/4]

mimicpp::util::Stacktrace::Stacktrace ( Stacktrace && )
nodiscarddefault

Defaulted move-constructor.

Here is the call graph for this function:

Member Function Documentation

◆ description()

std::string mimicpp::util::Stacktrace::description ( std::size_t const at) const
inlinenodiscard

Queries the underlying stacktrace-backend for the description of the selected stacktrace-entry.

Parameters
atThe stacktrace-entry index.
Returns
The description of the selected stacktrace-entry.

◆ empty()

bool mimicpp::util::Stacktrace::empty ( ) const
inlinenodiscard

Queries the underlying stacktrace-backend whether it's empty.

Returns
True if no stacktrace-entries exist.

◆ operator=() [1/2]

Stacktrace & mimicpp::util::Stacktrace::operator= ( Stacktrace && )
default

Defaulted move-assignment-operator.

Here is the call graph for this function:

◆ operator=() [2/2]

Stacktrace & mimicpp::util::Stacktrace::operator= ( Stacktrace const & )
default

Defaulted copy-assignment-operator.

Here is the call graph for this function:

◆ size()

std::size_t mimicpp::util::Stacktrace::size ( ) const
inlinenodiscard

Queries the underlying stacktrace-backend for its size.

Returns
The stacktrace-entry size.
Here is the caller graph for this function:

◆ source_file()

std::string mimicpp::util::Stacktrace::source_file ( std::size_t const at) const
inlinenodiscard

Queries the underlying stacktrace-backend for the source-file of the selected stacktrace-entry.

Parameters
atThe stacktrace-entry index.
Returns
The source-file of the selected stacktrace-entry.

◆ source_line()

std::size_t mimicpp::util::Stacktrace::source_line ( std::size_t const at) const
inlinenodiscard

Queries the underlying stacktrace-backend for the source-line of the selected stacktrace-entry.

Parameters
atThe stacktrace-entry index.
Returns
The source-line of the selected stacktrace-entry.

◆ operator==

bool operator== ( Stacktrace const & lhs,
Stacktrace const & rhs )
friend

The documentation for this class was generated from the following file: