#include <TResource.h>
Definition at line 19 of file TResource.h.
◆ t_RecurseCb
◆ TResource()
Definition at line 15 of file TResource.cpp.
16{
17 m_State = 0;
18 m_UId = 0;
20 m_Name[ 0 ] = 0;
21}
◆ ~TResource()
TResource::~TResource |
( |
| ) |
|
◆ AddState()
◆ Create()
TBOOL TResource::Create |
( |
| ) |
|
|
virtual |
◆ DestroyResource()
void TResource::DestroyResource |
( |
| ) |
|
|
virtual |
Definition at line 52 of file TResource.cpp.
53{
55}
void DestroyResource(TResource *resource)
TRenderInterface * GetRenderer() const
◆ GetName()
const TCHAR * TResource::GetName |
( |
| ) |
const |
|
inline |
◆ GetRenderer()
Toshi::TRenderInterface * TResource::GetRenderer |
( |
| ) |
const |
◆ GetUId()
TUINT32 TResource::GetUId |
( |
| ) |
const |
◆ Invalidate()
void TResource::Invalidate |
( |
| ) |
|
|
virtual |
◆ IsCreated()
TBOOL TResource::IsCreated |
( |
| ) |
const |
|
inline |
◆ IsDead()
TBOOL TResource::IsDead |
( |
| ) |
const |
|
inline |
◆ IsDying()
TBOOL TResource::IsDying |
( |
| ) |
const |
|
inline |
◆ IsExternal()
TBOOL TResource::IsExternal |
( |
| ) |
const |
|
inline |
Definition at line 45 of file TResource.h.
@ TResourceState_External
◆ IsInvalid()
TBOOL TResource::IsInvalid |
( |
| ) |
const |
|
inline |
◆ IsSceneObject()
TBOOL TResource::IsSceneObject |
( |
| ) |
const |
|
inline |
Definition at line 47 of file TResource.h.
@ TResourceState_SceneObject
◆ IsValid()
TBOOL TResource::IsValid |
( |
| ) |
const |
|
inline |
◆ OnDestroy()
void TResource::OnDestroy |
( |
| ) |
|
|
virtual |
◆ Recurse()
Definition at line 117 of file TResource.cpp.
118{
120
121 if (
TNULL != a_pResource )
122 {
124
125 do
126 {
127 pNext = pRes->
Next();
128
129 if ( pNext == a_pResource || pNext == pRes || !a_bFlag )
131
132 if ( !a_pCallback( pRes, a_pUserData ) )
134
137
138 pRes = pNext;
139
140 }
while ( pNext !=
TNULL );
141 }
142
144}
static TBOOL Recurse(t_RecurseCb a_pCallback, TResource *a_pResource, TBOOL a_bFlag, void *a_pUserData)
◆ RecurseSimple()
Definition at line 109 of file TResource.cpp.
110{
111 if ( a_pResource )
112 return Recurse( a_pCallback, a_pResource,
TFALSE, a_pUserData );
113 else
115}
◆ SetName()
void TResource::SetName |
( |
const TCHAR * | name | ) |
|
Definition at line 94 of file TResource.cpp.
95{
96
98 {
99 name = "res:";
100
103 }
104
107}
static constexpr size_t MAXNAMELEN
static void IntToString(TINT value, TCHAR *dst, TINT unused, TINT radix)
static TSIZE String8Length(const TCHAR *str)
static TCHAR * String8Copy(TCHAR *dst, const TCHAR *src, TSIZE size=-1)
◆ SetParent()
void TResource::SetParent |
( |
TResource * | a_pParent | ) |
|
Definition at line 75 of file TResource.cpp.
76{
77 auto pTree = TNode::Tree();
78
79 pTree->Remove( this );
80
81 if ( !a_pParent )
82 {
83 if ( pTree )
84 {
85 pTree->InsertAtRoot( this );
86 }
87 }
88 else
89 {
90 pTree->Insert( a_pParent, this );
91 }
92}
◆ SetRenderer()
Definition at line 151 of file TResource.cpp.
152{
153 m_pRenderer = pRenderer;
154}
◆ SetState()
Definition at line 50 of file TResource.h.
50{ m_State = newState; }
◆ SetUId()
void TResource::SetUId |
( |
TUINT32 | uid | ) |
|
◆ TDECLARE_CLASS()
◆ TryInvalidate()
TBOOL TResource::TryInvalidate |
( |
| ) |
|
|
virtual |
◆ TryValidate()
TBOOL TResource::TryValidate |
( |
| ) |
|
|
virtual |
◆ Validate()
TBOOL TResource::Validate |
( |
| ) |
|
|
virtual |
◆ MAXNAMELEN
size_t TResource::MAXNAMELEN = 14 |
|
staticconstexpr |
◆ TRenderInterface
friend TResource::TRenderInterface |
The documentation for this class was generated from the following files:
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Render/TResource.h
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Render/TResource.cpp