From 0f5604dbd4ee371c5237df9efd23466d9e3bf785 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 7 Jun 2009 15:32:36 +0100 Subject: [PATCH] Add Points stub class --- src/Points.cpp | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/Points.cpp diff --git a/src/Points.cpp b/src/Points.cpp new file mode 100644 index 0000000..9d587d4 --- /dev/null +++ b/src/Points.cpp @@ -0,0 +1,92 @@ +// +// Copyright (C) 2009 Nick Gasson +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#include "ITrackSegment.hpp" +#include "TrackCommon.hpp" +#include "XMLBuilder.hpp" + +// Forks in the track +class Points : public ITrackSegment { +public: + Points(); + + // ITrackSegment interface + void render() const; + void setOrigin(int x, int y) { myX = x; myY = y; } + double segmentLength() const; + TransformFunc transformFunc(const track::Direction& aDirection) const; + bool isValidDirection(const track::Direction& aDirection) const; + track::Connection nextPosition(const track::Direction& aDirection) const; + void getEndpoints(std::list >& aList) const; + ITrackSegmentPtr mergeExit(const Point& aPoint, + const track::Direction& aDirection); + xml::element toXml() const; +private: + int myX, myY; +}; + +Points::Points() +{ + +} + +void Points::render() const +{ + +} + +double Points::segmentLength() const +{ + return 1.0; +} + +ITrackSegment::TransformFunc +Points::transformFunc(const track::Direction& aDirection) const +{ + +} + +bool Points::isValidDirection(const track::Direction& aDirection) const +{ + return true; +} + +track::Connection Points::nextPosition(const track::Direction& aDirection) const +{ + +} + +void Points::getEndpoints(std::list >& aList) const +{ + +} + +ITrackSegmentPtr Points::mergeExit(const Point& aPoint, + const track::Direction& aDirection) +{ + +} + +xml::element Points::toXml() const +{ + +} + +ITrackSegmentPtr makePoints() +{ + return ITrackSegmentPtr(new Points); +} -- 2.39.2