![]() |
Public API Reference |
![]() |
Helper template to retrieve an instance of some type that has not yet been used in a frame. More...
#include <cstool/framedataholder.h>
Public Member Functions | |
void | Clear (bool instaClear=false) |
Remove all allocated instances. | |
T & | GetUnusedData (bool &created, uint frameNumber) |
Retrieve an instance of the type T whose associated frame number differs from frameNumber. |
Helper template to retrieve an instance of some type that has not yet been used in a frame.
Retrieval in subsequent frames will reuse already created instances, if appropriate (that is, the associated frame number differs from the provide current frame number).
Definition at line 38 of file framedataholder.h.
void csFrameDataHolder< T >::Clear | ( | bool | instaClear = false | ) | [inline] |
Remove all allocated instances.
Definition at line 141 of file framedataholder.h.
T& csFrameDataHolder< T >::GetUnusedData | ( | bool & | created, |
uint | frameNumber | ||
) | [inline] |
Retrieve an instance of the type T whose associated frame number differs from frameNumber.
In created, it is returned whether a new instance was created (value is true) or an existing one was reused (value is false). Can be used to e.g. determine whether some initialization work can be saved.
Definition at line 97 of file framedataholder.h.