Eclipse SUMO - Simulation of Urban MObility
Command.h
Go to the documentation of this file.
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3
// Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
19
// Base (microsim) event class
20
/****************************************************************************/
21
#pragma once
22
#include <
utils/common/SUMOTime.h
>
23
#include <
utils/common/UtilExceptions.h
>
24
25
26
// ===========================================================================
27
// class definitions
28
// ===========================================================================
49
class
Command
{
50
public
:
52
Command
() { }
53
54
56
virtual
~Command
() { }
57
58
69
virtual
SUMOTime
execute
(
SUMOTime
currentTime) = 0;
70
82
virtual
SUMOTime
shiftTime
(
SUMOTime
/*currentTime*/
,
SUMOTime
/*execTime*/
,
SUMOTime
/*newTime*/
) {
83
return
-1;
84
}
85
86
};
SUMOTime.h
SUMOTime
long long int SUMOTime
Definition:
SUMOTime.h:31
UtilExceptions.h
Command
Base (microsim) event class.
Definition:
Command.h:49
Command::Command
Command()
Constructor.
Definition:
Command.h:52
Command::~Command
virtual ~Command()
Destructor.
Definition:
Command.h:56
Command::execute
virtual SUMOTime execute(SUMOTime currentTime)=0
Executes the command.
Command::shiftTime
virtual SUMOTime shiftTime(SUMOTime, SUMOTime, SUMOTime)
Reschedule or deschedule the command when quick-loading state.
Definition:
Command.h:82
src
utils
common
Command.h
Generated on Thu Dec 9 2021 00:34:12 for Eclipse SUMO - Simulation of Urban MObility by
1.9.1