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