cached_value< T > Class Template Reference

#include <cached_value.h>

Public Types

typedef T value_type

Public Member Functions

 cached_value ()
value_type const get () const
 return the cached value
bool cached () const
 return true if a value is cached
value_type const reset (value_type const &val)
 set the contained value

Private Attributes

value_type value
 the cached value
bool set
 is the value valid?

Detailed Description

template<class T>
class cached_value< T >

Hold a single value, returning a cached value if there is one.

Definition at line 20 of file cached_value.h.


Member Typedef Documentation

template<class T>
typedef T cached_value< T >::value_type

Definition at line 25 of file cached_value.h.


Constructor & Destructor Documentation

template<class T>
cached_value< T >::cached_value (  )  [inline]

Definition at line 23 of file cached_value.h.


Member Function Documentation

template<class T>
bool cached_value< T >::cached (  )  const [inline]

return true if a value is cached

Definition at line 35 of file cached_value.h.

Referenced by op_bfd::has_debug_info().

Here is the caller graph for this function:

template<class T>
value_type const cached_value< T >::get (  )  const [inline]

return the cached value

Definition at line 28 of file cached_value.h.

Referenced by op_bfd::has_debug_info().

Here is the caller graph for this function:

template<class T>
value_type const cached_value< T >::reset ( value_type const &  val  )  [inline]

set the contained value

Definition at line 38 of file cached_value.h.

Referenced by op_bfd::has_debug_info().

Here is the caller graph for this function:


Field Documentation

template<class T>
bool cached_value< T >::set [private]

is the value valid?

Definition at line 48 of file cached_value.h.

template<class T>
value_type cached_value< T >::value [private]

the cached value

Definition at line 46 of file cached_value.h.

Referenced by cached_value< bool >::get(), and cached_value< bool >::reset().


The documentation for this class was generated from the following file:

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1