acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
referencing_debugging.h
1//
2// reference_count_debug.h
3// acme
4//
5// Created by Camilo Sasuke Thomas Borregaard Soerensen on 20/06/20.
6// More work on 2023-11-22 12:47 <3ThomasBorregaardSorensen
7//
8#pragma once
9
10
11//#include "simple_array.h"
12
13
14//#include "acme/prototype/collection/array.h"
15
16#if REFERENCING_DEBUGGING
17
18
19
20
21class reference_item_array;
22
23class refdbg
24{
25public:
26
27 static ::string new_line_quote(::string strRefrain)
28 {
29
30 ::string str;
31
32 str.append("\n");
33 str.append("\n");
34 str.append(strRefrain);
35 str.append("\n");
36 str.append("\n");
37
38 return str;
39
40
41 }
42
43
44 static ::string dash_quote(::string strRefrain)
45 {
46
47 ::string str;
48
49 str.append("---------------------------------------");
50 str.append(strRefrain);
51 str.append("-----------------------------------------------");
52
53 return str;
54
55 }
56
57};
58
59
60class CLASS_DECL_ACME referencing_debugging :
61 public refdbg
62{
63public:
64
65
66 ::critical_section m_criticalsection;
67 ::non_particle_comparable_array < reference_item_array * > m_item2a;
68 bool m_bEnable = true;
69 long long m_iCount = 0;
70
71
72 referencing_debugging();
73 ~referencing_debugging();
74
75
76 virtual void add_item_array(reference_item_array * pitema);
77 virtual bool erase_item_array(reference_item_array * pitema);
78
79
80
81 virtual void dump_pending_releases();
82
83
84};
85
86
87
88#endif // REFERENCING_DEBUGGING
89
90
91
92