Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::util::LazyValue< T, PtrT, Cleanup > Class Template Reference

Inheritance diagram for ONE::util::LazyValue< T, PtrT, Cleanup >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
class ONE::util::LazyValue< T, PtrT, Cleanup >

a value that will not be created until it is actually used

The value is created the first time get is called. This template holds a Creator that is used to initialize the value. The creator is destroyed after its first use. Lazy instantiation may be circumvented by using this template's PtrT constructor.
By default, lazy values perform no cleanup. However, this behavior may be controlled through the Cleanup policy.

Parameters:
T the used type
PtrT the pointer type used for T. Usually either T* or SmartPointer<T>.
Cleanup the cleanup policy
Author:
Daniel Seibert


Public Types

typedef Creator< T, PtrT > CreatorT

Public Member Functions

PtrT get ()
 LazyValue (CreatorT *c)
 LazyValue (PtrT v)
void setValue (CreatorT *crt)
void setValue (const PtrT &val)
 ~LazyValue ()


Member Typedef Documentation

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
typedef Creator<T,PtrT> ONE::util::LazyValue< T, PtrT, Cleanup >::CreatorT
 


Constructor & Destructor Documentation

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
ONE::util::LazyValue< T, PtrT, Cleanup >::LazyValue PtrT  v  )  [inline]
 

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
ONE::util::LazyValue< T, PtrT, Cleanup >::LazyValue CreatorT c  )  [inline]
 

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
ONE::util::LazyValue< T, PtrT, Cleanup >::~LazyValue  )  [inline]
 


Member Function Documentation

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
PtrT ONE::util::LazyValue< T, PtrT, Cleanup >::get  )  [inline]
 

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
void ONE::util::LazyValue< T, PtrT, Cleanup >::setValue CreatorT crt  )  [inline]
 

template<typename T, typename PtrT, typename Cleanup = NoCleanup>
void ONE::util::LazyValue< T, PtrT, Cleanup >::setValue const PtrT &  val  )  [inline]
 


Generated on Wed Sep 7 19:03:32 2005 for ONEngine by  doxygen 1.4.3