![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <StringBijection.h>
Data Structures | |
| struct | Entry |
| bijection entry More... | |
Public Member Functions | |
| void | addAlias (const std::string str, const T key) |
| add alias to the given key | |
| void | addKeysInto (std::vector< T > &list) const |
| add the given list of keys | |
| T | get (const std::string &str) const |
| get key | |
| std::string | getMultilineString () const |
| get multiline string (all strings concatenated and separated by ' ') | |
| const std::string & | getString (const T key) const |
| get string | |
| std::vector< std::string > | getStrings () const |
| get all strings | |
| std::vector< T > | getValues () const |
| get all keys | |
| bool | has (const T key) const |
| check if the given key exist | |
| bool | hasString (const std::string &str) const |
| check if the given string exist | |
| void | insert (const std::string str, const T key, bool checkDuplicates=true) |
| insert string and their associated key | |
| void | remove (const std::string str, const T key) |
| remove string | |
| int | size () const |
| get number of key-attributes | |
| StringBijection () | |
| default constructor | |
| StringBijection (Entry entries[], T terminatorKey, bool checkDuplicates=true) | |
| parameter constructor | |
Private Attributes | |
| std::map< std::string, T > | myString2T |
| map with the keys vinculated with strings | |
| std::map< T, std::string > | myT2String |
| map with the strings vinculated with keys | |
Template container for maintaining a bidirectional map between strings and something else It is not always a bijection since it allows for duplicate entries on both sides if either checkDuplicates is set to false in the constructor or the insert function or if the addAlias function is used.
Definition at line 39 of file StringBijection.h.
|
inline |
default constructor
Definition at line 57 of file StringBijection.h.
|
inline |
parameter constructor
Definition at line 60 of file StringBijection.h.
References StringBijection< T >::insert().
|
inline |
add alias to the given key
Definition at line 83 of file StringBijection.h.
References StringBijection< T >::myString2T.
Referenced by HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), PollutantsInterface::Helper::Helper(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), and HelpersHBEFA4::HelpersHBEFA4().
|
inline |
add the given list of keys
Definition at line 146 of file StringBijection.h.
References StringBijection< T >::myT2String.
|
inline |
get key
Definition at line 94 of file StringBijection.h.
References StringBijection< T >::hasString(), and StringBijection< T >::myString2T.
Referenced by NIImporter_SUMO::addConnection(), NIImporter_SUMO::addEdge(), NIXMLEdgesHandler::addEdge(), NBNodeCont::analyzeCluster(), NBNetBuilder::applyOptions(), SUMOVehicleParserHelper::beginVTypeParsing(), NIVisumTL::build(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), NBNetBuilder::compute(), NBOwnTLDef::computeLogicAndConts(), NBTrafficLightLogicCont::computeLogics(), GNENet::createJunction(), SUMOSAXAttributes::fromString(), HelpersHBEFA3::getClass(), HelpersHBEFA4::getClass(), HelpersPHEMlight::getClass(), HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), PHEMCEP::GetEmission(), NWWriter_OpenDrive::getID(), GNEInternalLane::getPopUpMenu(), GNELane::getPopUpMenu(), NIImporter_OpenDrive::getTLSSecure(), GNEChange_TLS::GNEChange_TLS(), NBNodeCont::guessTLs(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), HelpersHBEFA4::HelpersHBEFA4(), NLHandler::initTrafficLightLogic(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NIImporter_OpenStreetMap::insertNodeChecking(), MSDispatch_TraCI::interpretDispatch(), NBNodeCont::joinNodeCluster(), NIImporter_VISUM::loadLanguage(), PCLoaderVisum::loadLanguage(), NIXMLTypesHandler::myStartElement(), RONetHandler::parseConnection(), NLHandler::parseLinkDir(), NLHandler::parseLinkState(), NIXMLNodesHandler::processNodeType(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSDispatch_TraCI::removeReservation(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), GNEPOI::setAttribute(), GNEVType::setAttribute(), GNEEdgeType::setAttribute(), GNEJunction::setAttribute(), PointOfInterest::setIcon(), GNEMoveElementLaneDouble::setMovingAttribute(), MSDispatch_TraCI::splitReservation(), SUMOVTypeParameter::SUMOVTypeParameter(), NIXMLEdgesHandler::tryGetLaneSpread(), NBNodeTypeComputer::validateRailCrossings(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeNodes().
|
inline |
get multiline string (all strings concatenated and separated by '
')
Definition at line 155 of file StringBijection.h.
References StringBijection< T >::myT2String.
|
inline |
get string
Definition at line 103 of file StringBijection.h.
References StringBijection< T >::has(), and StringBijection< T >::myT2String.
Referenced by GUIGlObject::createFullName(), HelpersHBEFA3::getAmitranVehicleClass(), HelpersHBEFA4::getAmitranVehicleClass(), HelpersPHEMlight::getAmitranVehicleClass(), GNEPOI::getAttribute(), GNEVType::getAttribute(), GNEEdge::getAttribute(), GNEEdgeType::getAttribute(), GNEJunction::getAttribute(), HelpersHBEFA3::getEuroClass(), HelpersHBEFA4::getEuroClass(), HelpersPHEMlight::getEuroClass(), HelpersHBEFA3::getFuel(), HelpersHBEFA4::getFuel(), HelpersPHEMlight::getFuel(), HelpersPHEMlight5::getFuel(), PointOfInterest::getIconStr(), SUMOVehicleParameter::getInsertionChecks(), LIBSUMO_NAMESPACE::Lane::getLinks(), GNEMoveElementLaneDouble::getMovingAttribute(), LIBSUMO_NAMESPACE::Vehicle::getNextLinks(), HelpersPHEMlight::getWeight(), PCLoaderVisum::load(), GNESelectorFrame::SelectionOperation::loadFromFile(), NIImporter_VISUM::NIImporter_VISUM(), GNESelectorFrame::SelectionOperation::onCmdSave(), NIImporter_VISUM::parse_AreaSubPartElement(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Connectors_legacy(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Kante(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Network(), NIImporter_VISUM::parse_Nodes(), NIImporter_VISUM::parse_PartOfArea(), NIImporter_VISUM::parse_Phases(), NIImporter_VISUM::parse_Point(), NIImporter_VISUM::parse_SignalGroups(), NIImporter_VISUM::parse_stopPoints(), NIImporter_VISUM::parse_TrafficLights(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_Types(), NIImporter_VISUM::parse_VSysTypes(), AdditionalHandler::parseChargingStationAttributes(), MeanDataHandler::parseEdgeMeanData(), MeanDataHandler::parseLaneMeanData(), AdditionalHandler::parsePOIAttributes(), GNEMeanData::setAttribute(), toString< FringeType >(), toString< InsertionCheck >(), toString< LaneChangeModel >(), toString< LaneSpreadFunction >(), toString< LinkDirection >(), toString< LinkState >(), toString< ParkingType >(), toString< PersonMode >(), toString< RightOfWay >(), toString< RoundaboutType >(), toString< SumoXMLEdgeFunc >(), toString< SumoXMLNodeType >(), toString< TrafficLightLayout >(), toString< TrafficLightType >(), NBSign::writeAsPOI(), MSDriveWay::writeBlockVehicles(), GNEDetector::writeDetectorValues(), GNEMeanData::writeMeanData(), and NIImporter_OpenDrive::writeRoadObjects().
|
inline |
get all strings
Definition at line 128 of file StringBijection.h.
References StringBijection< T >::myT2String.
Referenced by GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelParameters(), GNETagPropertiesDatabase::fillNetworkElements(), GNEInternalLane::getPopUpMenu(), GNELane::getPopUpMenu(), and toString< LaneChangeAction >().
|
inline |
get all keys
Definition at line 137 of file StringBijection.h.
References StringBijection< T >::myT2String.
Referenced by SUMOVehicleParameter::getInsertionChecks(), GNEAttributesEditorRow::showValueComboBox(), and SUMOVehicleParameter::write().
|
inline |
check if the given key exist
Definition at line 118 of file StringBijection.h.
References StringBijection< T >::myT2String.
Referenced by MSDispatch_TraCI::addReservation(), StringBijection< T >::getString(), and StringBijection< T >::insert().
|
inline |
check if the given string exist
Definition at line 113 of file StringBijection.h.
References StringBijection< T >::myString2T.
Referenced by GNEAdditionalHandler::buildPOI(), GNEAdditionalHandler::buildPOIGeo(), GNEAdditionalHandler::buildPOILane(), AdditionalHandler::checkDetectPersons(), NBFrame::checkOptions(), GNENet::createJunction(), StringBijection< T >::get(), HelpersHBEFA3::getClass(), HelpersHBEFA4::getClass(), HelpersPHEMlight::getClass(), HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), PHEMCEP::GetEmission(), NWWriter_OpenDrive::getID(), StringBijection< T >::insert(), MSDispatch_TraCI::interpretDispatch(), GNEDetector::isDetectorValid(), GNEMoveElementLaneDouble::isMovingAttributeValid(), GNEChargingStation::isValid(), GNEMultiEntryExitDetector::isValid(), GNEPOI::isValid(), GNEMeanData::isValid(), GNEVType::isValid(), GNEEdge::isValid(), GNEEdgeType::isValid(), GNEJunction::isValid(), NIImporter_VISUM::loadLanguage(), PCLoaderVisum::loadLanguage(), MSDispatch_TraCI::removeReservation(), and MSDispatch_TraCI::splitReservation().
|
inline |
insert string and their associated key
Definition at line 68 of file StringBijection.h.
References StringBijection< T >::has(), StringBijection< T >::hasString(), StringBijection< T >::myString2T, and StringBijection< T >::myT2String.
Referenced by MSDispatch_TraCI::addReservation(), HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), NWWriter_OpenDrive::getID(), PollutantsInterface::Helper::Helper(), HelpersHBEFA::HelpersHBEFA(), HelpersHBEFA3::HelpersHBEFA3(), HelpersHBEFA4::HelpersHBEFA4(), NIImporter_VISUM::loadLanguage(), PCLoaderVisum::loadLanguage(), PHEMCEP::PHEMCEP(), MSDispatch_TraCI::splitReservation(), and StringBijection< T >::StringBijection().
|
inline |
remove string
Definition at line 88 of file StringBijection.h.
References StringBijection< T >::myString2T, and StringBijection< T >::myT2String.
Referenced by MSDispatch_TraCI::fulfilledReservation(), HelpersPHEMlight::getClassByName(), NIImporter_VISUM::loadLanguage(), PCLoaderVisum::loadLanguage(), and MSDispatch_TraCI::removeReservation().
|
inline |
get number of key-attributes
Definition at line 123 of file StringBijection.h.
References StringBijection< T >::myString2T.
Referenced by MSDispatch_TraCI::fulfilledReservation().
|
private |
map with the keys vinculated with strings
Definition at line 168 of file StringBijection.h.
Referenced by StringBijection< T >::addAlias(), StringBijection< T >::get(), StringBijection< T >::hasString(), StringBijection< T >::insert(), StringBijection< T >::remove(), and StringBijection< T >::size().
|
private |
map with the strings vinculated with keys
Definition at line 171 of file StringBijection.h.
Referenced by StringBijection< T >::addKeysInto(), StringBijection< T >::getMultilineString(), StringBijection< T >::getString(), StringBijection< T >::getStrings(), StringBijection< T >::getValues(), StringBijection< T >::has(), StringBijection< T >::insert(), and StringBijection< T >::remove().