X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.h;h=e16f726c5bebf78bbb56b091c82f11739cca1108;hb=e6b49ce4c5833ab90733aee8e42413f7c75d9da7;hp=90b2a72dc5ce94e3795d2a3d232d932fed22d484;hpb=34f8bf04e4bdffefeceea59b186386b51c542b9d;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index 90b2a72..e16f726 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -1,15 +1,9 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef LIBR2C2_TRAIN_H_ #define LIBR2C2_TRAIN_H_ #include #include +#include #include #include "block.h" #include "blockiter.h" @@ -28,7 +22,7 @@ class Zone; class Train: public sigc::trackable { public: - class Loader: public Msp::DataFile::BasicLoader + class Loader: public Msp::DataFile::ObjectLoader { private: Block *prev_block; @@ -148,7 +142,7 @@ public: bool is_placed() const { return !blocks.empty(); } bool free_block(Block &); void free_noncritical_blocks(); - int get_entry_to_block(Block &) const; + int get_entry_to_block(const Block &) const; float get_reserved_distance() const; void tick(const Msp::Time::TimeStamp &, const Msp::Time::TimeDelta &); @@ -158,7 +152,7 @@ private: void control_changed(const Controller::Control &); void loco_speed_event(unsigned, unsigned, bool); void loco_func_event(unsigned, unsigned, bool); - void sensor_event(unsigned, bool); + void block_state_changed(Block &, Block::State); void turnout_path_changed(Track &); void halt_event(bool); void block_reserved(const Block &, const Train *);