PLCnext API Documentation  22.9.0.33
StackTrace.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include <list>
9 
10 namespace Arp { namespace System { namespace Commons { namespace Runtime
11 {
12 
14 {
15 public: // typedefs
16  typedef std::list<String> Items;
17 
18 public: // construction/destruction
20  StackTrace(void) = default;
22  StackTrace(const StackTrace& arg) = default;
24  StackTrace(const StackTrace&& arg);
26  StackTrace& operator=(const StackTrace& arg) = default;
28  ~StackTrace(void) = default;
29 
30 public: // operators
31 
32 public: // static operations
33  static StackTrace GetCurrent(int skipDepth = 0);
34 
35 public: // setter/getter operations
36  const Items& GetItems(void)const;
37 
38 public: // operations
39 
40 protected: // operations
41 
42 private: // static methods
43 
44 private: // methods
45  void Create(int skipDepth);
46  void CreateLinux(int skipDepth);
47  void CreateWindows(int skipDepth);
48 
49 private: // fields
50  Items items;
51 
52 private: // static fields
53  static constexpr size_t maxDepth = 64;
54 
55 };
56 
58 // inline methods of class StackTrace
59 
60 inline const StackTrace::Items& StackTrace::GetItems(void)const
61 {
62  return this->items;
63 }
64 
65 }}}} // end of namespace Arp::System::Commons::Runtime
Definition: StackTrace.hpp:14
StackTrace(void)=default
Constructs an StackTrace_ instance.
StackTrace(const StackTrace &&arg)
Move constructor.
StackTrace & operator=(const StackTrace &arg)=default
Assignment operator.
StackTrace(const StackTrace &arg)=default
Copy constructor.
~StackTrace(void)=default
Destructs this instance and frees all resources.
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API