X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Flibr2c2%2Ftrain.h;fp=source%2Flibr2c2%2Ftrain.h;h=f3783893d3297628f5af69df539e3500e7b7cf66;hb=57e0944ee8ed442e2d0aa7c9964cac00450af5e7;hp=c0eb52e850006cd4ca48f41f1ad35dd77da227f3;hpb=4eea980c210c3f3bf5520c1e3d68426a4669db8a;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index c0eb52e..f378389 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -56,7 +56,6 @@ private: bool advancing; Controller *controller; std::list ais; - bool active; unsigned current_speed_step; bool speed_changing; bool reverse; @@ -90,13 +89,11 @@ public: const Vehicle &get_vehicle(unsigned) const; void set_control(const std::string &, float); - void set_active(bool); void set_function(unsigned, bool); float get_control(const std::string &) const; float get_speed() const; float get_quantized_speed() const; unsigned get_speed_step() const { return current_speed_step; } - bool is_active() const { return active; } bool get_function(unsigned) const; unsigned get_functions() const { return functions; } @@ -117,9 +114,9 @@ public: void unplace(); bool is_placed() const { return !allocator.empty(); } void stop_at(Block *); - bool free_block(Block &); - void free_noncritical_blocks(); - void reserve_more(); + bool is_block_critical(const Block &) const; + BlockIter get_first_noncritical_block() const; + void refresh_blocks_from(Block &); const BlockAllocator &get_block_allocator() const { return allocator; } float get_reserved_distance() const;