Eneboo - Documentación para desarrolladores
|
00001 #ifndef _STATISTICS_H_ 00002 #define _STATISTICS_H_ 00003 00004 #include <cassert> 00005 00006 namespace Hoard { 00007 00008 class Statistics { 00009 public: 00010 Statistics (void) 00011 : _inUse (0), 00012 _allocated (0) 00013 {} 00014 00015 inline int getInUse (void) const { assert (_inUse >= 0); return _inUse; } 00016 inline int getAllocated (void) const { assert (_allocated >= 0); return _allocated; } 00017 inline void setInUse (int u) { assert (u >= 0); assert (_inUse >= 0); _inUse = u; } 00018 inline void setAllocated (int a) { assert (a >= 0); assert (_allocated >= 0); _allocated = a; } 00019 00020 private: 00021 00023 int _inUse; 00024 00026 int _allocated; 00027 }; 00028 00029 } 00030 00031 #endif