PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | List of all members
Arp::Base::Commons::Runtime::StackCounter Class Reference

This class is used to count sequenced operation calls, which are e.g. invoked during an exception throw. More...

#include <StackCounter.hpp>

Public Types

using Value = size_t
 

Public Member Functions

 StackCounter (const StackCounter &arg)
 Default copy constructor.
 
 StackCounter (StackCounter &&arg) noexcept=delete
 
StackCounteroperator= (const StackCounter &arg)
 Default copy-assignment operator.
 
StackCounteroperator= (StackCounter &&arg) noexcept=delete
 
 ~StackCounter (void)
 Default destructor.
 
 StackCounter (Value initialDepth=1)
 Constructs an StackCounter instance. More...
 
size_t GetDepth (void) const
 Gets the depth of the stack counter. More...
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 

Detailed Description

This class is used to count sequenced operation calls, which are e.g. invoked during an exception throw.

This helper class determines the number of operation calls, which are invoked during an exception throw, so that the needless operations might be skipped, when creating the stacktrace information of the exception. The user is just interested in the stacktrace of its own code, but not any platform code, which is required to create the exception and its content.

Constructor & Destructor Documentation

◆ StackCounter()

Arp::Base::Commons::Runtime::StackCounter::StackCounter ( Value  initialDepth = 1)
explicit

Constructs an StackCounter instance.

Parameters
initialDepthThe inital depth of the stack counter.

Member Function Documentation

◆ GetDepth()

StackCounter::Value Arp::Base::Commons::Runtime::StackCounter::GetDepth ( void  ) const

Gets the depth of the stack counter.

Returns
The depth of the stack counter.

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