|
The Pedigree Project 0.1
|
#include <LazyEvaluate.h>
Collaboration diagram for LazyEvaluate< T, M, create, destroy >:Public Member Functions | |
| LazyEvaluate (const M &metadata) | |
| LazyEvaluate (M &&metadata) | |
| LazyEvaluate (T *value) | |
| LazyEvaluate (T *value, const M &metadata) | |
| LazyEvaluate (T *value, M &&metadata) | |
| bool | active () const |
| void | reset () |
| T * | get () |
| T * | operator-> () |
| T & | operator* () |
| operator bool () const | |
| operator bool () | |
| operator T* () | |
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.
|
inline |
Definition at line 43 of file LazyEvaluate.h.
|
inline |
Definition at line 45 of file LazyEvaluate.h.
|
inline |
Definition at line 46 of file LazyEvaluate.h.
|
inline |
Definition at line 49 of file LazyEvaluate.h.
|
inline |
Definition at line 50 of file LazyEvaluate.h.
|
inline |
Definition at line 51 of file LazyEvaluate.h.
|
inlinevirtual |
Definition at line 53 of file LazyEvaluate.h.
|
inline |
Definition at line 57 of file LazyEvaluate.h.
|
inline |
Definition at line 68 of file LazyEvaluate.h.
|
inline |
Definition at line 91 of file LazyEvaluate.h.
|
inline |
Definition at line 86 of file LazyEvaluate.h.
|
inline |
Definition at line 95 of file LazyEvaluate.h.
|
inline |
Definition at line 82 of file LazyEvaluate.h.
|
inline |
Definition at line 78 of file LazyEvaluate.h.
|
inline |
Definition at line 61 of file LazyEvaluate.h.
|
private |
Definition at line 103 of file LazyEvaluate.h.
|
private |
Definition at line 102 of file LazyEvaluate.h.
|
private |
Definition at line 104 of file LazyEvaluate.h.