SUMO - Simulation of Urban MObility
ToString.h File Reference
#include <config.h>
#include <sstream>
#include <string>
#include <iomanip>
#include <algorithm>
#include <utils/xml/SUMOXMLDefinitions.h>
#include <utils/common/SUMOVehicleClass.h>
#include <utils/common/Named.h>
#include "StdDefs.h"
Include dependency graph for ToString.h:

Go to the source code of this file.

Functions

template<typename T , typename T_BETWEEN >
std::string joinToString (const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename T , typename T_BETWEEN >
std::string joinToString (const std::set< T > &s, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename KEY , typename VAL , typename T_BETWEEN , typename T_BETWEEN_KEYVAL >
std::string joinToString (const std::map< KEY, VAL > &s, const T_BETWEEN &between, const T_BETWEEN_KEYVAL &between_keyval, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename T , typename T_BETWEEN >
std::string joinToStringSorting (const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename T >
std::string toHex (const T i, std::streamsize numDigits=0)
 
template<class T >
std::string toString (const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename V >
std::string toString (const std::vector< V * > &v, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename V >
std::string toString (const typename std::vector< V * >::const_iterator &b, const typename std::vector< V * >::const_iterator &e, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<typename V >
std::string toString (const std::set< V * > &v, std::streamsize accuracy=OUTPUT_ACCURACY)
 
template<>
std::string toString (const std::vector< int > &v, std::streamsize accuracy)
 
template<>
std::string toString (const std::vector< long long int > &v, std::streamsize accuracy)
 
template<>
std::string toString (const std::vector< SUMOReal > &v, std::streamsize accuracy)
 
template<>
std::string toString (const std::set< std::string > &v, std::streamsize)
 
template<>
std::string toString (const std::map< std::string, std::string > &v, std::streamsize)
 
template<>
std::string toString< LaneChangeModel > (const LaneChangeModel &model, std::streamsize accuracy)
 
template<>
std::string toString< LaneSpreadFunction > (const LaneSpreadFunction &lsf, std::streamsize accuracy)
 
template<>
std::string toString< LinkDirection > (const LinkDirection &linkDir, std::streamsize accuracy)
 
template<>
std::string toString< LinkState > (const LinkState &linkState, std::streamsize accuracy)
 
template<>
std::string toString< SUMOVehicleClass > (const SUMOVehicleClass &vClass, std::streamsize accuracy)
 
template<>
std::string toString< SumoXMLAttr > (const SumoXMLAttr &attr, std::streamsize accuracy)
 
template<>
std::string toString< SumoXMLEdgeFunc > (const SumoXMLEdgeFunc &edgeFunc, std::streamsize accuracy)
 
template<>
std::string toString< SumoXMLNodeType > (const SumoXMLNodeType &nodeType, std::streamsize accuracy)
 
template<>
std::string toString< SumoXMLTag > (const SumoXMLTag &tag, std::streamsize accuracy)
 
template<>
std::string toString< TrafficLightType > (const TrafficLightType &type, std::streamsize accuracy)
 

Detailed Description

Author
Christian Roessel
Daniel Krajzewicz
Jakob Erdmann
Michael Behrisch
Date
Wed, 23 Sep 2002
Version
Id
ToString.h 20433 2016-04-13 08:00:14Z behrisch

Definition in file ToString.h.

Function Documentation

template<typename T , typename T_BETWEEN >
std::string joinToString ( const std::set< T > &  s,
const T_BETWEEN &  between,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Definition at line 213 of file ToString.h.

References toString().

template<typename KEY , typename VAL , typename T_BETWEEN , typename T_BETWEEN_KEYVAL >
std::string joinToString ( const std::map< KEY, VAL > &  s,
const T_BETWEEN &  between,
const T_BETWEEN_KEYVAL &  between_keyval,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Definition at line 233 of file ToString.h.

References toString().

template<typename T , typename T_BETWEEN >
std::string joinToStringSorting ( const std::vector< T > &  v,
const T_BETWEEN &  between,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline
template<class T >
std::string toString ( const T &  t,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Template for conversions from origin format to string representation (when supplied by c++/the stl)

Definition at line 54 of file ToString.h.

Referenced by NIImporter_SUMO::_loadNetwork(), MSDetectorControl::add(), ODMatrix::add(), IntermodalRouter< E, L, N, V >::addAccess(), NBLoadedSUMOTLDef::addConnection(), NIImporter_SUMO::addConnection(), NLHandler::addConnection(), NIImporter_SUMO::addEdge(), NIXMLEdgesHandler::addLane(), NLJunctionControlBuilder::addLogicItem(), NLHandler::addPhase(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NBEdge::addRestrictedLane(), GNENet::addReversedEdge(), NBEdgeCont::addRoundabout(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSBaseVehicle::addStops(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimTL::NIVissimTLSignal::addTo(), ROPerson::addTrip(), GNEAttributeCarrier::allowedAttributes(), NBNodeCont::analyzeCluster(), NIImporter_OpenStreetMap::RelationHandler::applyRestriction(), GNEInspector::AttrInput::AttrInput(), GNEInspector::AttrPanel::AttrPanel(), NLEdgeControlBuilder::build(), MSAbstractLaneChangeModel::build(), CHRouter< E, V, PF >::buildContractionHierarchy(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIVissimConnection::buildEdgeConnections(), GNEConnector::buildIinternalLanes(), GNETLSEditor::buildIinternalLanes(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NLDetectorBuilder::buildRouteProbe(), MELoop::buildSegmentsFor(), GUITriggerBuilder::buildStoppingPlace(), NLTriggerBuilder::buildStoppingPlace(), MSFrame::buildStreams(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MELoop::changeSegment(), TraCIAPI::check_commandGetResult(), TraCIAPI::check_resultState(), NBNode::checkCrossing(), NIImporter_OpenStreetMap::RelationHandler::checkEdgeRef(), RONet::checkFlows(), NBEdge::checkGeometry(), NGFrame::checkOptions(), NIFrame::checkOptions(), MSSOTLTrafficLightLogic::checkPhases(), NLDetectorBuilder::checkSampleInterval(), MSNet::closeSimulation(), NLJunctionControlBuilder::closeTrafficLightLogic(), MSRouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdgeVectors(), PedestrianRouter< E, L, N, V, DijkstraRouterTT< IntermodalEdge< E, L, N, V >, IntermodalTrip< E, N, V >, prohibited_withPermissions< IntermodalEdge< E, L, N, V >, IntermodalTrip< E, N, V > > > >::compute(), NBNetBuilder::compute(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), IntermodalRouter< E, L, N, V >::compute(), CHRouter< E, V, PF >::compute(), ODMatrix::computeDeparts(), NBNode::computeInternalLaneShape(), NBNode::computeLogic(), NBNode::computeNodeShape(), computeRoutes(), NIImporter_OpenDrive::computeShapes(), RODFNet::computeTypes(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), GLHelper::debugVertices(), GNEReferenceCounter::decRef(), NIXMLEdgesHandler::deleteEdge(), GNEEdge::deleteGeometry(), GNENet::deleteJunction(), NIXMLNodesHandler::deleteNode(), NBTrafficLightLogic::deletePhase(), GUISelectedStorage::deselect(), MSInsertionControl::determineCandidates(), GNEAttributeCarrier::discreteChoices(), GUICalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNELane::drawLane2LaneConnections(), GUIBaseVehicle::drawLinkItem(), GUILane::drawLinkNo(), GUILane::drawTLSLinkNo(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), MSE3Collector::enter(), OptionsLoader::error(), METriggeredCalibrator::execute(), MSCalibrator::execute(), MSVehicle::executeMove(), OptionsLoader::fatalError(), NIImporter_OpenStreetMap::RelationHandler::findEdgeRef(), MSDevice_Example::generateOutput(), MSLink::getApproachingLane(), GNEPOI::getAttribute(), GNECrossing::getAttribute(), GNELane::getAttribute(), GNEPoly::getAttribute(), GNEJunction::getAttribute(), GNEEdge::getAttribute(), NIImporter_DlrNavteq::EdgesHandler::getColumn(), NBEdge::getConnection(), GNEAttributeCarrier::getDescription(), NLDetectorBuilder::getEdgeChecking(), MSMeanData_Amitran::getEdgeID(), NBNode::getEdgesSortedByAngleAtNodeCenter(), NBEdge::Connection::getInternalLaneID(), ROMAAssignments::getKPaths(), NLDetectorBuilder::getLaneChecking(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), GNESelector::getMatches(), NIVissimDistrictConnection::getMeanSpeed(), MSPModel_Striping::getNextLane(), GUISUMOAbstractView::getObjectsInBoundary(), GUIPerson::getParameterWindow(), GUIMEVehicle::getParameterWindow(), GUIVehicle::getParameterWindow(), GUINet::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), GNELane::getPopUpMenu(), GUIEdge::getPopUpMenu(), GUILane::getPopUpMenu(), GNESelector::getStats(), ROEdge::getStoredEffort(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), GUIPropertyScheme< T >::getTagName(), ROMAAssignments::getTravelTime(), ROEdge::getTravelTime(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), TraCIServerAPI_VehicleType::getVariable(), MSVehicleControl::getWaitingVehicle(), NBHeightMapper::getZ(), GNEChange_Attribute::GNEChange_Attribute(), GNESelector::GNESelector(), NBNode::guessCrossings(), NBNodeCont::guessTLs(), MSLane::handleCollision(), HelpersHBEFA::HelpersHBEFA(), GNEViewNet::hotkeyEnter(), GNEReferenceCounter::incRef(), ROMAAssignments::incremental(), MSVehicle::Influencer::influenceChangeDecision(), MSTrafficLightLogic::init(), GUICompleteSchemeStorage::init(), GNETLSEditor::initPhaseTable(), GNEDialog_Wizard::InputFloat::InputFloat(), GNEDialog_Wizard::InputInt::InputInt(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), MSEdge::insertVehicle(), SUMOVehicleParameter::interpretEdgePos(), MSLane::isInsertionSuccess(), GNEPOI::isValid(), GNECrossing::isValid(), GNELane::isValid(), GNEPoly::isValid(), GNEJunction::isValid(), GNEEdge::isValid(), NBNodeCont::joinJunctions(), GNENet::joinSelectedJunctions(), NBNodeCont::joinTLS(), joinToString(), MSE3Collector::leave(), NILoader::load(), PCLoaderVisum::load(), PCLoaderArcView::load(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), NIImporter_RobocupRescue::loadEdges(), GUISelectedStorage::loadIDs(), PCLoaderOSM::loadIfSet(), NBHeightMapper::loadIfSet(), MFXImageHelper::loadImage(), loadNet(), ROLoader::loadNet(), NIImporter_OpenDrive::loadNetwork(), NIImporter_RobocupRescue::loadNodes(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), NILoader::loadXML(), main(), GNEViewNet::mergeJunctions(), MSCFModel_Daniel1::moveHelper(), MSCFModel_SmartSK::moveHelper(), NIXMLEdgesHandler::myEndElement(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), GUISettingsHandler::myStartElement(), ODAmitranHandler::myStartElement(), NIXMLConnectionsHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), PCLoaderOSM::NodesHandler::myStartElement(), PCLoaderOSM::RelationsHandler::myStartElement(), NIImporter_OpenStreetMap::NodesHandler::myStartElement(), PCLoaderOSM::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::RelationHandler::myStartElement(), NIImporter_OpenDrive::myStartElement(), NIVissimAbstractEdge::NIVissimAbstractEdge(), MSE3Collector::MSE3EntryReminder::notifyLeave(), GUIDialog_ViewSettings::onCmdColorChange(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), GUIGLObjectPopupMenu::onCmdCopyCursorPosition(), GNETLSEditor::onCmdDefCreate(), GNETLSEditor::onCmdDefDelete(), GNETLSEditor::onCmdDefSwitch(), GNEViewNet::onCmdNodeShape(), GNEInspector::AttrInput::onCmdOpenAttributeEditor(), GNETLSEditor::onCmdPhaseEdit(), GNESelector::onCmdSelMBTag(), GUIApplicationWindow::openNewView(), GNEApplicationWindow::openNewView(), MSRouteHandler::openRoute(), MSRouteHandler::openRouteDistribution(), PlainXMLFormatter::openTag(), OutputDevice_Network::OutputDevice_Network(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Point(), NLTriggerBuilder::parseAndBuildStoppingPlace(), RONetHandler::parseConnection(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), RONetHandler::parseEdge(), NIXMLConnectionsHandler::parseLaneBound(), SUMOSAXReader::parseNext(), GUISettingsHandler::parseSizeSettings(), RONetHandler::parseStoppingPlace(), GUISettingsHandler::parseTextSettings(), ODMatrix::parseTimeLine(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSRouteHandler::parseWalkPos(), MSRouteHandler::parseWalkPositions(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), OutputDevice_Network::postWriteHook(), NBNodeCont::printBuiltNodesStatistics(), TraCIServerAPI_TLS::processSet(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSPModel_Striping::PState::PState(), ODMatrix::readO(), NBNodeCont::removeSelfLoops(), GNENet::replaceJunctionByGeometry(), MSBaseVehicle::replaceRouteEdges(), PCPolyContainer::report(), NIImporter_DlrNavteq::EdgesHandler::report(), NBRequest::reportWarnings(), GNEEdge::resetEndpoint(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), GNENet::reverseEdge(), NIImporter_OpenDrive::revisitLaneSections(), RONet::saveAndRemoveRoutesUntil(), MSLCM_JE2013::saveBlockerLength(), MEVehicle::saveState(), MSVehicle::saveState(), GNEPOI::saveToFile(), GUISelectedStorage::select(), GNEPOI::setAttribute(), GNECrossing::setAttribute(), GNELane::setAttribute(), GNEPoly::setAttribute(), GNEJunction::setAttribute(), GNEEdge::setAttribute(), GNEEdge::setEndpoint(), RODFRouteCont::setID(), MFXAddEditTypedTable::setItemFromControl(), MFXAddEditTypedTable::setItemFromControl_NoRelease(), GeoConvHelper::setLoaded(), MSLink::setRequestInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), PositionVector::splitAt(), GNENet::splitEdge(), NBEdge::splitGeometry(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), ROMAAssignments::sue(), MELoop::teleportVehicle(), GUISelectedStorage::toggleSelection(), TraCIServer::TraCIServer(), NIXMLEdgesHandler::tryGetLaneSpread(), SAXWeightsHandler::tryParse(), GNETLSEditor::updateCycleDuration(), GNEConnector::updateDescription(), GUISUMOAbstractView::updatePositionInformation(), CHRouter< E, V, PF >::CHInfo::updateShortcuts(), MSPModel_Striping::PState::walk(), OptionsLoader::warning(), MSFCDExport::write(), SUMOVTypeParameter::write(), MSInstantInductLoop::write(), SUMOVehicleParameter::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), PlainXMLFormatter::writeAttr(), BinaryFormatter::writeAttr(), NWWriter_SUMO::writeConnection(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), ODMatrix::writeFlows(), NWWriter_SUMO::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), GUICompleteSchemeStorage::writeSettings(), ROLoader::writeStats(), NWWriter_SUMO::writeSUMOTime(), MSAmitranTrajectories::writeVehicle(), RORoute::writeXMLDefinition(), MSRouteProbe::writeXMLOutput(), MSCalibrator::writeXMLOutput(), GeoConvHelper::x2cartesian(), GeoConvHelper::x2cartesian_const(), GNEChange_Attribute::~GNEChange_Attribute(), GNEReferenceCounter::~GNEReferenceCounter(), and SUMOAbstractRouter< E, IntermodalTrip< E, N, V > >::~SUMOAbstractRouter().

template<typename V >
std::string toString ( const std::vector< V * > &  v,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Definition at line 140 of file ToString.h.

template<typename V >
std::string toString ( const typename std::vector< V * >::const_iterator &  b,
const typename std::vector< V * >::const_iterator &  e,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Definition at line 146 of file ToString.h.

References Named::getIDSecure(), and UNUSED_PARAMETER.

template<typename V >
std::string toString ( const std::set< V * > &  v,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline

Definition at line 184 of file ToString.h.

References joinToStringSorting(), and UNUSED_PARAMETER.

template<>
std::string toString ( const std::vector< int > &  v,
std::streamsize  accuracy 
)
inline

Definition at line 195 of file ToString.h.

References joinToString().

template<>
std::string toString ( const std::vector< long long int > &  v,
std::streamsize  accuracy 
)
inline

Definition at line 201 of file ToString.h.

References joinToString().

template<>
std::string toString ( const std::vector< SUMOReal > &  v,
std::streamsize  accuracy 
)
inline

Definition at line 207 of file ToString.h.

References joinToString().

template<>
std::string toString ( const std::set< std::string > &  v,
std::streamsize   
)
inline

Definition at line 228 of file ToString.h.

References joinToString().

template<>
std::string toString ( const std::map< std::string, std::string > &  v,
std::streamsize   
)
inline

Definition at line 248 of file ToString.h.

References joinToString().

template<>
std::string toString< LaneChangeModel > ( const LaneChangeModel model,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< LaneSpreadFunction > ( const LaneSpreadFunction lsf,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< LinkDirection > ( const LinkDirection linkDir,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< LinkState > ( const LinkState linkState,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< SUMOVehicleClass > ( const SUMOVehicleClass vClass,
std::streamsize  accuracy 
)
inline

Definition at line 101 of file ToString.h.

References SumoVehicleClassStrings, and UNUSED_PARAMETER.

template<>
std::string toString< SumoXMLAttr > ( const SumoXMLAttr attr,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< SumoXMLEdgeFunc > ( const SumoXMLEdgeFunc edgeFunc,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< SumoXMLNodeType > ( const SumoXMLNodeType nodeType,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< SumoXMLTag > ( const SumoXMLTag tag,
std::streamsize  accuracy 
)
inline
template<>
std::string toString< TrafficLightType > ( const TrafficLightType type,
std::streamsize  accuracy 
)
inline