|
| BackgroundLoader (ResourceCache *owner) |
| Construct.
|
|
| ~BackgroundLoader () override |
| Destruct. Forcibly clear the load queue.
|
|
void | ThreadFunction () override |
| Resource background loading loop.
|
|
bool | QueueResource (StringHash type, const ea::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.
|
|
int | AddRef () |
|
int | ReleaseRef () |
|
int | Refs () const |
|
int | WeakRefs () const |
|
RefCount * | RefCountPtr () const |
| Return pointer to the reference count structure.
|
|
bool | HasScriptObject () const |
| Return true if script runtime object wrapping this native object exists.
|
|
bool | IsScriptStrongRef () const |
| Return true if script reference is strong.
|
|
| Thread (const ea::string &name=EMPTY_STRING) |
| Construct. Does not start the thread yet.
|
|
virtual | ~Thread () |
| Destruct. If running, stop and wait for thread to finish.
|
|
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.
|
|
void | SetName (const ea::string &name) |
| Set name of the platform thread on supported platforms. Must be called before Run().
|
|
Background loader of resources. Owned by the ResourceCache.