Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/guisim/GUITransportableControl.h
169667 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2012-2025 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
/****************************************************************************/
14
/// @file GUITransportableControl.h
15
/// @author Daniel Krajzewicz
16
/// @author Jakob Erdmann
17
/// @author Michael Behrisch
18
/// @date Wed, 13.06.2012
19
///
20
// GUI-version of the transportable control for building gui persons and containers
21
/****************************************************************************/
22
#pragma once
23
#include <config.h>
24
25
#include <vector>
26
#include <microsim/transportables/MSTransportableControl.h>
27
28
29
// ===========================================================================
30
// class definitions
31
// ===========================================================================
32
/** @class GUITransportableControl
33
* @brief GUI-version of the transportable control for building gui persons and containers
34
*/
35
class GUITransportableControl : public MSTransportableControl {
36
public:
37
/// constructor
38
GUITransportableControl(const bool isPerson);
39
40
41
/// destructor
42
virtual ~GUITransportableControl();
43
44
45
/** @brief Builds a new person
46
* @param[in] pars The parameter
47
* @param[in] vtype The type (reusing vehicle type container here)
48
* @param[in] plan This person's plan
49
* @param[in] rng The RNG to compute the optional speed deviation
50
*/
51
virtual MSTransportable* buildPerson(const SUMOVehicleParameter* pars, MSVehicleType* vtype, MSTransportable::MSTransportablePlan* plan,
52
SumoRNG* rng) const;
53
54
/** @brief Builds a new container
55
* @param[in] pars The parameter
56
* @param[in] vtype The type (reusing vehicle type container here)
57
* @param[in] plan This container's plan
58
*/
59
virtual MSTransportable* buildContainer(const SUMOVehicleParameter* pars, MSVehicleType* vtype, MSTransportable::MSTransportablePlan* plan) const;
60
61
/** @brief Returns the list of all known persons by gl-id
62
* @param[fill] into The list to fill with vehicle ids
63
* @todo Well, what about concurrent modifications?
64
*/
65
void insertIDs(std::vector<GUIGlID>& into);
66
67
protected:
68
69
const bool myIsPerson;
70
};
71
72