SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ToString.h File Reference
#include <config.h>
#include <sstream>
#include <string>
#include <iomanip>
#include <utils/xml/SUMOXMLDefinitions.h>
#include <utils/common/SUMOVehicleClass.h>
#include "StdDefs.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<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<>
std::string toString (const std::vector< 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
Date
Wed, 23 Sep 2002
Version
Id:
ToString.h 15132 2013-11-17 11:08:07Z behrisch

Definition in file ToString.h.

Function Documentation

template<typename T , typename T_BETWEEN >
std::string joinToString ( const std::vector< T > &  v,
const T_BETWEEN &  between,
std::streamsize  accuracy = OUTPUT_ACCURACY 
)
inline
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 170 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 190 of file ToString.h.

References toString().

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 51 of file ToString.h.

Referenced by MSDetectorControl::add(), ODMatrix::add(), NBLoadedSUMOTLDef::addConnection(), NIImporter_SUMO::addConnection(), NLHandler::addConnection(), NIImporter_SUMO::addEdge(), NIXMLEdgesHandler::addLane(), NLJunctionControlBuilder::addLogicItem(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimTL::NIVissimTLSignal::addTo(), NBNodeCont::analyzeCluster(), NIImporter_OpenStreetMap::RelationHandler::applyRestriction(), NLBuilder::build(), MSAbstractLaneChangeModel::build(), NIVissimConnection::buildEdgeConnections(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NLDetectorBuilder::buildRouteProbe(), TraCIAPI::check_commandGetResult(), TraCIAPI::check_resultState(), NIImporter_OpenStreetMap::RelationHandler::checkEdgeRef(), MSInsertionControl::checkFlows(), RONet::checkFlows(), NBEdge::checkGeometry(), NGFrame::checkOptions(), NIFrame::checkOptions(), NLDetectorBuilder::checkSampleInterval(), MSNet::closeSimulation(), NBTrafficLightDefinition::collectAllLinks(), NBNetBuilder::compute(), DijkstraRouterTTBase< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), ODMatrix::computeDeparts(), NBNode::computeInternalLaneShape(), RODFNet::computeTypes(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NIXMLEdgesHandler::deleteEdge(), NIXMLNodesHandler::deleteNode(), NBTrafficLightLogic::deletePhase(), GUISelectedStorage::deselect(), MSLane::detectCollisions(), GUICalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUIVehicle::drawLinkItem(), GUILane::drawLinkNo(), GUILane::drawTLSLinkNo(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), MSE3Collector::enter(), OptionsLoader::error(), MSCalibrator::execute(), MSVehicle::executeMove(), OptionsLoader::fatalError(), NIImporter_OpenStreetMap::RelationHandler::findEdgeRef(), MSDevice_Example::generateOutput(), NIImporter_DlrNavteq::EdgesHandler::getColumn(), NLDetectorBuilder::getEdgeChecking(), NBEdge::Connection::getInternalLaneID(), NLDetectorBuilder::getLaneChecking(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), NIVissimDistrictConnection::getMeanSpeed(), GeomHelper::getNormal90D_CW(), GUISUMOAbstractView::getObjectsInBoundary(), GUIVehicle::getParameterWindow(), GUIEdge::getPopUpMenu(), GUILane::getPopUpMenu(), Line::getPositionAtDistance(), Line::getPositionAtDistance2D(), ROEdge::getStoredEffort(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchAreaNo(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), ROEdge::getTravelTime(), TraCIServerAPI_VehicleType::getVariable(), NBNodeCont::guessTLs(), MSVehicle::Influencer::influenceChangeDecision(), GUICompleteSchemeStorage::init(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), MSEdge::insertVehicle(), SUMOVehicleParameter::interpretEdgePos(), MSLane::isInsertionSuccess(), NBNodeCont::joinTLS(), joinToString(), MSE3Collector::leave(), NILoader::load(), PCLoaderVisum::load(), PCLoaderArcView::load(), NIImporter_ArcView::load(), NLBuilder::load(), NIImporter_OpenStreetMap::load(), NIImporter_RobocupRescue::loadEdges(), GUISelectedStorage::loadIDs(), PCLoaderOSM::loadIfSet(), MFXImageHelper::loadImage(), NIImporter_OpenDrive::loadNetwork(), NIImporter_RobocupRescue::loadNodes(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), main(), MSCFModel_SmartSK::moveHelper(), MSCFModel_Daniel1::moveHelper(), NIXMLEdgesHandler::myEndElement(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), GUISettingsHandler::myStartElement(), NIXMLConnectionsHandler::myStartElement(), PCLoaderOSM::NodesHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), PCLoaderOSM::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::NodesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::RelationHandler::myStartElement(), NIImporter_OpenDrive::myStartElement(), NIVissimAbstractEdge::NIVissimAbstractEdge(), GUIDialog_ViewSettings::onCmdColorChange(), GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition(), GUIGLObjectPopupMenu::onCmdCopyCursorPosition(), GUIApplicationWindow::openNewView(), MSRouteHandler::openRoute(), MSRouteHandler::openRouteDistribution(), PlainXMLFormatter::openTag(), OutputDevice_Network::OutputDevice_Network(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Point(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), RONetHandler::parseEdge(), NIXMLConnectionsHandler::parseLaneBound(), SUMOSAXReader::parseNext(), GUISettingsHandler::parseTextSettings(), ODMatrix::parseTimeLine(), SUMOVehicleParserHelper::parseVTypeEmbedded(), MSLCM_JE2013::patchSpeed(), GUIVisualizationTextSettings::print(), NBNodeCont::printBuiltNodesStatistics(), TraCIServerAPI_Vehicle::processSet(), ODMatrix::readO(), NBNodeCont::removeSelfLoops(), MSBaseVehicle::replaceRouteEdges(), PCPolyContainer::report(), NIImporter_DlrNavteq::EdgesHandler::report(), NBRequest::reportWarnings(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), NIImporter_OpenDrive::revisitLaneSections(), RONet::saveAndRemoveRoutesUntil(), MSVehicle::saveState(), GUISelectedStorage::select(), RODFRouteCont::setID(), MFXAddEditTypedTable::setItemFromControl(), MFXAddEditTypedTable::setItemFromControl_NoRelease(), GeoConvHelper::setLoaded(), PositionVector::splitAt(), NBEdge::splitGeometry(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), GUISelectedStorage::toggleSelection(), TraCIServer::TraCIServer(), NIXMLEdgesHandler::tryGetLaneSpread(), SAXWeightsHandler::tryParse(), GUISUMOAbstractView::updatePositionInformation(), 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_XML::writeNodes(), GUICompleteSchemeStorage::writeSettings(), ROLoader::writeStats(), TraCIServer::writeStatusCmd(), NWWriter_SUMO::writeSUMOTime(), MSFullExport::writeVehicles(), RORoute::writeXMLDefinition(), MSRouteProbe::writeXMLOutput(), MSCalibrator::writeXMLOutput(), GeoConvHelper::x2cartesian(), and SUMOAbstractRouter< ROEdge, ROVehicle >::~SUMOAbstractRouter().

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

Definition at line 128 of file ToString.h.

References UNUSED_PARAMETER.

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

Definition at line 158 of file ToString.h.

References joinToString().

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

Definition at line 164 of file ToString.h.

References joinToString().

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

Definition at line 185 of file ToString.h.

References joinToString().

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

Definition at line 205 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 89 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