A thread specific collection of double-buffered and algorithm specific resources. More...
#include <doublebufferedresource.h>
Public Member Functions | |
ThreadSpecificStorage (FrameScheduler *Scheduler_) | |
A constructor that automatically creates the resources it supports. | |
virtual | ~ThreadSpecificStorage () |
Deletes all the resources. | |
MaxInt | GetCurrentFrameStart () const |
When did this frame start? More... | |
FrameScheduler * | GetFrameScheduler () |
Get a pointer to the FrameScheduler that owns this resource. More... | |
Whole | GetLastFrameTime () const |
How long was the previous frame? More... | |
Whole | GetLastPauseTime () const |
How long was the pause, if any, last frame? More... | |
template<typename DBR > | |
DBR & | GetResource (const Whole &ResourceID) |
Get a Specific kind of double buffered resource. More... | |
Logger & | GetUsableLogger () |
Get the usable logger for this thread specific resource. More... | |
void | SwapAllBufferedResources () |
The commitable and usable version of every double buffered resource for this thread specific storage will be swapped. | |
A thread specific collection of double-buffered and algorithm specific resources.
This class is intended to be expanded via derived classes if it is to return extra resource types
Definition at line 145 of file doublebufferedresource.h.
MaxInt Mezzanine::Threading::ThreadSpecificStorage::GetCurrentFrameStart | ( | ) | const |
When did this frame start?
Definition at line 73 of file doublebufferedresource.cpp.
FrameScheduler * Mezzanine::Threading::ThreadSpecificStorage::GetFrameScheduler | ( | ) |
Get a pointer to the FrameScheduler that owns this resource.
This is not required very often by application code, but is used in places in this scheduler library. This is primarily used to gain access to commitable parts of double buffered resources. This pointer does not confer ownership.
Definition at line 64 of file doublebufferedresource.cpp.
Whole Mezzanine::Threading::ThreadSpecificStorage::GetLastFrameTime | ( | ) | const |
How long was the previous frame?
Definition at line 67 of file doublebufferedresource.cpp.
Whole Mezzanine::Threading::ThreadSpecificStorage::GetLastPauseTime | ( | ) | const |
How long was the pause, if any, last frame?
Definition at line 70 of file doublebufferedresource.cpp.
|
inline |
Get a Specific kind of double buffered resource.
ResourceID | The ID the resource provided. |
Definition at line 162 of file doublebufferedresource.h.
Logger & Mezzanine::Threading::ThreadSpecificStorage::GetUsableLogger | ( | ) |
Get the usable logger for this thread specific resource.
Definition at line 61 of file doublebufferedresource.cpp.