PObjectMonitoring.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PapillonCommon.h>
17 #include <PRtti.h>
18 
19 PAPILLON_BEGIN_NAMESPACE
20 
21 class PProperties;
22 
28 class PAPILLON_API_CORE PObjectMonitoring
29 {
30 public:
31  static PObjectMonitoring& GetInstance();
32  int32 CountInstance(classid classId);
33  const char* GetClassNameFromClassId(classid classId);
34  void LogObjectCounters(int32 topN = -1);
35 
57  void StartMonitoring(const PProperties& parameters);
58  void StopMonitoring();
59 
60  friend class PObjectImpl;
61 
64 
65 private:
66  PObjectMonitoring(const PObjectMonitoring&); // forbidden
67  void RegisterAllPapillonClasses();
68  void RegisterClass(classid classId, const std::string& className);
69  void IncrementObjectCounter(classid classId);
70  void DecrementObjectCounter(classid classId);
71 
72 public:
73  void* m_data;
74 };
75 
76 PAPILLON_END_NAMESPACE
The PObjectMonitoring class represents a singleton used to monitor Papillon Core. ...
Papillon Run-Time Type Information.
The PProperties class represents a container of properties; each property has a name (PString) and a ...
Definition: PProperties.h:38
PAPILLON_BEGIN_NAMESPACE typedef uint16_t classid
Definition: PRtti.h:21