Skip to content

callstack.hpp

mhahnFr edited this page Oct 15, 2022 · 13 revisions

In this header the wrapper class for the C++ support can be found.
Its not necessary to include this header on its own, this is automatically done by callstack.h.

namespace lcs

The namespace used to separate the wrapper class from the struct callstack, declared in callstack.h.

class callstack

The actual wrapper class, consisting of all necessary operators and constructors for seemlessly integration into C++ code.

Typedefs

typedef ::callstack struct_callstack

A typedef to improve the readability of the code.

Variables

struct_callstack self

A private variable containing the underlying struct callstack.

Note: The struct is part of this class.

Constructors

callstack::callstack(bool emplace = true)

The default constructor. Creates a new backtrace unless emplace is set to false. In either case, the underlying struct callstack is properly initialized.

callstack::callstack(void ** trace, size_t length)

Constructs the underlying struct callstack using the given trace.

callstack::callstack(const callstack & other)

Trivial copy constructor.

explicit callstack::callstack(const struct_callstack * other)

Constructs a callstack object using the given struct callstack.

callstack::callstack(callstack && other)

Trivial move constructor. Only available when compiled using a compiler supporting C++11 or newer.

Destructor

callstack::~callstack()

Trivial destructor.

Operators

callstack & operator=(const callstack & other)

Trivial copy assignation operator.

callstack & operator=(callstack && other)

Trivial move assignation operator. Only available when compiled using a compiler supporting C++11 or newer.

operator struct_callstack * ()

Implicit casting operator. Returns a pointer to the underlying struct callstack.

operator const struct_callstack * () const

Implicit casting operator. Returns a pointer to the underlying struct callstack.

Clone this wiki locally