Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berryDebugBreakpointManager.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef BERRYDEBUGBREAKPOINTMANAGER_H_
15 #define BERRYDEBUGBREAKPOINTMANAGER_H_
16 
17 #include <Poco/HashMap.h>
18 #include <set>
19 
21 
22 namespace berry {
23 
24 class Object;
25 
27 {
28 public:
29 
30  static const std::string BREAKPOINTS_XML;
31 
32  void AddSmartpointerBreakpoint(int smartPointerId, const Object* obj = nullptr);
33  void AddObjectBreakpoint(unsigned long objectTraceId);
34 
35  void RemoveSmartpointerBreakpoint(int smartPointerId);
36  void RemoveObjectBreakpoint(unsigned long objectTraceId);
37 
38  const std::set<unsigned long>& GetObjectBreakpoints() const;
39  const Poco::HashMap<int, const Object*>& GetSmartPointerBreakpoints() const;
40 
41  bool BreakAtObject(unsigned long traceId) const;
42  bool BreakAtSmartpointer(int spId) const;
43 
44  void SaveState(const QString& path) const;
45  void RestoreState(const QString& path);
46 
47 private:
48 
49  friend class DebugUtil;
50 
53 
54  static const std::string BREAKPOINTS_TAG;
55  static const std::string OBJECT_TAG;
56  static const std::string SMARTPOINTER_TAG;
57 
58  static const std::string ID_ATTR;
59  static const std::string CLASSNAME_ATTR;
60  static const std::string OBJECTID_ATTR;
61  static const std::string ENABLED_ATTR;
62 
63  std::set<unsigned long> m_ObjectBreakpoints;
64  Poco::HashMap<int, const Object*> m_SmartPointerBreakpoints;
65 };
66 
67 }
68 
69 #endif /* BERRYDEBUGBREAKPOINTMANAGER_H_ */
org_blueberry_core_runtime_Export.h
berry::DebugUtil
Definition: berryDebugUtil.h:32
berry::DebugBreakpointManager::BREAKPOINTS_XML
static const std::string BREAKPOINTS_XML
Definition: berryDebugBreakpointManager.h:30
berry::Object
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
org_blueberry_core_runtime_EXPORT
#define org_blueberry_core_runtime_EXPORT
Definition: org_blueberry_core_runtime_Export.h:26
berry::DebugBreakpointManager
Definition: berryDebugBreakpointManager.h:26
berry
Definition: QmitkPropertyItemModel.h:24