TrackAttachment(l),
type(t),
address(0),
+ id(0),
train(0),
check_allocated_blocks(false),
passing(false)
Signal::~Signal()
{
- if(layout.has_driver() && address)
- layout.get_driver().remove_sensor(address);
+ if(layout.has_driver() && id)
+ layout.get_driver().remove_signal(id);
layout.remove(*this);
}
{
Driver *driver = (layout.has_driver() ? &layout.get_driver() : 0);
- if(driver && address)
- driver->remove_signal(address);
+ if(driver && id)
+ driver->remove_signal(id);
address = a;
if(driver && address)
- driver->add_signal(address, type);
+ id = driver->add_signal(address, type);
+ else
+ id = 0;
}
void Signal::set_position(const Vector &p)
break;
}
- layout.get_driver().set_signal(address, aspect);
+ layout.get_driver().set_signal(id, aspect);
}
}
}
else
{
- layout.get_driver().set_signal(address, type.get_indications().back().aspect);
+ layout.get_driver().set_signal(id, type.get_indications().back().aspect);
reset();
}
}
passing = true;
else if(passing && b.get_sensor_address())
{
- layout.get_driver().set_signal(address, type.get_indications().back().aspect);
+ layout.get_driver().set_signal(id, type.get_indications().back().aspect);
reset();
}
}