|
@@ -14,6 +14,7 @@ class JunctionPriorityRoad;
|
|
class JunctionCrossPath;
|
|
class JunctionCrossPath;
|
|
class JunctionCrossPathStartLaneLink;
|
|
class JunctionCrossPathStartLaneLink;
|
|
class JunctionCrossPathEndLaneLink;
|
|
class JunctionCrossPathEndLaneLink;
|
|
|
|
+class JunctionDirectConnection;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Junction class. Holds all the junction information
|
|
* Junction class. Holds all the junction information
|
|
@@ -31,6 +32,8 @@ private:
|
|
std::string mName;
|
|
std::string mName;
|
|
std::string mId;
|
|
std::string mId;
|
|
|
|
|
|
|
|
+ std::string mType = "default";
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Vector based parameters of the junction
|
|
* Vector based parameters of the junction
|
|
*/
|
|
*/
|
|
@@ -39,6 +42,8 @@ private:
|
|
std::vector<JunctionController> mJunctionControllerVector;
|
|
std::vector<JunctionController> mJunctionControllerVector;
|
|
std::vector<JunctionCrossPath> mJunctionCrossPathVector;
|
|
std::vector<JunctionCrossPath> mJunctionCrossPathVector;
|
|
|
|
|
|
|
|
+ std::vector<JunctionDirectConnection> mJunctionDirectConnectionVector;
|
|
|
|
+
|
|
public:
|
|
public:
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,6 +54,8 @@ public:
|
|
unsigned int mLastAddedJunctionController;
|
|
unsigned int mLastAddedJunctionController;
|
|
unsigned int mLastAddedJunctionCrossPath;
|
|
unsigned int mLastAddedJunctionCrossPath;
|
|
|
|
|
|
|
|
+ unsigned int mLastAddedJunctionDirectConnection;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Constructor. Sets basic junction parameters
|
|
* Constructor. Sets basic junction parameters
|
|
* @param name Name of the junction
|
|
* @param name Name of the junction
|
|
@@ -65,6 +72,8 @@ public:
|
|
*/
|
|
*/
|
|
void SetId(string id);
|
|
void SetId(string id);
|
|
|
|
|
|
|
|
+ void SetType(string strtype);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Adds a junction connection to the junction
|
|
* Adds a junction connection to the junction
|
|
* @param id ID within the junction
|
|
* @param id ID within the junction
|
|
@@ -74,6 +83,8 @@ public:
|
|
*/
|
|
*/
|
|
unsigned int AddJunctionConnection(string id, string incomingRoad, string connectingRoad, string contactPoint);
|
|
unsigned int AddJunctionConnection(string id, string incomingRoad, string connectingRoad, string contactPoint);
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Adds a priority parameter to the junction
|
|
* Adds a priority parameter to the junction
|
|
* @param high ID of the connecting road with higher priority
|
|
* @param high ID of the connecting road with higher priority
|
|
@@ -96,6 +107,7 @@ public:
|
|
*/
|
|
*/
|
|
unsigned int AddJunctionCrossPath(string id,string crossingRoad, string roadAtStart,string roadAtEnd,JunctionCrossPathStartLaneLink startLaneLink,JunctionCrossPathEndLaneLink endLaneLink);
|
|
unsigned int AddJunctionCrossPath(string id,string crossingRoad, string roadAtStart,string roadAtEnd,JunctionCrossPathStartLaneLink startLaneLink,JunctionCrossPathEndLaneLink endLaneLink);
|
|
|
|
|
|
|
|
+ unsigned int AddJunctionDirectConnection(string id,string linkedRoad);
|
|
/**
|
|
/**
|
|
* Clone the connection record
|
|
* Clone the connection record
|
|
* @param index Index of the record to clone
|
|
* @param index Index of the record to clone
|
|
@@ -104,12 +116,14 @@ public:
|
|
unsigned int CloneJunctionPriority(unsigned int index);
|
|
unsigned int CloneJunctionPriority(unsigned int index);
|
|
unsigned int CloneJunctionController(unsigned int index);
|
|
unsigned int CloneJunctionController(unsigned int index);
|
|
unsigned int CloneJunctionPath(unsigned int index);
|
|
unsigned int CloneJunctionPath(unsigned int index);
|
|
|
|
+ unsigned int CloneJunctionDirectConnection(unsigned int index);
|
|
|
|
|
|
|
|
|
|
void DeleteJunctionConnection(unsigned int index);
|
|
void DeleteJunctionConnection(unsigned int index);
|
|
void DeleteJunctionPriority(unsigned int index);
|
|
void DeleteJunctionPriority(unsigned int index);
|
|
void DeleteJunctionController(unsigned int index);
|
|
void DeleteJunctionController(unsigned int index);
|
|
void DeleteJunctionCrossPath(unsigned int index);
|
|
void DeleteJunctionCrossPath(unsigned int index);
|
|
|
|
+ void DeleteJunctionDirectConnection(unsigned int index);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Return the name of the junction
|
|
* Return the name of the junction
|
|
@@ -121,6 +135,8 @@ public:
|
|
*/
|
|
*/
|
|
string GetId();
|
|
string GetId();
|
|
|
|
|
|
|
|
+ string GetType();
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Return the vector that stores junction connections
|
|
* Return the vector that stores junction connections
|
|
* @return A pointer to std::vector of JunctionConnection type that stores junction connections
|
|
* @return A pointer to std::vector of JunctionConnection type that stores junction connections
|
|
@@ -222,6 +238,12 @@ public:
|
|
JunctionCrossPath * GetLastJunctionCrossPath();
|
|
JunctionCrossPath * GetLastJunctionCrossPath();
|
|
JunctionCrossPath * GetLastAddedJunctionCrossPath();
|
|
JunctionCrossPath * GetLastAddedJunctionCrossPath();
|
|
|
|
|
|
|
|
+ std::vector<JunctionDirectConnection>* GetJunctionDirectConnectionVector();
|
|
|
|
+ unsigned int GetJunctionDirectConnectionCount();
|
|
|
|
+ JunctionDirectConnection * GetJunctionDirectConnection(unsigned int i);
|
|
|
|
+ JunctionDirectConnection * GetLastJunctionDirectConnection();
|
|
|
|
+ JunctionDirectConnection * GetLastAddedJunctionDirectConnection();
|
|
|
|
+
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -575,7 +597,124 @@ public:
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
+class JunctionDirectConnection
|
|
|
|
+{
|
|
|
|
+private:
|
|
|
|
+ /**
|
|
|
|
+ * Connection parameters
|
|
|
|
+ */
|
|
|
|
+ string mId;
|
|
|
|
+ string mLinkedRoad;
|
|
|
|
+
|
|
|
|
+ std::vector<string> mIncomingRoad;
|
|
|
|
+ std::vector<string> mContactPoint; //Possible values: start / end
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Lane linkage parameters vector
|
|
|
|
+ */
|
|
|
|
+ std::vector<JunctionLaneLink> mJunctionLaneLinkVector;
|
|
|
|
+public:
|
|
|
|
|
|
|
|
+ unsigned int mLastAddedJunctionLaneLink;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Constructor. Sets basic junction connection parameters
|
|
|
|
+ * @param id ID within the junction
|
|
|
|
+ * @param incomingRoad ID of the incoming road
|
|
|
|
+ * @param connectingRoad ID of the connecting path
|
|
|
|
+ * @param contactPoint Contact point on the connecting road (start / end)
|
|
|
|
+ */
|
|
|
|
+ JunctionDirectConnection( string id, string linkedRoad);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Set the ID parameter
|
|
|
|
+ */
|
|
|
|
+ void SetId(string id);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Set the ID of the incoming road
|
|
|
|
+ */
|
|
|
|
+ void SetIncomingRoad(string incomingRoad);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Set the ID of the connecting path
|
|
|
|
+ */
|
|
|
|
+ void SetLinkedRoad(string linkedRoad);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Set the contact point parameter
|
|
|
|
+ * @param contactPoint Contact point of the connecting road. Can be either start or end
|
|
|
|
+ */
|
|
|
|
+ void SetContactPoint(string contactPoint);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Add a lane link record
|
|
|
|
+ * @param from ID of the incoming lane
|
|
|
|
+ * @param to ID of the connecting lane
|
|
|
|
+ */
|
|
|
|
+ unsigned int AddJunctionLaneLink(int from, int to);
|
|
|
|
+
|
|
|
|
+ //clone elements
|
|
|
|
+ unsigned int CloneJunctionLaneLink(unsigned int index);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Delete the lane link parameter at the provided index
|
|
|
|
+ */
|
|
|
|
+ void DeleteJunctionLaneLink(unsigned int index);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Get the ID parameter
|
|
|
|
+ */
|
|
|
|
+ string GetId();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Get the ID fo the incoming road
|
|
|
|
+ */
|
|
|
|
+ int GetIncomingRoad(string & incomingRoad);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Get the ID of the connecting road
|
|
|
|
+ */
|
|
|
|
+ string GetLinkedRoad();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Get the contact point parameter
|
|
|
|
+ */
|
|
|
|
+ int GetContactPoint(string & contactPoint);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Return the vector that stores junction lane link records
|
|
|
|
+ * @return A pointer to std::vector of JunctionLaneLink type that stores junction lane link records
|
|
|
|
+ */
|
|
|
|
+ std::vector<JunctionLaneLink>* GetJunctionLaneLinkVector();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Return the number of junction lane link records
|
|
|
|
+ * @return An unsigned int that stores the number of junction lane link records
|
|
|
|
+ */
|
|
|
|
+ unsigned int GetJunctionLaneLinkCount();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Return the pointer to a junction lane link record at provided index
|
|
|
|
+ * @param i Index to the junction lane link record that is returned
|
|
|
|
+ * @return A pointer to JunctionLaneLink object
|
|
|
|
+ */
|
|
|
|
+ JunctionLaneLink* GetJunctionLaneLink(unsigned int);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Return the pointer to the last junction lane link record
|
|
|
|
+ * @return A pointer to JunctionLaneLink object
|
|
|
|
+ */
|
|
|
|
+ JunctionLaneLink* GetLastJunctionLaneLink();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Return the pointer to the last added junction lane link record (which might not be the one from the end of the vector)
|
|
|
|
+ * @return A pointer to JunctionLaneLink object
|
|
|
|
+ */
|
|
|
|
+ JunctionLaneLink* GetLastAddedJunctionLaneLink();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+};
|
|
|
|
|
|
|
|
|
|
|
|
|