]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/train.h
Remember the states of locomotive functions
[r2c2.git] / source / libr2c2 / train.h
index 113af0e09a3d424f5744406601d4c5640ce67730..9b228c026a791374f26de248f1a04fab3f8e95a4 100644 (file)
@@ -32,6 +32,7 @@ public:
        private:
                virtual void finish();
                void blocks();
+               void function(unsigned, bool);
                void name(const std::string &);
                void quantized_speed();
                void router();
@@ -121,7 +122,10 @@ public:
        bool is_placed() const { return !allocator.empty(); }
        void stop_at(Block *);
        bool is_block_critical(const Block &) const;
-       BlockIter get_first_noncritical_block() const;
+       BlockIter get_last_critical_block() const;
+private:
+       BlockIter check_critical_blocks(const Block *) const;
+public:
        void refresh_blocks_from(Block &);
        const BlockAllocator &get_block_allocator() const { return allocator; }
        float get_reserved_distance() const;