]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/block.cpp
Add Block::has_track and Route::has_track methods
[r2c2.git] / source / libmarklin / block.cpp
index e5dbb6dbef68bfd9594e833981a8d0792de7db5e..780ee1bbd293e75a9e442f6a83a80c8a38a28f26 100644 (file)
@@ -72,6 +72,11 @@ Block::~Block()
        layout.remove_block(*this);
 }
 
+bool Block::has_track(Track &t) const
+{
+       return tracks.count(&t);
+}
+
 int Block::get_endpoint_by_link(Block &other) const
 {
        for(unsigned i=0; i<endpoints.size(); ++i)