59 TL(
". There are intervals overlapped."));
91 for (
const auto& interval : getEditedElements()) {
93 if (end < intervalEnd) {
113 std::vector<std::pair<std::pair<double, double>,
GNEAdditional*> > sortedIntervals;
115 for (
const auto& interval : getEditedElements()) {
117 sortedIntervals.push_back(std::make_pair(std::make_pair(0., 0.), interval));
120 sortedIntervals.back().first.second = interval->getAttributeDouble(
SUMO_ATTR_END);
123 std::sort(sortedIntervals.begin(), sortedIntervals.end());
125 if (sortedIntervals.size() <= 1) {
129 for (
int i = 0; i < (int)sortedIntervals.size() - 1; i++) {
130 if (sortedIntervals.at(i).first.second > sortedIntervals.at(i + 1).first.first) {
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual double getAttributeDouble(SumoXMLAttr key) const =0
const std::string getID() const
get ID (all Attribute Carriers have one)
GNENet * getNet() const
get pointer to net
void openDialog(FXWindow *focusableElement=nullptr)
open dialog
GNEViewNet * getViewNet() const
get view net
RerouterIntervalsList(GNERerouterDialog *rerouterDialog)
constructor
long openElementDialog(const size_t rowIndex)
open element dialog
bool isOverlapping() const
@briec check if there is overlapping between intervals
long addNewElement()
add new element
~GNERerouterDialog()
destructor
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
GNERerouterDialog(GNEAdditional *rerouter)
Constructor.
RerouterIntervalsList * myRerouterIntervals
Element list for rerouter intervals.
GNEAdditional * myElement
pointer to edited element
void resetChanges()
reset changes did in this dialog.
long acceptElementDialog()
close dialog commiting changes
long updateList()
update element list
GNEViewParent * getViewParent() const
get the net object
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
dialog arguments, used for certain modal dialogs that can not be edited using tab