PLCnext API Documentation 25.0.2.69
StackCounter.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8
9namespace Arp::Base::Commons::Runtime
10{
11
19class ARP_EXPORT StackCounter
20{
21public: // Impl forward declaration
22 class Impl;
23
24public: // usings
25 using Value = size_t;
26
27public: // canonical construction/destruction/assignment
29 StackCounter(StackCounter&& arg)noexcept = delete;
31 StackCounter& operator=(StackCounter&& arg)noexcept = delete;
33
34public: // construction
35 explicit StackCounter(Value initialDepth = 1);
36
37public: // setter/getter operations
38 size_t GetDepth(void)const;
39
40public: // internal operations
41 Impl& GetImpl(void);
42 const Impl& GetImpl(void)const;
43
44private: // Impl usings
46
47private: // Impl fields
48 Pimpl pimpl;
49};
50
51} // end of namespace Arp::Base::Commons::Runtime
This class is used to count sequenced operation calls, which are e.g. invoked during an exception thr...
Definition: StackCounter.hpp:20
StackCounter & operator=(const StackCounter &arg)
Default copy-assignment operator.
~StackCounter(void)
Default destructor.
StackCounter(const StackCounter &arg)
Default copy constructor.
Adapter class to implement PImpl idiom.
Definition: PimplPtr.hxx:15