00001 00009 /* Copyright © 2009 James Legg. 00010 This program is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation, either version 3 of the License, or 00013 (at your option) any later version. 00014 */ 00015 00016 #ifndef LIBTRACK_DOCUMENT_INSERT_VERTEX_DELTA_H 00017 #define LIBTRACK_DOCUMENT_INSERT_VERTEX_DELTA_H 00018 00019 #include "DocumentDelta.h" 00020 00021 #include "InsertRemoveIdentifier.h" 00022 #include "InsertDelta.h" 00023 #include "RemoveDelta.h" 00024 #include "StackableDelta.h" 00025 #include "../path/PathVertex.h" 00026 00027 namespace Document 00028 { 00029 00032 class InsertRemoveVertexIdentifier 00033 : InsertRemoveIdentifier<std::size_t, Track::PathVertex> 00034 { 00035 public: 00036 InsertRemoveVertexIdentifier(Track::PathVertex object); 00037 InsertRemoveVertexIdentifier(std::size_t vertex_index); 00038 00039 void insert(Track::Track & track, Track::PathVertex object) const; 00040 00041 Track::PathVertex remove(Track::Track & track) const; 00042 }; 00043 00045 typedef InsertDelta<InsertRemoveVertexIdentifier, Track::PathVertex> InsertVertexDelta; 00047 typedef RemoveDelta<InsertRemoveVertexIdentifier, Track::PathVertex> RemoveVertexOnlyDelta; 00048 00051 class RemoveVertexDelta 00052 : public StackableDelta 00053 { 00054 public: 00058 RemoveVertexDelta(std::size_t vertex_index); 00059 virtual void apply(Track::Track & track); 00060 protected: 00061 std::size_t vertex_index; 00062 }; 00063 00064 } // namespace Document 00065 00066 #endif // LIBTRACK_DOCUMENT_INSERT_VERTEX_DELTA_H
Generated at Mon Sep 6 00:41:11 2010 by Doxygen version 1.4.7 for Racer version svn335.