acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
reference_item_array.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#if REFERENCING_DEBUGGING
12
13
14class reference_item;
15class referencing_debugging;
16
17
18class CLASS_DECL_ACME reference_item_array
19{
20public:
21
22
23 ::reference_item_array * m_preferenceitemarrayParent = nullptr;
24 long long m_iSerial;
25 int m_iStep;
26 ::subparticle* m_psubparticle;
27 ::subparticle* m_psubparticleParent;
28 bool m_bFirstAllocationInformation = false;
29 ::string m_strFirstAllocation;
30 ::string m_strDebug;
31 bool m_bFirstReference;
32 ::iptr m_iLastReferenceCount;
33 ::non_particle_comparable_array < reference_item * > m_itema;
34 ::non_particle_comparable_array < reference_item_array * > m_item2a;
35
36
37 reference_item_array(::subparticle * psubparticle, ::subparticle * psubparticleParent);
38 ~reference_item_array();
39
40
41// virtual void initialize_reference_item_array(::referencing_debugging * preferencingdebugging);
42
43 virtual void add_item_array(reference_item_array * pitema);
44 virtual bool erase_item_array(reference_item_array * pitema);
45
46
47
48 virtual void add_item(bool bIncludeCallStackTrace = false);
49 virtual void add_referer(::reference_referer * preferer, bool bIncludeCallStackTrace = false);
50
51
52 virtual ::collection::index find_item(reference_referer * preferer);
53
54
55 virtual bool erase_item();
56
57
58 virtual bool replace_item(reference_item * preferenceitem);
59
60
61 virtual void dump_pending_releases(::string & strDump);
62
63
64 void * operator new(size_t s)
65 {
66
67 return ::malloc(s);
68
69 }
70 void operator delete(void *p)
71 {
72
73 return ::free(p);
74
75 }
76
77};
78
79
80#endif // REFERENCING_DEBUGGING
81