k3d::data::with_undo< value_t, storage_policy_t > Class Template Reference

Undo policy for data containers that stores state changes for undo/redo. More...

#include <data.h>

List of all members.

Public Member Functions

bool ready_to_record ()
 Returns true iff the next write to the underlying storage will generate undo/redo data (useful if you need to perform additional undo/redo related operations, such as creating a signal connection).
istate_recorderstate_recorder ()
 Returns the state recorder for storing undo/redo data.

Protected Types

typedef with_undo< value_t,
storage_policy_t > 
this_t

Protected Member Functions

template<typename init_t >
 with_undo (const init_t &Init)
void internal_set_value (const value_t &Value, ihint *const Hint)
 This little bit of magic makes it possible for base classes (such as node_storage) to update their own values while observing the correct undo policy.
void set_value (const value_t &Value, ihint *const Hint=0)

Private Member Functions

void on_recording_done ()
 Called by the signal system once undo/redo recording is complete, so we can record our final value for redo purposes.

Private Attributes

istate_recorderm_state_recorder
 Central location where undo/redo data is stored.
bool m_changes
 Set to true iff the underlying data has changed during undo/redo recording.

Detailed Description

template<typename value_t, class storage_policy_t>
class k3d::data::with_undo< value_t, storage_policy_t >

Undo policy for data containers that stores state changes for undo/redo.


Member Typedef Documentation

template<typename value_t , class storage_policy_t >
typedef with_undo<value_t, storage_policy_t> k3d::data::with_undo< value_t, storage_policy_t >::this_t [protected]

Constructor & Destructor Documentation

template<typename value_t , class storage_policy_t >
template<typename init_t >
k3d::data::with_undo< value_t, storage_policy_t >::with_undo ( const init_t &  Init  )  [inline, protected]

Member Function Documentation

template<typename value_t , class storage_policy_t >
void k3d::data::with_undo< value_t, storage_policy_t >::internal_set_value ( const value_t &  Value,
ihint *const   Hint 
) [inline, protected]

This little bit of magic makes it possible for base classes (such as node_storage) to update their own values while observing the correct undo policy.

References k3d::data::with_undo< value_t, storage_policy_t >::set_value().

template<typename value_t , class storage_policy_t >
void k3d::data::with_undo< value_t, storage_policy_t >::on_recording_done (  )  [inline, private]

Called by the signal system once undo/redo recording is complete, so we can record our final value for redo purposes.

References k3d::istate_recorder::current_change_set(), k3d::data::with_undo< value_t, storage_policy_t >::m_changes, and k3d::data::with_undo< value_t, storage_policy_t >::m_state_recorder.

Referenced by k3d::data::with_undo< value_t, storage_policy_t >::set_value().

template<typename value_t , class storage_policy_t >
bool k3d::data::with_undo< value_t, storage_policy_t >::ready_to_record (  )  [inline]

Returns true iff the next write to the underlying storage will generate undo/redo data (useful if you need to perform additional undo/redo related operations, such as creating a signal connection).

References k3d::istate_recorder::current_change_set(), k3d::data::with_undo< value_t, storage_policy_t >::m_changes, and k3d::data::with_undo< value_t, storage_policy_t >::m_state_recorder.

Referenced by k3d::data::with_undo< value_t, storage_policy_t >::set_value().

template<typename value_t , class storage_policy_t >
void k3d::data::with_undo< value_t, storage_policy_t >::set_value ( const value_t &  Value,
ihint *const   Hint = 0 
) [inline, protected]
template<typename value_t , class storage_policy_t >
istate_recorder& k3d::data::with_undo< value_t, storage_policy_t >::state_recorder (  )  [inline]

Returns the state recorder for storing undo/redo data.

References k3d::data::with_undo< value_t, storage_policy_t >::m_state_recorder.


Member Data Documentation

template<typename value_t , class storage_policy_t >
bool k3d::data::with_undo< value_t, storage_policy_t >::m_changes [private]
template<typename value_t , class storage_policy_t >
istate_recorder& k3d::data::with_undo< value_t, storage_policy_t >::m_state_recorder [private]

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

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