It's bad practice to emit other objects' signals.
// Update cur_blocks_end first to keep things consistent.
cur_blocks_end = end;
for(; i!=end; ++i)
- train.signal_advanced.emit(**i);
+ signal_advanced.emit(**i);
}
void BlockAllocator::advance_front(const Sensor *sensor)
void hint(unsigned);
};
+ sigc::signal<void, Block &> signal_advanced;
+
private:
struct BlockMatch;
layout.get_driver().signal_halt.connect(sigc::mem_fun(this, &Train::halt_event));
controller->signal_control_changed.connect(sigc::mem_fun(this, &Train::control_changed));
+
+ allocator.signal_advanced.connect(signal_advanced);
}
Train::~Train()