Document::ChangePropertyDelta< Identifier, Data > Class Template Reference

Generic DocumentDelta for changing a property without adding or deleting data. More...

#include <ChangePropertyDelta.h>

Inheritance diagram for Document::ChangePropertyDelta< Identifier, Data >:

Document::DocumentDelta List of all members.

Public Member Functions

 ChangePropertyDelta (Identifier identifier, Data data)
 Command changes the information found by Identifier to Data.
virtual void apply (Track::Track &track)
 Perform the associated reverable action on the track.
virtual void unapply (Track::Track &track)
 Reverse the action.

Protected Attributes

Identifier identifier
Data new_data
Data old_data

Detailed Description

template<class Identifier, class Data>
class Document::ChangePropertyDelta< Identifier, Data >

Generic DocumentDelta for changing a property without adding or deleting data.

Identifier A class that finds an editable property. Data The class of the editable property.

Definition at line 50 of file ChangePropertyDelta.h.


Constructor & Destructor Documentation

template<class Identifier, class Data>
Document::ChangePropertyDelta< Identifier, Data >::ChangePropertyDelta ( Identifier  identifier,
Data  data 
) [inline]

Command changes the information found by Identifier to Data.

Parameters:
identifier Object that finds the data that will be changed. It must behave like a PropertyDeltaIdentifier, but does not need to inherit from it.
data The new replacement to the data specified by identifier.

Definition at line 60 of file ChangePropertyDelta.h.


Member Function Documentation

template<class Identifier, class Data>
virtual void Document::ChangePropertyDelta< Identifier, Data >::apply ( Track::Track track  )  [inline, virtual]

Perform the associated reverable action on the track.

Parameters:
track The track to apply the changes to.

Implements Document::DocumentDelta.

Definition at line 65 of file ChangePropertyDelta.h.

template<class Identifier, class Data>
virtual void Document::ChangePropertyDelta< Identifier, Data >::unapply ( Track::Track track  )  [inline, virtual]

Reverse the action.

This will only be called when the track is in the same state having just called

 apply(track) 
, and must take the track back to the state it was in before calling apply.
Parameters:
track The track to apply the changes to.

Implements Document::DocumentDelta.

Definition at line 70 of file ChangePropertyDelta.h.


Member Data Documentation

template<class Identifier, class Data>
Identifier Document::ChangePropertyDelta< Identifier, Data >::identifier [protected]

Definition at line 75 of file ChangePropertyDelta.h.

template<class Identifier, class Data>
Data Document::ChangePropertyDelta< Identifier, Data >::new_data [protected]

Definition at line 76 of file ChangePropertyDelta.h.

template<class Identifier, class Data>
Data Document::ChangePropertyDelta< Identifier, Data >::old_data [protected]

Definition at line 77 of file ChangePropertyDelta.h.


The documentation for this class was generated from the following file:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:16 2010 by Doxygen version 1.4.7 for Racer version svn335.