Panda3D
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
pallocator_single< Type > Class Template Reference

This is our own Panda specialization on the default STL allocator. More...

#include "pallocator.h"

Inheritance diagram for pallocator_single< Type >:

Classes

struct  rebind
 

Public Types

typedef const Type * const_pointer
 
typedef const Type & const_reference
 
typedef Type * pointer
 
typedef Type & reference
 
typedef std::allocator< Type >::size_type size_type
 

Public Member Functions

template<class U >
 pallocator_single (const pallocator_single< U > &copy) noexcept
 
 pallocator_single (TypeHandle type_handle) noexcept
 
Type * allocate (size_type n, const void *hint=0)
 
void deallocate (Type *p, size_type n)
 

Public Attributes

TypeHandle _type_handle
 

Detailed Description

template<class Type>
class pallocator_single< Type >

This is our own Panda specialization on the default STL allocator.

Its main purpose is to call the hooks for MemoryUsage to properly track STL- allocated memory.

pvector, pmap, etc. are all defined in this directory to use a pallocator.

pallocator actually comes it two flavors now: pallocator_single, which can only allocate single instances of an object, and pallocator_array, which can allocate arrays of objects.

Definition at line 45 of file pallocator.h.

Member Typedef Documentation

◆ const_pointer

template<class Type >
typedef const Type* pallocator_single< Type >::const_pointer

Definition at line 51 of file pallocator.h.

◆ const_reference

template<class Type >
typedef const Type& pallocator_single< Type >::const_reference

Definition at line 52 of file pallocator.h.

◆ pointer

template<class Type >
typedef Type* pallocator_single< Type >::pointer

Definition at line 49 of file pallocator.h.

◆ reference

template<class Type >
typedef Type& pallocator_single< Type >::reference

Definition at line 50 of file pallocator.h.

◆ size_type

template<class Type >
typedef std::allocator<Type>::size_type pallocator_single< Type >::size_type

Definition at line 53 of file pallocator.h.

Constructor & Destructor Documentation

◆ pallocator_single()

template<class Type >
template<class U >
pallocator_single< Type >::pallocator_single ( const pallocator_single< U > & copy)
inlinenoexcept

Definition at line 59 of file pallocator.h.

Member Data Documentation

◆ _type_handle

template<class Type >
TypeHandle pallocator_single< Type >::_type_handle

Definition at line 70 of file pallocator.h.


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