The Pedigree Project
0.1
|
#include <LazyEvaluate.h>
Private Member Functions | |
NOT_COPYABLE_OR_ASSIGNABLE (LazyEvaluate) | |
Private Attributes | |
M | m_Metadata |
T * | m_Field |
bool | m_Ok |
LazyEvaluate offers a way to defer potentially-expensive evaluation to the time at which the result of the evaluation is needed. This can allow for reduced memory usage and better performance, especially in cases where many objects are available for evaluation but only a few actually become evaluated.
[in] | T | the result type of the evaluation |
[in] | M | type for metadata to be passed to creation function |
[in] | create | a function that performs evaluation based on the given metadata |
[in] | destroy | a function that cleans up an evaluation if needed |
Definition at line 40 of file LazyEvaluate.h.