Skip to content

Commit 1cda0f8

Browse files
committed
fix: remove XmlNode inheritance from odr classes, avoids dangling xml_node member after recent change of removing OpenDriveMap::xml_doc
1 parent ac9055b commit 1cda0f8

File tree

12 files changed

+16
-59
lines changed

12 files changed

+16
-59
lines changed

include/Geometries/RoadGeometry.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22
#include "Math.hpp"
3-
#include "XmlNode.h"
43

54
#include <memory>
65
#include <set>
@@ -16,7 +15,7 @@ enum GeometryType
1615
GeometryType_ParamPoly3
1716
};
1817

19-
struct RoadGeometry : public XmlNode
18+
struct RoadGeometry
2019
{
2120
RoadGeometry(double s0, double x0, double y0, double hdg0, double length, GeometryType type);
2221
virtual ~RoadGeometry() = default;

include/Junction.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22
#include "Utils.hpp"
3-
#include "XmlNode.h"
43

54
#include <cstdint>
65
#include <functional>
@@ -89,7 +88,7 @@ struct JunctionController
8988
std::uint32_t sequence = 0;
9089
};
9190

92-
class Junction : public XmlNode
91+
class Junction
9392
{
9493
public:
9594
Junction(std::string name, std::string id);

include/Lane.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22
#include "Geometries/CubicSpline.h"
33
#include "RoadMark.h"
4-
#include "XmlNode.h"
54

65
#include <cstddef>
76
#include <functional>
@@ -48,7 +47,7 @@ inline std::ostream& operator<<(std::ostream& os, const LaneKey& lk)
4847
return os << lk.to_string();
4948
}
5049

51-
struct Lane : public XmlNode
50+
struct Lane
5251
{
5352
Lane(std::string road_id, double lanesection_s0, int id, bool level, std::string type);
5453

include/LaneSection.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22
#include "Lane.h"
3-
#include "XmlNode.h"
43

54
#include <map>
65
#include <string>
@@ -9,7 +8,7 @@
98
namespace odr
109
{
1110

12-
struct LaneSection : public XmlNode
11+
struct LaneSection
1312
{
1413
LaneSection(std::string road_id, double s0);
1514

include/LaneValidityRecord.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
#pragma once
2-
#include "XmlNode.h"
3-
42
#include <climits>
53

64
namespace odr
75
{
86

9-
struct LaneValidityRecord : public XmlNode
7+
struct LaneValidityRecord
108
{
119
LaneValidityRecord(int from_lane, int to_lane) : from_lane(from_lane), to_lane(to_lane) {}
1210

include/Road.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "RefLine.h"
77
#include "RoadObject.h"
88
#include "RoadSignal.h"
9-
#include "XmlNode.h"
109

1110
#include <map>
1211
#include <set>
@@ -36,7 +35,7 @@ struct Crossfall : public CubicSpline
3635
std::map<double, Side> sides;
3736
};
3837

39-
struct RoadLink : public XmlNode
38+
struct RoadLink
4039
{
4140
enum ContactPoint
4241
{
@@ -60,7 +59,7 @@ struct RoadLink : public XmlNode
6059
ContactPoint contact_point = ContactPoint_None;
6160
};
6261

63-
struct RoadNeighbor : public XmlNode
62+
struct RoadNeighbor
6463
{
6564
RoadNeighbor(std::string id, std::string side, std::string direction);
6665

@@ -69,15 +68,15 @@ struct RoadNeighbor : public XmlNode
6968
std::string direction = "";
7069
};
7170

72-
struct SpeedRecord : public XmlNode
71+
struct SpeedRecord
7372
{
7473
SpeedRecord(std::string max, std::string unit);
7574

7675
std::string max = "";
7776
std::string unit = "";
7877
};
7978

80-
class Road : public XmlNode
79+
class Road
8180
{
8281
public:
8382
Road(std::string id, double length, std::string junction, std::string name, bool left_hand_traffic = false);

include/RoadMark.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#pragma once
22
#include "Utils.hpp"
3-
#include "XmlNode.h"
43

54
#include <functional>
65
#include <set>
@@ -11,7 +10,7 @@ namespace odr
1110
const double ROADMARK_WEIGHT_STANDARD_WIDTH = 0.12;
1211
const double ROADMARK_WEIGHT_BOLD_WIDTH = 0.25;
1312

14-
struct RoadMarksLine : public XmlNode
13+
struct RoadMarksLine
1514
{
1615
RoadMarksLine(std::string road_id,
1716
double lanesection_s0,
@@ -70,7 +69,7 @@ struct less<odr::RoadMarksLine>
7069
namespace odr
7170
{
7271

73-
struct RoadMarkGroup : public XmlNode
72+
struct RoadMarkGroup
7473
{
7574
RoadMarkGroup(std::string road_id,
7675
double lanesection_s0,

include/RoadObject.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
#include "LaneValidityRecord.h"
33
#include "Math.hpp"
44
#include "Mesh.h"
5-
#include "XmlNode.h"
65

76
#include <string>
87
#include <vector>
98

109
namespace odr
1110
{
1211

13-
struct RoadObjectRepeat : public XmlNode
12+
struct RoadObjectRepeat
1413
{
1514
RoadObjectRepeat(double s0,
1615
double length,
@@ -37,7 +36,7 @@ struct RoadObjectRepeat : public XmlNode
3736
double z_offset_end = 0;
3837
};
3938

40-
struct RoadObjectCorner : public XmlNode
39+
struct RoadObjectCorner
4140
{
4241
enum Type
4342
{
@@ -54,7 +53,7 @@ struct RoadObjectCorner : public XmlNode
5453
Type type = Type_Road;
5554
};
5655

57-
struct RoadObjectOutline : public XmlNode
56+
struct RoadObjectOutline
5857
{
5958
RoadObjectOutline(int id, std::string fill_type, std::string lane_type, bool outer, bool closed);
6059

@@ -67,7 +66,7 @@ struct RoadObjectOutline : public XmlNode
6766
std::vector<RoadObjectCorner> outline;
6867
};
6968

70-
struct RoadObject : public XmlNode
69+
struct RoadObject
7170
{
7271
RoadObject(std::string road_id,
7372
std::string id,

include/RoadSignal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#pragma once
22
#include "LaneValidityRecord.h"
33
#include "Mesh.h"
4-
#include "XmlNode.h"
54

65
#include <string>
76
#include <vector>
87

98
namespace odr
109
{
1110

12-
struct RoadSignal : public XmlNode
11+
struct RoadSignal
1312
{
1413
RoadSignal(std::string road_id,
1514
std::string id,

include/XmlNode.h

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)