1 #ifndef CORE_MemoryStack_H
2 #define CORE_MemoryStack_H
113 std::stringstream cstr;
115 cstr<<
"registered objects:"<<std::endl;
120 [&](
const auto& obj) {
121 cstr<<
"\t"<<obj.first<<
"->"<<obj.second->getIdentityString();
125 cstr<<
"number of registered objects :"<<n<<std::endl;
CORE_MemoryStack is the class to register all the created classes to detect not destroyed classes.
Definition: CORE_MemoryStack.h:13
void unregisterClass(const T *obj)
unregister the object
Definition: CORE_MemoryStack.h:88
tMemSize getContentsMemorySize() const
return the memory size of the included associations
Definition: CORE_MemoryStack.h:73
void registerClass(const T *obj)
register the object
Definition: CORE_MemoryStack.h:80
std::string toString() const
print all the registred classes
Definition: CORE_MemoryStack.h:112
tMemSize getMemorySize() const
return the memory size in byte
Definition: CORE_MemoryStack.h:62
CORE_MemoryStack()
build an instance of the object
Definition: CORE_MemoryStack.h:36
tIndex getRegistredClassesNumber() const
retunr the number of registred elements
Definition: CORE_MemoryStack.h:103
std::map< std::string, const T * > mObjects
Definition: CORE_MemoryStack.h:28
virtual ~CORE_MemoryStack()
destroy the instance of object
Definition: CORE_MemoryStack.h:42
#define ASSERT_IN(a)
Definition: functions.h:601
tString pointerToString(const T *ptr)
return the pointer of the class as a string
Definition: functions.h:183
#define tIndex
Definition: types.h:157
#define tString
Definition: types.h:147
#define tMemSize
Definition: types.h:166
#define tInteger
Definition: types.h:114