1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2019-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
10 /// @file    MSDynamicShapeUpdater.h
11 /// @author  Leonhard Luecken
12 /// @date    08 Apr 2019
13 /// @version $Id$
14 ///
15 //
16 /****************************************************************************/
17 #ifndef MICROSIM_MSDYNAMICSHAPEUPDATER_H_
18 #define MICROSIM_MSDYNAMICSHAPEUPDATER_H_
19 
20 #include "MSNet.h"
21 #include "utils/shapes/ShapeContainer.h"
22 
23 /** @class DynamicShapeUpdater
24  * @brief Ensures that dynamic shapes tracking traffic objects are removed when the objects are removed.
25  */
26 class MSDynamicShapeUpdater: public MSNet::VehicleStateListener {
27 public:
28     /// @brief Constructor
MSDynamicShapeUpdater(ShapeContainer & shapeContainer)29     MSDynamicShapeUpdater(ShapeContainer& shapeContainer) : myShapeContainer(shapeContainer) {};
30 
31     /// @brief Constructor
32     void vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& info = "") override;
33 
34 private:
35     ShapeContainer& myShapeContainer;
36 
37 private:
38     /// @brief invalidated assignment operator
39     MSDynamicShapeUpdater& operator=(const MSDynamicShapeUpdater& s) = delete;
40 };
41 
42 #endif /* MICROSIM_MSDYNAMICSHAPEUPDATER_H_ */
43