k3d::istate_recorder Class Reference

Abstract interface for an object that can store a hierarchical tree of state changes to the document. More...

#include <istate_recorder.h>

Inheritance diagram for k3d::istate_recorder:
Inheritance graph
[legend]

List of all members.

Classes

struct  node
 Encapsulates a single "node" in the hierarchy of recorded state changes. More...

Public Types

typedef std::vector< node * > nodes_t

Public Member Functions

virtual void start_recording (std::auto_ptr< state_change_set > ChangeSet, const char *const DebugLabel)=0
 Called by clients to register a change set for recording subsequent state changes (the recorder assumes responsibility for the lifetime of the changeset).
virtual state_change_setcurrent_change_set ()=0
 Returns the current change set being recorded (if any - could return NULL).
virtual std::auto_ptr
< state_change_set
stop_recording (const char *const DebugLabel)=0
 Called by clients to stop recording a set of state changes (the recorder relinquishes responsibility for the lifetime of the returned changeset).
virtual void commit_change_set (std::auto_ptr< state_change_set > ChangeSet, const std::string &Label, const char *const DebugLabel)=0
 Called by clients once a set of changes is complete, to make them a part of the undo/redo tree (the recorder assumes responsibility for the lifetime of the change set).
virtual const nodes_troot_nodes ()=0
 Returns the root node(s) in the hierarchy of recorded state changes (could return an empty collection if no recording has taken place).
virtual const nodecurrent_node ()=0
 Returns the current node - the node that will become the parent of any subsequently recorded nodes (could return NULL).
virtual const nodenewest_node ()=0
 Returns the newest (most-recently-created) node, which is typically the node that should be the "goal" of redo operations (could return NULL if nothing's been recorded yet).
virtual const nodelast_saved_node ()=0
 Returns the most-recently-saved node in the hierarchy of recorded state changes (could return NULL if no save has taken place).
virtual void set_current_node (const node *const Node)=0
 Called to set the current node.
virtual void mark_saved ()=0
 Called to mark the current node as saved.
virtual sigc::connection connect_recording_done_signal (const sigc::slot< void > &Slot)=0
 Connects a slot that will be called when recording finishes.
virtual sigc::connection connect_node_added_signal (const sigc::slot< void, const node * > &Slot)=0
 Connects a slot that will be called after a node is added to the hierarchy.
virtual sigc::connection connect_current_node_changed_signal (const sigc::slot< void > &Slot)=0
 Connects a slot that will be called when the current node has changed.
virtual sigc::connection connect_last_saved_node_changed_signal (const sigc::slot< void > &Slot)=0
 Connects a slot that will be called when the last saved node has changed.

Protected Member Functions

 istate_recorder ()
 istate_recorder (const istate_recorder &Other)
istate_recorderoperator= (const istate_recorder &)
virtual ~istate_recorder ()

Detailed Description

Abstract interface for an object that can store a hierarchical tree of state changes to the document.


Member Typedef Documentation

typedef std::vector<node*> k3d::istate_recorder::nodes_t

Constructor & Destructor Documentation

k3d::istate_recorder::istate_recorder (  )  [inline, protected]
k3d::istate_recorder::istate_recorder ( const istate_recorder Other  )  [inline, protected]
virtual k3d::istate_recorder::~istate_recorder (  )  [inline, protected, virtual]

Member Function Documentation

virtual void k3d::istate_recorder::commit_change_set ( std::auto_ptr< state_change_set ChangeSet,
const std::string &  Label,
const char *const   DebugLabel 
) [pure virtual]
virtual sigc::connection k3d::istate_recorder::connect_current_node_changed_signal ( const sigc::slot< void > &  Slot  )  [pure virtual]

Connects a slot that will be called when the current node has changed.

Implemented in k3d::detail::state_recorder_implementation.

Referenced by k3d::ngui::main_document_window::main_document_window().

virtual sigc::connection k3d::istate_recorder::connect_last_saved_node_changed_signal ( const sigc::slot< void > &  Slot  )  [pure virtual]

Connects a slot that will be called when the last saved node has changed.

Implemented in k3d::detail::state_recorder_implementation.

virtual sigc::connection k3d::istate_recorder::connect_node_added_signal ( const sigc::slot< void, const node * > &  Slot  )  [pure virtual]

Connects a slot that will be called after a node is added to the hierarchy.

Implemented in k3d::detail::state_recorder_implementation.

virtual sigc::connection k3d::istate_recorder::connect_recording_done_signal ( const sigc::slot< void > &  Slot  )  [pure virtual]

Connects a slot that will be called when recording finishes.

Implemented in k3d::detail::state_recorder_implementation.

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

virtual state_change_set* k3d::istate_recorder::current_change_set (  )  [pure virtual]
virtual const node* k3d::istate_recorder::current_node (  )  [pure virtual]
virtual const node* k3d::istate_recorder::last_saved_node (  )  [pure virtual]

Returns the most-recently-saved node in the hierarchy of recorded state changes (could return NULL if no save has taken place).

Implemented in k3d::detail::state_recorder_implementation.

Referenced by module::ngui::undo_tree::detail::implementation::on_last_saved_node_changed(), k3d::ngui::main_document_window::unsaved_changes(), and module::ngui::undo_tree::detail::implementation::update_contents().

virtual void k3d::istate_recorder::mark_saved (  )  [pure virtual]

Called to mark the current node as saved.

Implemented in k3d::detail::state_recorder_implementation.

virtual const node* k3d::istate_recorder::newest_node (  )  [pure virtual]

Returns the newest (most-recently-created) node, which is typically the node that should be the "goal" of redo operations (could return NULL if nothing's been recorded yet).

Implemented in k3d::detail::state_recorder_implementation.

istate_recorder& k3d::istate_recorder::operator= ( const istate_recorder  )  [inline, protected]
virtual const nodes_t& k3d::istate_recorder::root_nodes (  )  [pure virtual]

Returns the root node(s) in the hierarchy of recorded state changes (could return an empty collection if no recording has taken place).

Implemented in k3d::detail::state_recorder_implementation.

Referenced by module::ngui::undo_tree::detail::implementation::update_contents().

virtual void k3d::istate_recorder::set_current_node ( const node *const   Node  )  [pure virtual]
virtual void k3d::istate_recorder::start_recording ( std::auto_ptr< state_change_set ChangeSet,
const char *const   DebugLabel 
) [pure virtual]
virtual std::auto_ptr<state_change_set> k3d::istate_recorder::stop_recording ( const char *const   DebugLabel  )  [pure virtual]

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

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