StackableDelta.cpp

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 
00012 #include "StackableDelta.h"
00013 
00014 namespace Document
00015 {
00016 
00017 StackableDelta::StackableDelta()
00018 {
00019 }
00020 
00021 StackableDelta::~StackableDelta()
00022 {
00023 }
00024 
00025 void StackableDelta::unapply(Track::Track & track)
00026 {
00027     while (!delta_stack.empty())
00028     {
00029         delta_stack.back()->unapply(track);
00030         delta_stack.pop_back();
00031     }
00032 }
00033 
00034 void StackableDelta::add_to_stack(boost::shared_ptr<DocumentDelta> delta, Track::Track & track)
00035 {
00036     delta_stack.push_back(delta);
00037     delta->apply(track);
00038 }
00039 
00040 } // Document namespace

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

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