Panda3D
Public Member Functions | List of all members
MemoryUsagePointerCounts Class Reference

This is a supporting class for MemoryUsage. More...

#include "memoryUsagePointerCounts.h"

Public Member Functions

 MemoryUsagePointerCounts (const MemoryUsagePointerCounts &copy)
 
void add_info (MemoryInfo *info)
 Adds a pointer definition to the counter. More...
 
void clear ()
 Resets the counter to empty. More...
 
int get_count () const
 Returns the total number of pointers in the count. More...
 
size_t get_size () const
 Returns the total allocated size of all pointers in the count whose size is known. More...
 
bool is_size_unknown () const
 Returns true if none of the pointers in the count have a known size, or false if at least one of them does. More...
 
bool operator< (const MemoryUsagePointerCounts &other) const
 
void operator= (const MemoryUsagePointerCounts &copy)
 
void output (std::ostream &out) const
 

Detailed Description

This is a supporting class for MemoryUsage.

It tracks the relative counts of a number of pointers of some type (or age), for use by TypeHistogram and AgeHistogram. It's not exported from the DLL, and it doesn't even exist if we're compiling NDEBUG.

Definition at line 27 of file memoryUsagePointerCounts.h.

Member Function Documentation

◆ add_info()

void MemoryUsagePointerCounts::add_info ( MemoryInfo *  info)

Adds a pointer definition to the counter.

Definition at line 21 of file memoryUsagePointerCounts.cxx.

◆ clear()

void MemoryUsagePointerCounts::clear ( )
inline

Resets the counter to empty.

Definition at line 49 of file memoryUsagePointerCounts.I.

◆ get_count()

int MemoryUsagePointerCounts::get_count ( ) const
inline

Returns the total number of pointers in the count.

Definition at line 77 of file memoryUsagePointerCounts.I.

◆ get_size()

size_t MemoryUsagePointerCounts::get_size ( ) const
inline

Returns the total allocated size of all pointers in the count whose size is known.

Definition at line 69 of file memoryUsagePointerCounts.I.

◆ is_size_unknown()

bool MemoryUsagePointerCounts::is_size_unknown ( ) const
inline

Returns true if none of the pointers in the count have a known size, or false if at least one of them does.

Definition at line 60 of file memoryUsagePointerCounts.I.


The documentation for this class was generated from the following files: