Document::ChangeVertexSegmentDelta Class Reference

Command for switching the segment at a vertex in a path. More...

#include <ChangeVertexSegmentDelta.h>

Inheritance diagram for Document::ChangeVertexSegmentDelta:

Document::StackableDelta Document::DocumentDelta List of all members.

Public Member Functions

 ChangeVertexSegmentDelta (VertexSegmentFinder vertex_segment_finder, std::size_t new_segment_index)
 Create delta for changing the segment at a vertex.
virtual void apply (Track::Track &track)
 Create a stack of DocumentDeltas.

Protected Attributes

VertexSegmentFinder vertex_segment_finder
std::size_t new_segment_index

Detailed Description

Command for switching the segment at a vertex in a path.

This removes any edges attached to the vertex, so there is no danger of dangling SegmentConnections.

Definition at line 62 of file ChangeVertexSegmentDelta.h.

Constructor & Destructor Documentation

Document::ChangeVertexSegmentDelta::ChangeVertexSegmentDelta ( VertexSegmentFinder  vertex_segment_finder,
std::size_t  new_segment_index 

Create delta for changing the segment at a vertex.

vertex_segment_finder identifies which vertex to change.
new_segment_index The index of the Track::Segment in the Track::Theme to switch to.

Definition at line 43 of file ChangeVertexSegmentDelta.cpp.

Member Function Documentation

void Document::ChangeVertexSegmentDelta::apply ( Track::Track track  )  [virtual]

Create a stack of DocumentDeltas.

Use only add_to_stack() to change the track, so that changes can be reversed.

track The track to apply the changes to.

Implements Document::StackableDelta.

Definition at line 49 of file ChangeVertexSegmentDelta.cpp.

Member Data Documentation

std::size_t Document::ChangeVertexSegmentDelta::new_segment_index [protected]

Definition at line 76 of file ChangeVertexSegmentDelta.h.

VertexSegmentFinder Document::ChangeVertexSegmentDelta::vertex_segment_finder [protected]

Definition at line 75 of file ChangeVertexSegmentDelta.h.

The documentation for this class was generated from the following files:
Get Racer at 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.