Skip to content

Commit

Permalink
Renamed functions. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent 94a9bb7 commit 7287670
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 63 deletions.
6 changes: 3 additions & 3 deletions src/netedit/GNENet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ GNENet::deleteNetworkElement(GNENetworkElement* networkElement, GNEUndoList* und
}
} else if (networkElement->getTagProperty().getTag() == SUMO_TAG_CROSSING) {
// get crossing (note: could be already removed if is a child, then hardfail=false)
GNECrossing* crossing = myAttributeCarriers->retrieveCrossingGL(networkElement->getGUIGlObject(), false);
GNECrossing* crossing = myAttributeCarriers->retrieveCrossing(networkElement->getGUIGlObject(), false);
// if exist, remove it
if (crossing) {
deleteCrossing(crossing, undoList);
Expand All @@ -346,14 +346,14 @@ GNENet::deleteNetworkElement(GNENetworkElement* networkElement, GNEUndoList* und
}
} else if (networkElement->getTagProperty().getTag() == SUMO_TAG_LANE) {
// get lane (note: could be already removed if is a child, then hardfail=false)
GNELane* lane = myAttributeCarriers->retrieveLaneGL(networkElement->getGUIGlObject(), false);
GNELane* lane = myAttributeCarriers->retrieveLane(networkElement->getGUIGlObject(), false);
// if exist, remove it
if (lane) {
deleteLane(lane, undoList, false);
}
} else if (networkElement->getTagProperty().getTag() == SUMO_TAG_CONNECTION) {
// get connection (note: could be already removed if is a child, then hardfail=false)
GNEConnection* connection = myAttributeCarriers->retrieveConnectionGL(networkElement->getGUIGlObject(), false);
GNEConnection* connection = myAttributeCarriers->retrieveConnection(networkElement->getGUIGlObject(), false);
// if exist, remove it
if (connection) {
deleteConnection(connection, undoList);
Expand Down
18 changes: 9 additions & 9 deletions src/netedit/GNENetHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ GNENetHelper::AttributeCarriers::isNetworkElementAroundShape(GNEAttributeCarrier
return shape.overlapsWith(myCrossings.at(AC->getGUIGlObject())->getCrossingShape());
} else if (AC->getTagProperty().isAdditionalElement()) {
// Additional (including shapes and TAZs
const GNEAdditional* additional = retrieveAdditionalGL(AC->getGUIGlObject());
const GNEAdditional* additional = retrieveAdditional(AC->getGUIGlObject());
if (additional->getAdditionalGeometry().getShape().size() <= 1) {
return shape.around(additional->getPositionInView());
} else {
Expand Down Expand Up @@ -414,7 +414,7 @@ GNENetHelper::AttributeCarriers::retrieveJunction(const std::string& id, bool ha


GNEJunction*
GNENetHelper::AttributeCarriers::retrieveJunctionGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveJunction(const GUIGlObject* glObject, bool hardFail) const {
for (const auto &junctionPair : myJunctions) {
if (junctionPair.second.first == glObject) {
return junctionPair.second.second;
Expand Down Expand Up @@ -524,7 +524,7 @@ GNENetHelper::AttributeCarriers::getNumberOfSelectedJunctions() const {


GNECrossing*
GNENetHelper::AttributeCarriers::retrieveCrossingGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveCrossing(const GUIGlObject* glObject, bool hardFail) const {
if (myCrossings.count(glObject)) {
return myCrossings.at(glObject);
} else if (hardFail) {
Expand Down Expand Up @@ -592,7 +592,7 @@ GNENetHelper::AttributeCarriers::getNumberOfSelectedCrossings() const {


GNEWalkingArea*
GNENetHelper::AttributeCarriers::retrieveWalkingAreaGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveWalkingArea(const GUIGlObject* glObject, bool hardFail) const {
if (myWalkingAreas.count(glObject)) {
return myWalkingAreas.at(glObject);
} else if (hardFail) {
Expand Down Expand Up @@ -738,7 +738,7 @@ GNENetHelper::AttributeCarriers::retrieveEdge(const std::string& id, bool hardFa


GNEEdge*
GNENetHelper::AttributeCarriers::retrieveEdgeGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveEdge(const GUIGlObject* glObject, bool hardFail) const {
for (const auto &edgePair : myEdges) {
if (edgePair.second.first == glObject) {
return edgePair.second.second;
Expand Down Expand Up @@ -903,7 +903,7 @@ GNENetHelper::AttributeCarriers::retrieveLane(const std::string& id, bool hardFa


GNELane*
GNENetHelper::AttributeCarriers::retrieveLaneGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveLane(const GUIGlObject* glObject, bool hardFail) const {
if (myLanes.count(glObject)) {
return myLanes.at(glObject);
} else if (hardFail) {
Expand Down Expand Up @@ -988,7 +988,7 @@ GNENetHelper::AttributeCarriers::retrieveConnection(const std::string& id, bool


GNEConnection*
GNENetHelper::AttributeCarriers::retrieveConnectionGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveConnection(const GUIGlObject* glObject, bool hardFail) const {
// iterate over connections
for (const auto& connection : myConnections) {
if (connection.second == glObject) {
Expand Down Expand Up @@ -1092,7 +1092,7 @@ GNENetHelper::AttributeCarriers::retrieveAdditionals(const std::vector<SumoXMLTa


GNEAdditional*
GNENetHelper::AttributeCarriers::retrieveAdditionalGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveAdditional(const GUIGlObject* glObject, bool hardFail) const {
// iterate over all additionals
for (const auto &additionalTag : myAdditionals){
for (const auto &additionalPair : additionalTag.second) {
Expand Down Expand Up @@ -1441,7 +1441,7 @@ GNENetHelper::AttributeCarriers::retrieveDemandElements(std::vector<SumoXMLTag>


GNEDemandElement*
GNENetHelper::AttributeCarriers::retrieveDemandElementGL(const GUIGlObject* glObject, bool hardFail) const {
GNENetHelper::AttributeCarriers::retrieveDemandElement(const GUIGlObject* glObject, bool hardFail) const {
// iterate over all demand elements
for (const auto &demandElementTag : myDemandElements){
for (const auto &demandElementPair : demandElementTag.second) {
Expand Down
34 changes: 17 additions & 17 deletions src/netedit/GNENetHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ struct GNENetHelper {
*/
GNEJunction* retrieveJunction(const std::string& id, bool hardFail = true) const;

/**@brief get junction by id
* @param[in] id The id of the desired junction
/**@brief get junction by glObject
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting junction should result in an exception
* @throws UnknownElement
*/
GNEJunction* retrieveJunctionGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEJunction* retrieveJunction(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get junctions
const std::map<std::string, std::pair<const GUIGlObject*, GNEJunction*> >& getJunctions() const;
Expand Down Expand Up @@ -165,11 +165,11 @@ struct GNENetHelper {
/// @name function for crossings
/// @{
/**@brief get Crossing by AC
* @param[in] glObject The GUIGlObject related with the crossing
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting Crossing should result in an exception
* @throws UnknownElement
*/
GNECrossing* retrieveCrossingGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNECrossing* retrieveCrossing(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get crossings
const std::map<const GUIGlObject*, GNECrossing*>& getCrossings() const;
Expand All @@ -191,11 +191,11 @@ struct GNENetHelper {
/// @name function for walkingAreas
/// @{
/**@brief get WalkingArea by GlObject
* @param[in] glObject The GUIGlObject related with the walkingArea
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting WalkingArea should result in an exception
* @throws UnknownElement
*/
GNEWalkingArea* retrieveWalkingAreaGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEWalkingArea* retrieveWalkingArea(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get walkingAreas
const std::map<const GUIGlObject*, GNEWalkingArea*>& getWalkingAreas() const;
Expand Down Expand Up @@ -250,11 +250,11 @@ struct GNENetHelper {
GNEEdge* retrieveEdge(const std::string& id, bool hardFail = true) const;

/**@brief get edge by glObject
* @param[in] glObject The glObject of the desired edge
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting edge should result in an exception
* @throws UnknownElement
*/
GNEEdge* retrieveEdgeGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEEdge* retrieveEdge(const GUIGlObject* glObject, bool hardFail = true) const;

/**@brief get all edges by from and to GNEJunction
* @param[in] id The id of the desired edge
Expand Down Expand Up @@ -299,11 +299,11 @@ struct GNENetHelper {
GNELane* retrieveLane(const std::string& id, bool hardFail = true, bool checkVolatileChange = false) const;

/**@brief get Lane by GlObject
* @param[in] glObject The GUIGlObject related with the lane
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting Lane should result in an exception
* @throws UnknownElement
*/
GNELane* retrieveLaneGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNELane* retrieveLane(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get lanes
const std::map<const GUIGlObject*, GNELane*>& getLanes() const;
Expand Down Expand Up @@ -332,11 +332,11 @@ struct GNENetHelper {
GNEConnection* retrieveConnection(const std::string& id, bool hardFail = true) const;

/**@brief get Connection by GUIGlObject
* @param[in] glObject The GLObject related with the connection element
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting Connection should result in an exception
* @throws UnknownElement
*/
GNEConnection* retrieveConnectionGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEConnection* retrieveConnection(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get connections
const std::map<const GUIGlObject*, GNEConnection*>& getConnections() const;
Expand Down Expand Up @@ -374,10 +374,10 @@ struct GNENetHelper {
GNEAdditional* retrieveAdditionals(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;

/**@brief Returns the named additional
* @param[in] glObject The GLObject related with the additional element
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting additional should result in an exception
*/
GNEAdditional* retrieveAdditionalGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEAdditional* retrieveAdditional(const GUIGlObject* glObject, bool hardFail = true) const;

/**@brief Returns the rerouter interval defined by given begin and end
* @param[in] rerouter ID
Expand Down Expand Up @@ -453,10 +453,10 @@ struct GNENetHelper {
GNEDemandElement* retrieveDemandElements(const std::vector<SumoXMLTag> types, const std::string& id, bool hardFail = true) const;

/**@brief Returns the named demand
* @param[in] id The GLObject related with the demand element
* @param[in] glObject The GUIGlObject associated with the element
* @param[in] hardFail Whether attempts to retrieve a nonexisting demand should result in an exception
*/
GNEDemandElement* retrieveDemandElementGL(const GUIGlObject* glObject, bool hardFail = true) const;
GNEDemandElement* retrieveDemandElement(const GUIGlObject* glObject, bool hardFail = true) const;

/// @brief get selected demand elements
std::vector<GNEDemandElement*> getSelectedDemandElements() const;
Expand Down

0 comments on commit 7287670

Please sign in to comment.