k3d::data::pointer_demand_storage< pointer_t, signal_policy_t > Class Template Reference

Read-only storage policy that stores a value by pointer, created on-demand. More...

#include <pointer_demand_storage.h>

List of all members.

Public Types

typedef boost::remove_pointer
< pointer_t >::type 
non_pointer_t
typedef pointer_demand_storage
< pointer_t, signal_policy_t > 
this_t
typedef std::vector< ihint * > pending_hints_t

Public Member Functions

void set_update_slot (const sigc::slot< void, const pending_hints_t &, non_pointer_t & > &Slot)
 Set the slot that will be called to bring the underlying data up-to-date.
sigc::slot< void, ihint * > make_slot ()
 Returns a slot that will invoke the update() method.
void reset (pointer_t NewValue=0, ihint *const Hint=0)
 Store an object as the new value, taking control of its lifetime.
void update (ihint *const Hint=0)
 Schedule an update for the value the next time it's read.
pointer_t internal_value ()
 Accesses the underlying value, creating it if it doesn't already exist.

Protected Member Functions

template<typename init_t >
 pointer_demand_storage (const init_t &Init)
 ~pointer_demand_storage ()

Private Member Functions

 BOOST_STATIC_ASSERT ((boost::is_pointer< pointer_t >::value))

Private Attributes

boost::scoped_ptr< non_pointer_tm_value
 Storage for this policy's value.
sigc::slot< void, const
pending_hints_t
&, non_pointer_t & > 
m_update_slot
 Stores a slot that will be called to bring this policy's value up-to-date.
pending_hints_t m_pending_hints
 Stores a collection of pending hints to be updated.
bool_t m_executing
 Used to prevent problems with recursion while executing.

Detailed Description

template<typename pointer_t, typename signal_policy_t>
class k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >

Read-only storage policy that stores a value by pointer, created on-demand.


Member Typedef Documentation

template<typename pointer_t , typename signal_policy_t >
typedef boost::remove_pointer<pointer_t>::type k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::non_pointer_t
template<typename pointer_t , typename signal_policy_t >
typedef std::vector<ihint*> k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::pending_hints_t
template<typename pointer_t , typename signal_policy_t >
typedef pointer_demand_storage<pointer_t, signal_policy_t> k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::this_t

Constructor & Destructor Documentation

template<typename pointer_t , typename signal_policy_t >
template<typename init_t >
k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::pointer_demand_storage ( const init_t &  Init  )  [inline, protected]
template<typename pointer_t , typename signal_policy_t >
k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::~pointer_demand_storage (  )  [inline, protected]

Member Function Documentation

template<typename pointer_t , typename signal_policy_t >
k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::BOOST_STATIC_ASSERT ( (boost::is_pointer< pointer_t >::value)   )  [private]
template<typename pointer_t , typename signal_policy_t >
pointer_t k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::internal_value (  )  [inline]
template<typename pointer_t , typename signal_policy_t >
sigc::slot<void, ihint*> k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::make_slot (  )  [inline]

Returns a slot that will invoke the update() method.

References k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::update().

template<typename pointer_t , typename signal_policy_t >
void k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::reset ( pointer_t  NewValue = 0,
ihint *const   Hint = 0 
) [inline]
template<typename pointer_t , typename signal_policy_t >
void k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::set_update_slot ( const sigc::slot< void, const pending_hints_t &, non_pointer_t & > &  Slot  )  [inline]
template<typename pointer_t , typename signal_policy_t >
void k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::update ( ihint *const   Hint = 0  )  [inline]

Member Data Documentation

template<typename pointer_t , typename signal_policy_t >
bool_t k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::m_executing [private]
template<typename pointer_t , typename signal_policy_t >
pending_hints_t k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::m_pending_hints [private]
template<typename pointer_t , typename signal_policy_t >
sigc::slot<void, const pending_hints_t&, non_pointer_t&> k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::m_update_slot [private]
template<typename pointer_t , typename signal_policy_t >
boost::scoped_ptr<non_pointer_t> k3d::data::pointer_demand_storage< pointer_t, signal_policy_t >::m_value [private]

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

Generated on Mon Mar 21 07:42:20 2011 for K-3D by doxygen 1.6.3