NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
tinyxml2::MemPoolT< ITEM_SIZE > Class Template Reference

#include <tinyxml2.h>

Inheritance diagram for tinyxml2::MemPoolT< ITEM_SIZE >:
Collaboration diagram for tinyxml2::MemPoolT< ITEM_SIZE >:

Classes

struct  Block
 
union  Item
 

Public Types

enum  { ITEMS_PER_BLOCK = (4 * 1024) / ITEM_SIZE }
 

Public Member Functions

 MemPoolT ()
 
 ~MemPoolT ()
 
void Clear ()
 
virtual int ItemSize () const
 
int CurrentAllocs () const
 
virtual void * Alloc ()
 
virtual void Free (void *mem)
 
void Trace (const char *name)
 
void SetTracked ()
 
int Untracked () const
 
- Public Member Functions inherited from tinyxml2::MemPool
 MemPool ()
 
virtual ~MemPool ()
 
virtual int ItemSize () const =0
 
virtual void * Alloc ()=0
 
virtual void Free (void *)=0
 
virtual void SetTracked ()=0
 

Private Member Functions

 MemPoolT (const MemPoolT &)
 
void operator= (const MemPoolT &)
 

Private Attributes

DynArray< Block *, 10 > _blockPtrs
 
Item_root
 
int _currentAllocs
 
int _nAllocs
 
int _maxAllocs
 
int _nUntracked
 

Detailed Description

template<int ITEM_SIZE>
class tinyxml2::MemPoolT< ITEM_SIZE >

Definition at line 347 of file tinyxml2.h.

Member Enumeration Documentation

◆ anonymous enum

template<int ITEM_SIZE>
anonymous enum
Enumerator
ITEMS_PER_BLOCK 

Definition at line 438 of file tinyxml2.h.

Constructor & Destructor Documentation

◆ MemPoolT() [1/2]

template<int ITEM_SIZE>
tinyxml2::MemPoolT< ITEM_SIZE >::MemPoolT ( )
inline

Definition at line 350 of file tinyxml2.h.

◆ ~MemPoolT()

template<int ITEM_SIZE>
tinyxml2::MemPoolT< ITEM_SIZE >::~MemPoolT ( )
inline

Definition at line 351 of file tinyxml2.h.

References tinyxml2::MemPoolT< ITEM_SIZE >::Clear().

Here is the call graph for this function:

◆ MemPoolT() [2/2]

template<int ITEM_SIZE>
tinyxml2::MemPoolT< ITEM_SIZE >::MemPoolT ( const MemPoolT< ITEM_SIZE > &  )
private

Member Function Documentation

◆ Alloc()

◆ Clear()

◆ CurrentAllocs()

template<int ITEM_SIZE>
int tinyxml2::MemPoolT< ITEM_SIZE >::CurrentAllocs ( ) const
inline

Definition at line 371 of file tinyxml2.h.

References tinyxml2::MemPoolT< ITEM_SIZE >::_currentAllocs.

◆ Free()

template<int ITEM_SIZE>
virtual void tinyxml2::MemPoolT< ITEM_SIZE >::Free ( void *  mem)
inlinevirtual

◆ ItemSize()

template<int ITEM_SIZE>
virtual int tinyxml2::MemPoolT< ITEM_SIZE >::ItemSize ( ) const
inlinevirtual

Implements tinyxml2::MemPool.

Definition at line 368 of file tinyxml2.h.

Referenced by tinyxml2::XMLDocument::CreateUnlinkedNode().

◆ operator=()

template<int ITEM_SIZE>
void tinyxml2::MemPoolT< ITEM_SIZE >::operator= ( const MemPoolT< ITEM_SIZE > &  )
private

◆ SetTracked()

template<int ITEM_SIZE>
void tinyxml2::MemPoolT< ITEM_SIZE >::SetTracked ( )
inlinevirtual

Implements tinyxml2::MemPool.

Definition at line 419 of file tinyxml2.h.

References tinyxml2::MemPoolT< ITEM_SIZE >::_nUntracked.

◆ Trace()

◆ Untracked()

template<int ITEM_SIZE>
int tinyxml2::MemPoolT< ITEM_SIZE >::Untracked ( ) const
inline

Definition at line 423 of file tinyxml2.h.

References tinyxml2::MemPoolT< ITEM_SIZE >::_nUntracked.

Member Data Documentation

◆ _blockPtrs

template<int ITEM_SIZE>
DynArray< Block*, 10 > tinyxml2::MemPoolT< ITEM_SIZE >::_blockPtrs
private

◆ _currentAllocs

◆ _maxAllocs

template<int ITEM_SIZE>
int tinyxml2::MemPoolT< ITEM_SIZE >::_maxAllocs
private

◆ _nAllocs

template<int ITEM_SIZE>
int tinyxml2::MemPoolT< ITEM_SIZE >::_nAllocs
private

◆ _nUntracked

◆ _root

template<int ITEM_SIZE>
Item* tinyxml2::MemPoolT< ITEM_SIZE >::_root
private

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