OpenBarnyard
 
Loading...
Searching...
No Matches
TIndexPoolResourceInterface Class Referenceabstract

#include <TIndexPoolResourceInterface.h>

Inheritance diagram for TIndexPoolResourceInterface:
TResource TObject TNodeTree< T >::TNode TIndexPoolResource

Classes

struct  LockBuffer
 

Public Member Functions

 TDECLARE_CLASS (TIndexPoolResourceInterface, TResource)
 
 TIndexPoolResourceInterface ()
 
virtual void OnDestroy () override
 
virtual TBOOL Lock (LockBuffer *a_pLockBuffer)=0
 
virtual void Unlock (TUINT16 a_uiNewNumIndices)=0
 
virtual TBOOL Create (TIndexFactoryResourceInterface *a_pFactory, TUINT16 a_uiMaxIndices, TUINT16 a_uiFlags)
 
TIndexFactoryResourceInterfaceGetFactory () const
 
TUINT16 GetFlags () const
 
TUINT16 GetMaxIndices () const
 
TUINT16 GetNumIndices () const
 
TBOOL IsLocked () const
 
- Public Member Functions inherited from TResource
 TDECLARE_CLASS (TResource, TObject)
 
 TResource ()
 
 ~TResource ()
 
virtual TBOOL Create ()
 
virtual TBOOL Validate ()
 
virtual void Invalidate ()
 
virtual void DestroyResource ()
 
virtual TBOOL TryInvalidate ()
 
virtual TBOOL TryValidate ()
 
TBOOL IsDead () const
 
TBOOL IsDying () const
 
TBOOL IsValid () const
 
TBOOL IsExternal () const
 
TBOOL IsCreated () const
 
TBOOL IsSceneObject () const
 
TBOOL IsInvalid () const
 
void SetState (TResourceState newState)
 
void AddState (TResourceState state)
 
void SetParent (TResource *a_pParent)
 
const TCHARGetName () const
 
void SetName (const TCHAR *name)
 
TBOOL RecurseSimple (t_RecurseCb a_pCallback, TResource *a_pResource, void *a_pUserData)
 
TRenderInterfaceGetRenderer () const
 
void SetRenderer (TRenderInterface *pRenderer)
 
TUINT32 GetUId () const
 
void SetUId (TUINT32 uid)
 
- Public Member Functions inherited from TObject
virtual Toshi::TClass * GetClass ()
 
virtual void Delete ()
 
virtual ~TObject ()
 
TBOOL IsExactly (TClass *a_pClass)
 
TBOOL IsA (TClass *a_pClass)
 
- Public Member Functions inherited from TNodeTree< T >::TNode
TBOOL IsChildOfDefaultRoot () const
 
TBOOL IsLinked () const
 
T * Parent () const
 
T * Next () const
 
T * Prev () const
 
TNodeTree< T > * Tree () const
 
T * Child () const
 

Protected Attributes

TIndexFactoryResourceInterfacem_pFactory
 
TUINT16 m_uiFlags
 
TUINT16 m_uiMaxIndices
 
TUINT16 m_uiNumIndices
 
TUINT16 m_uiLockCount
 
- Protected Attributes inherited from TNodeTree< T >::TNode
TNodeTree< T > * m_Tree
 
T * m_Next
 
T * m_Prev
 
T * m_Parent
 
T * m_Child
 

Additional Inherited Members

- Public Types inherited from TResource
using t_RecurseCb = TBOOL ( * )( TResource* a_pResource, void* a_pUserData )
 
- Public Types inherited from TObject
enum  { IsTObject = TTRUE }
 
- Static Public Member Functions inherited from TResource
static TBOOL Recurse (t_RecurseCb a_pCallback, TResource *a_pResource, TBOOL a_bFlag, void *a_pUserData)
 
- Static Public Member Functions inherited from TObject
static Toshi::TObject * CreateTObject ()
 
static Toshi::TObject * CreateTObjectInPlace (void *a_pPtr)
 
static void InitialiseClass ()
 
static void DeinitialiseClass ()
 
static TFORCEINLINE TClassGetClassStatic ()
 
- Public Attributes inherited from TResource
friend TRenderInterface
 
- Public Attributes inherited from TNodeTree< T >::TNode
friend TNodeTree
 
- Static Public Attributes inherited from TResource
static constexpr size_t MAXNAMELEN = 14
 
- Static Public Attributes inherited from TObject
static constexpr Toshi::TClass * PARENTCLASS = TNULL
 
static constinit Toshi::TClass ms_oClass = Toshi::TClass( "TObject", TObject::CreateTObject, TObject::CreateTObjectInPlace, TObject::InitialiseClass, TObject::DeinitialiseClass, 0, 2, sizeof( TObject ), alignof( TObject ) )
 
- Protected Member Functions inherited from TNodeTree< T >::TNode
 TNode ()
 

Detailed Description

Definition at line 7 of file TIndexPoolResourceInterface.h.

Constructor & Destructor Documentation

◆ TIndexPoolResourceInterface()

TIndexPoolResourceInterface::TIndexPoolResourceInterface ( )

Member Function Documentation

◆ Create()

TBOOL TIndexPoolResourceInterface::Create ( TIndexFactoryResourceInterface * a_pFactory,
TUINT16 a_uiMaxIndices,
TUINT16 a_uiFlags )
virtual

Reimplemented in TIndexPoolResource.

Definition at line 29 of file TIndexPoolResourceInterface.cpp.

30{
31 m_pFactory = a_pFactory;
32 m_uiMaxIndices = a_uiMaxIndices;
33 m_uiFlags = a_uiFlags;
34 return TResource::Create();
35}
virtual TBOOL Create()
Definition TResource.cpp:28

◆ GetFactory()

TIndexFactoryResourceInterface * TIndexPoolResourceInterface::GetFactory ( ) const
inline

Definition at line 27 of file TIndexPoolResourceInterface.h.

27{ return m_pFactory; }

◆ GetFlags()

TUINT16 TIndexPoolResourceInterface::GetFlags ( ) const
inline

Definition at line 28 of file TIndexPoolResourceInterface.h.

28{ return m_uiFlags; }

◆ GetMaxIndices()

TUINT16 TIndexPoolResourceInterface::GetMaxIndices ( ) const
inline

Definition at line 29 of file TIndexPoolResourceInterface.h.

29{ return m_uiMaxIndices; }

◆ GetNumIndices()

TUINT16 TIndexPoolResourceInterface::GetNumIndices ( ) const
inline

Definition at line 30 of file TIndexPoolResourceInterface.h.

30{ return m_uiNumIndices; }

◆ IsLocked()

TBOOL TIndexPoolResourceInterface::IsLocked ( ) const
inline

Definition at line 31 of file TIndexPoolResourceInterface.h.

31{ return m_uiLockCount != 0; }

◆ Lock()

virtual TBOOL TIndexPoolResourceInterface::Lock ( LockBuffer * a_pLockBuffer)
pure virtual

Implemented in TIndexPoolResource.

◆ OnDestroy()

void TIndexPoolResourceInterface::OnDestroy ( )
overridevirtual

Reimplemented from TResource.

Reimplemented in TIndexPoolResource.

Definition at line 23 of file TIndexPoolResourceInterface.cpp.

24{
25 TASSERT( 0 == m_uiLockCount );
26 m_pFactory->m_uiNumPools -= 1;
27}
#define TASSERT(X,...)
Definition Defines.h:138

◆ TDECLARE_CLASS()

TIndexPoolResourceInterface::TDECLARE_CLASS ( TIndexPoolResourceInterface ,
TResource  )

◆ Unlock()

virtual void TIndexPoolResourceInterface::Unlock ( TUINT16 a_uiNewNumIndices)
pure virtual

Implemented in TIndexPoolResource.

Member Data Documentation

◆ m_pFactory

TIndexFactoryResourceInterface* TIndexPoolResourceInterface::m_pFactory
protected

Definition at line 34 of file TIndexPoolResourceInterface.h.

◆ m_uiFlags

TUINT16 TIndexPoolResourceInterface::m_uiFlags
protected

Definition at line 35 of file TIndexPoolResourceInterface.h.

◆ m_uiLockCount

TUINT16 TIndexPoolResourceInterface::m_uiLockCount
protected

Definition at line 38 of file TIndexPoolResourceInterface.h.

◆ m_uiMaxIndices

TUINT16 TIndexPoolResourceInterface::m_uiMaxIndices
protected

Definition at line 36 of file TIndexPoolResourceInterface.h.

◆ m_uiNumIndices

TUINT16 TIndexPoolResourceInterface::m_uiNumIndices
protected

Definition at line 37 of file TIndexPoolResourceInterface.h.


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