ChangeLightingDelta.cpp

Go to the documentation of this file.
00001 
00005 /* Copyright © 2010 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 "ChangeLightingDelta.h"
00013 #include "../Track.h"
00014 
00015 namespace Document
00016 {
00017 
00018 ChangeLightingDelta::ChangeLightingDelta(Track::Lighting new_lighting)
00019     :   m_new_lighting(new_lighting)
00020 {
00021 }
00022 
00023 void ChangeLightingDelta::apply(Track::Track & track)
00024 {
00025     m_old_lighting = track.get_lighting();
00026     track.set_lighting(m_new_lighting);
00027 }
00028 
00029 void ChangeLightingDelta::unapply(Track::Track & track)
00030 {
00031     track.set_lighting(m_old_lighting);
00032 }
00033 
00034 } // namespace Document

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.