|
| BackgroundLoader (ResourceCache *owner) |
| Construct.
|
|
| ~BackgroundLoader () override |
| Destruct. Forcibly clear the load queue.
|
|
void | ThreadFunction () override |
| Resource background loading loop. More...
|
|
bool | QueueResource (StringHash type, const String &name, bool sendEventOnFailure, Resource *caller) |
| Queue loading of a resource. The name must be sanitated to ensure consistent format. Return true if queued (not a duplicate and resource was a known type).
|
|
void | WaitForResource (StringHash type, StringHash nameHash) |
| Wait and finish possible loading of a resource when being requested from the cache.
|
|
void | FinishResources (int maxMs) |
| Process resources that are ready to finish.
|
|
unsigned | GetNumQueuedResources () const |
| Return amount of resources in the load queue.
|
|
| RefCounted () |
| Construct. Allocate the reference count structure and set an initial self weak reference.
|
|
virtual | ~RefCounted () |
| Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
|
|
| RefCounted (const RefCounted &rhs)=delete |
| Prevent copy construction.
|
|
RefCounted & | operator= (const RefCounted &rhs)=delete |
| Prevent assignment.
|
|
void | AddRef () |
|
void | ReleaseRef () |
|
int | Refs () const |
|
int | WeakRefs () const |
|
RefCount * | RefCountPtr () |
| Return pointer to the reference count structure.
|
|
| Thread () |
| Construct. Does not start the thread yet.
|
|
virtual | ~Thread () |
| Destruct. If running, stop and wait for thread to finish.
|
|
virtual void | ThreadFunction ()=0 |
| The function to run in the thread. More...
|
|
bool | Run () |
| Start running the thread. Return true if successful, or false if already running or if can not create the thread.
|
|
void | Stop () |
| Set the running flag to false and wait for the thread to finish.
|
|
void | SetPriority (int priority) |
| Set thread priority. The thread must have been started first.
|
|
bool | IsStarted () const |
| Return whether thread exists.
|
|
Background loader of resources. Owned by the ResourceCache.