SUMO - Simulation of Urban MObility
NIImporter_RobocupRescue Class Reference

Importer for networks stored in robocup rescue league format. More...

#include <NIImporter_RobocupRescue.h>

Static Public Member Functions

static void loadNetwork (const OptionsCont &oc, NBNetBuilder &nb)
 Loads content of the optionally given RoboCup Rescue League files.

Protected Member Functions

void loadEdges (const std::string &file)
 Loads edges from the given file.
void loadNodes (const std::string &file)
 Loads nodes from the given file.
 NIImporter_RobocupRescue (NBNodeCont &nc, NBEdgeCont &ec)
 Constructor.
 ~NIImporter_RobocupRescue ()
 Destructor.

Protected Attributes

NBEdgeContmyEdgeCont
 The edge container to fill.
NBNodeContmyNodeCont
 The node container to fill.

Detailed Description

Importer for networks stored in robocup rescue league format.

Definition at line 55 of file NIImporter_RobocupRescue.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
[in]ncThe node control to fill
[in]ecThe edge control to fill

Definition at line 101 of file NIImporter_RobocupRescue.cpp.

Destructor.

Definition at line 105 of file NIImporter_RobocupRescue.cpp.


Member Function Documentation

void NIImporter_RobocupRescue::loadEdges ( const std::string &  file) [protected]

Loads edges from the given file.

Parameters:
[in]fileThe file to read edges from

Definition at line 178 of file NIImporter_RobocupRescue.cpp.

References NBEdgeCont::insert(), LANESPREAD_CENTER, LANESPREAD_RIGHT, myEdgeCont, myNodeCont, NBNodeCont::retrieve(), SUMOReal, toString(), and WRITE_ERROR.

void NIImporter_RobocupRescue::loadNetwork ( const OptionsCont oc,
NBNetBuilder nb 
) [static]

Loads content of the optionally given RoboCup Rescue League files.

If the option "robocup-dir" is set, the files contained in the folder are read.

If the option "robocup-dir" is not set, this method simply returns.

Parameters:
[in]ocThe options to use
[in]nbThe network builder to fill

Definition at line 65 of file NIImporter_RobocupRescue.cpp.

References FileHelpers::exists(), NBNetBuilder::getEdgeCont(), NBNetBuilder::getNodeCont(), OptionsCont::getStringVector(), OptionsCont::isSet(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, and WRITE_ERROR.

Referenced by NILoader::load().

void NIImporter_RobocupRescue::loadNodes ( const std::string &  file) [protected]

Loads nodes from the given file.

Parameters:
[in]fileThe file to read nodes from

Definition at line 110 of file NIImporter_RobocupRescue.cpp.

References NBNodeCont::insert(), myNodeCont, SUMOReal, toString(), NILoader::transformCoordinates(), and WRITE_MESSAGE.


Field Documentation

The edge container to fill.

Definition at line 99 of file NIImporter_RobocupRescue.h.

Referenced by loadEdges().

The node container to fill.

Definition at line 96 of file NIImporter_RobocupRescue.h.

Referenced by loadEdges(), and loadNodes().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines