Eclipse SUMO - Simulation of Urban MObility
NIVissimNodeDef_Poly.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-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 /****************************************************************************/
15 // -------------------
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 
25 #include <string>
26 #include <map>
27 #include <cassert>
28 #include <algorithm>
30 #include "NIVissimEdge.h"
31 #include "NIVissimNodeDef.h"
32 #include "NIVissimNodeDef_Poly.h"
33 #include "NIVissimConnection.h"
34 #include "NIVissimAbstractEdge.h"
35 #include <utils/geom/Boundary.h>
36 
37 
38 // ===========================================================================
39 // method definitions
40 // ===========================================================================
41 NIVissimNodeDef_Poly::NIVissimNodeDef_Poly(int id, const std::string& name,
42  const PositionVector& poly)
44  myPoly(poly) {}
45 
46 
48 
49 
50 bool
51 NIVissimNodeDef_Poly::dictionary(int id, const std::string& name,
52  const PositionVector& poly) {
53  NIVissimNodeDef_Poly* o = new NIVissimNodeDef_Poly(id, name, poly);
54  if (!NIVissimNodeDef::dictionary(id, o)) {
55  delete o;
56  assert(false);
57  return false;
58  }
59  return true;
60 }
61 
62 
63 /****************************************************************************/
64 
Boundary.h
NIVissimNodeDef::dictionary
static bool dictionary(int id, NIVissimNodeDef *o)
Definition: NIVissimNodeDef.cpp:51
NIVissimNodeParticipatingEdgeVector
std::vector< NIVissimNodeParticipatingEdge * > NIVissimNodeParticipatingEdgeVector
Definition: NIVissimNodeParticipatingEdgeVector.h:29
NIVissimEdge.h
PositionVector
A list of positions.
Definition: PositionVector.h:45
NIVissimNodeDef.h
NIVissimNodeDef_Edges
Definition: NIVissimNodeDef_Edges.h:32
NIVissimNodeDef_Poly::NIVissimNodeDef_Poly
NIVissimNodeDef_Poly(int id, const std::string &name, const PositionVector &poly)
Definition: NIVissimNodeDef_Poly.cpp:41
NIVissimAbstractEdge.h
NIVissimConnection.h
NIVissimNodeDef_Poly
Definition: NIVissimNodeDef_Poly.h:32
NIVissimNodeDef_Poly.h
config.h
NIVissimNodeDef_Poly::~NIVissimNodeDef_Poly
virtual ~NIVissimNodeDef_Poly()
Definition: NIVissimNodeDef_Poly.cpp:47
NIVissimNodeDef_Poly::dictionary
static bool dictionary(int id, const std::string &name, const PositionVector &poly)
Definition: NIVissimNodeDef_Poly.cpp:51
PositionVector.h