]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/zone.h
Create a base class to handle common operations in Block, Route and Zone
[r2c2.git] / source / libr2c2 / zone.h
index 98feb670a3ab4a49fd36a4e117495ceddae5193a..7b1dd9fb30d9bf29266fbfbef3cc5a5cbd50d000 100644 (file)
@@ -1,23 +1,17 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef LIBR2C2_ZONE_H_
 #define LIBR2C2_ZONE_H_
 
 #include <set>
 #include <string>
 #include <msp/datafile/objectloader.h>
+#include "trackchain.h"
 
 namespace R2C2 {
 
 class Layout;
 class Track;
 
-class Zone
+class Zone: public TrackChain
 {
 public:
        class Loader: public Msp::DataFile::ObjectLoader<Zone>
@@ -28,16 +22,12 @@ public:
                void block(unsigned);
        };
 
-       typedef std::set<Track *> TrackSet;
-
        sigc::signal<void, const std::string &, const std::string &, unsigned> signal_name_changed;
 
 private:
-       Layout &layout;
        std::string group;
        std::string qualifier;
        unsigned number;
-       TrackSet tracks;
 
 public:
        Zone(Layout &);
@@ -49,14 +39,7 @@ public:
        unsigned get_number() const { return number; }
        std::string get_name() const;
 
-       void add_track(Track &);
-       bool add_tracks(const TrackSet &);
-       const TrackSet &get_tracks() const { return tracks; }
-       bool has_track(Track &) const;
-
        void save(std::list<Msp::DataFile::Statement> &) const;
-private:
-       bool is_valid(Track &) const;
 };
 
 } // namespace R2C2