X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Flibmarklin%2Ftrain.h;h=96f487066fb7e6ef5affa1228d8502c2fe35e5fb;hb=78bc40c2d1a5fcc5715143bd2326716fbb143730;hp=363fb5572c9184dde7a64e339815f3fbe4f28983;hpb=6c61179fe09af2f5366d50f10aadbf5f83438087;p=r2c2.git diff --git a/source/libmarklin/train.h b/source/libmarklin/train.h index 363fb55..96f4870 100644 --- a/source/libmarklin/train.h +++ b/source/libmarklin/train.h @@ -2,7 +2,7 @@ #define LIBMARKLIN_TRAIN_H_ #include -#include "section.h" +#include "block.h" namespace Marklin { @@ -15,24 +15,24 @@ public: Train(TrafficManager &, Locomotive &); const std::string &get_name() const { return name; } void set_speed(unsigned); - void place(Section *, const Section::Endpoint *); - bool free_section(Section *); + void place(Block *, const Block::Endpoint *); + bool free_block(Block *); void tick(); private: - struct SectionRef + struct BlockRef { - Section *section; - const Section::Endpoint *entry; + Block *block; + const Block::Endpoint *entry; - SectionRef(Section *s, const Section::Endpoint *e): section(s), entry(e) { } + BlockRef(Block *s, const Block::Endpoint *e): block(s), entry(e) { } }; - typedef std::list SectRefSeq; + typedef std::list BlockRefSeq; TrafficManager &trfc_mgr; std::string name; Locomotive &loco; - SectRefSeq cur_sections; - SectRefSeq rsv_sections; + BlockRefSeq cur_blocks; + BlockRefSeq rsv_blocks; unsigned target_speed; void sensor_event(unsigned, bool);