OpenBarnyard
 
Loading...
Searching...
No Matches
TPooledString8 Class Reference

#include <TPString8.h>

Inheritance diagram for TPooledString8:
TRefCounted

Public Member Functions

TFORCEINLINE void * operator new (size_t s)
 
TFORCEINLINE void * operator new (size_t s, void *where)
 
TFORCEINLINE void operator delete (void *ptr)
 
TFORCEINLINE void operator delete (void *ptr, void *where)
 
 TPooledString8 (const TCHAR *a_szString, TPString8Pool *a_pPool, T2Allocator *a_pAllocator)
 
void Delete ()
 
const TString8GetString8 () const
 
TPString8PoolGetStringPool () const
 
TBOOL IsPooled () const
 
- Public Member Functions inherited from TRefCounted
 TRefCounted ()
 
 ~TRefCounted ()
 
TINT DecRefCount ()
 
TINT GetRefCount ()
 
TINT IncRefCount ()
 
TRefCountedoperator= (TRefCounted const &)
 

Static Public Member Functions

static void SetupFreeList (TINT a_iCapacity, TINT a_iGrowSize)
 

Static Public Attributes

static Toshi::TFreeList ms_oFreeList = Toshi::TFreeList( sizeof( Toshi::TPooledString8 ), 0, 64, "Toshi::TPooledString8" )
 

Friends

class TPString8
 

Additional Inherited Members

- Protected Attributes inherited from TRefCounted
TINT m_iRefCount
 

Detailed Description

Definition at line 23 of file TPString8.h.

Constructor & Destructor Documentation

◆ TPooledString8()

TPooledString8::TPooledString8 ( const TCHAR * a_szString,
TPString8Pool * a_pPool,
T2Allocator * a_pAllocator )
inline

Definition at line 31 of file TPString8.h.

32 : m_oString( a_szString, a_pAllocator )
33 {
34 m_pPool = a_pPool;
35 }

Member Function Documentation

◆ Delete()

void TPooledString8::Delete ( )

Definition at line 97 of file TPString8.cpp.

98{
99 if ( IsPooled() )
100 {
101 m_pPool->Remove( this );
102 m_pPool->GetAllocator()->Delete( this );
103 }
104 else
105 {
106 delete this;
107 }
108}
TBOOL IsPooled() const
Definition TPString8.h:41

◆ GetString8()

const TString8 & TPooledString8::GetString8 ( ) const
inline

Definition at line 39 of file TPString8.h.

39{ return m_oString; }

◆ GetStringPool()

TPString8Pool * TPooledString8::GetStringPool ( ) const
inline

Definition at line 40 of file TPString8.h.

40{ return m_pPool; }

◆ IsPooled()

TBOOL TPooledString8::IsPooled ( ) const
inline

Definition at line 41 of file TPString8.h.

41{ return m_pPool != TNULL; }
#define TNULL
Definition Typedefs.h:23

◆ operator delete() [1/2]

TFORCEINLINE void TPooledString8::operator delete ( void * ptr)
inline

Definition at line 26 of file TPString8.h.

◆ operator delete() [2/2]

TFORCEINLINE void TPooledString8::operator delete ( void * ptr,
void * where )
inline

Definition at line 26 of file TPString8.h.

◆ operator new() [1/2]

TFORCEINLINE void * TPooledString8::operator new ( size_t s)
inline

Definition at line 26 of file TPString8.h.

◆ operator new() [2/2]

TFORCEINLINE void * TPooledString8::operator new ( size_t s,
void * where )
inline

Definition at line 26 of file TPString8.h.

◆ SetupFreeList()

static void TPooledString8::SetupFreeList ( TINT a_iCapacity,
TINT a_iGrowSize )
inlinestatic

Definition at line 26 of file TPString8.h.

Friends And Related Symbol Documentation

◆ TPString8

friend class TPString8
friend

Definition at line 28 of file TPString8.h.

Member Data Documentation

◆ ms_oFreeList

Toshi::TFreeList TPooledString8::ms_oFreeList = Toshi::TFreeList( sizeof( Toshi::TPooledString8 ), 0, 64, "Toshi::TPooledString8" )
static

Definition at line 26 of file TPString8.h.


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