UndoFileChangeTracker Class Reference

#include <maplib.h>

Inheritance diagram for UndoFileChangeTracker:
Inheritance graph
[legend]
Collaboration diagram for UndoFileChangeTracker:
Collaboration graph
[legend]

Public Member Functions

 UndoFileChangeTracker ()
void print ()
void push ()
void pop ()
void pushOperation ()
void clear ()
 called whenever tracker system should be reseted
void clearRedo (void)
 called whenever redo states should be reseted
void begin ()
 called right before a new action is called, should be used to save current state (e.g. in an UndoMememto)
void undo ()
 called whenever an older state should be retrieved
void redo ()
 called whenever a previously recorded action is about to be replayed to regenerate a state after undo
void changed ()
void save ()
bool saved () const
void setChangedCallback (const Callback &changed)
std::size_t changes () const

Private Types

typedef void(UndoFileChangeTracker::* Pending )()

Private Attributes

std::size_t m_size
std::size_t m_saved
Pending m_pending
Callback m_changed

Detailed Description

Definition at line 59 of file maplib.h.


Member Typedef Documentation

typedef void(UndoFileChangeTracker::* UndoFileChangeTracker::Pending)() [private]

Definition at line 63 of file maplib.h.


Constructor & Destructor Documentation

UndoFileChangeTracker::UndoFileChangeTracker (  )  [inline]

Definition at line 68 of file maplib.h.


Member Function Documentation

void UndoFileChangeTracker::begin (  )  [inline, virtual]

called right before a new action is called, should be used to save current state (e.g. in an UndoMememto)

Implements UndoTracker.

Definition at line 107 of file maplib.h.

References m_pending, and pushOperation().

void UndoFileChangeTracker::changed (  )  [inline, virtual]

Implements MapFile.

Definition at line 120 of file maplib.h.

References m_pending.

std::size_t UndoFileChangeTracker::changes (  )  const [inline, virtual]

Implements MapFile.

Definition at line 144 of file maplib.h.

References m_size.

void UndoFileChangeTracker::clear (  )  [inline, virtual]

called whenever tracker system should be reseted

Implements UndoTracker.

Definition at line 97 of file maplib.h.

References m_changed, and m_size.

void UndoFileChangeTracker::clearRedo ( void   )  [inline, virtual]

called whenever redo states should be reseted

Implements UndoTracker.

Definition at line 103 of file maplib.h.

void UndoFileChangeTracker::pop (  )  [inline]

Definition at line 83 of file maplib.h.

References m_changed, and m_size.

Referenced by undo().

void UndoFileChangeTracker::print (  )  [inline]

Definition at line 72 of file maplib.h.

References m_saved, and m_size.

void UndoFileChangeTracker::push (  )  [inline]

Definition at line 77 of file maplib.h.

References m_changed, and m_size.

Referenced by pushOperation(), and redo().

void UndoFileChangeTracker::pushOperation (  )  [inline]

Definition at line 89 of file maplib.h.

References m_saved, m_size, MAPFILE_MAX_CHANGES, and push().

Referenced by begin().

void UndoFileChangeTracker::redo (  )  [inline, virtual]

called whenever a previously recorded action is about to be replayed to regenerate a state after undo

Implements UndoTracker.

Definition at line 115 of file maplib.h.

References m_pending, and push().

void UndoFileChangeTracker::save (  )  [inline, virtual]

Implements MapFile.

Definition at line 128 of file maplib.h.

References m_changed, m_saved, and m_size.

bool UndoFileChangeTracker::saved (  )  const [inline, virtual]

Implements MapFile.

Definition at line 133 of file maplib.h.

References m_saved, and m_size.

void UndoFileChangeTracker::setChangedCallback ( const Callback &  changed  )  [inline, virtual]

Implements MapFile.

Definition at line 138 of file maplib.h.

References m_changed.

void UndoFileChangeTracker::undo (  )  [inline, virtual]

called whenever an older state should be retrieved

Implements UndoTracker.

Definition at line 111 of file maplib.h.

References m_pending, and pop().


Field Documentation

Definition at line 65 of file maplib.h.

Referenced by clear(), pop(), push(), save(), and setChangedCallback().

Definition at line 64 of file maplib.h.

Referenced by begin(), changed(), redo(), and undo().

std::size_t UndoFileChangeTracker::m_saved [private]

Definition at line 62 of file maplib.h.

Referenced by print(), pushOperation(), save(), and saved().

std::size_t UndoFileChangeTracker::m_size [private]

Definition at line 61 of file maplib.h.

Referenced by changes(), clear(), pop(), print(), push(), pushOperation(), save(), and saved().


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

Generated by  doxygen 1.6.2