00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MEMORYUSAGEPOINTERCOUNTS_H
00020 #define MEMORYUSAGEPOINTERCOUNTS_H
00021
00022 #include "pandabase.h"
00023
00024 #ifdef DO_MEMORY_USAGE
00025
00026 class MemoryInfo;
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class MemoryUsagePointerCounts {
00037 public:
00038 INLINE MemoryUsagePointerCounts();
00039 INLINE MemoryUsagePointerCounts(const MemoryUsagePointerCounts ©);
00040 INLINE void operator = (const MemoryUsagePointerCounts ©);
00041
00042 INLINE void clear();
00043 void add_info(MemoryInfo &info);
00044 void output(ostream &out) const;
00045
00046 INLINE bool is_size_unknown() const;
00047 INLINE size_t get_size() const;
00048 INLINE int get_count() const;
00049
00050 INLINE bool operator < (const MemoryUsagePointerCounts &other) const;
00051
00052 private:
00053 static void output_bytes(ostream &out, size_t size);
00054
00055 private:
00056 int _count;
00057 int _unknown_size_count;
00058 size_t _size;
00059 };
00060
00061 INLINE ostream &operator << (ostream &out, const MemoryUsagePointerCounts &c);
00062
00063 #include "memoryUsagePointerCounts.I"
00064
00065 #endif // DO_MEMORY_USAGE
00066
00067 #endif
00068