SUMO - Simulation of Urban MObility
NWFrame Class Reference

Sets and checks options for netwrite; saves the network. More...

#include <NWFrame.h>

Collaboration diagram for NWFrame:
Collaboration graph

Static Public Member Functions

static bool checkOptions ()
 Checks set options from the OptionsCont-singleton for being valid. More...
 
static void fillOptions (bool forNetgen)
 Inserts options used by the network writer. More...
 
static void writeNetwork (const OptionsCont &oc, NBNetBuilder &nb)
 Writes the network stored in the given net builder. More...
 
static void writePositionLong (const Position &pos, OutputDevice &dev)
 Writes the given position to device in long format (one attribute per dimension) More...
 

Static Public Attributes

static const std::string MAJOR_VERSION = "version=\"0.27\""
 The version number for written files. More...
 

Detailed Description

Sets and checks options for netwrite; saves the network.

Definition at line 52 of file NWFrame.h.

Member Function Documentation

bool NWFrame::checkOptions ( )
static

Checks set options from the OptionsCont-singleton for being valid.

Returns
Whether needed options are set and have proper values

Definition at line 111 of file NWFrame.cpp.

References OptionsCont::getBool(), FileHelpers::getConfigurationRelative(), OptionsCont::getOptions(), OptionsCont::getString(), OptionsCont::isSet(), OptionsCont::setDefault(), and WRITE_ERROR.

Referenced by checkOptions(), and GNELoadThread::run().

void NWFrame::fillOptions ( bool  forNetgen)
static

Inserts options used by the network writer.

Definition at line 63 of file NWFrame.cpp.

References OptionsCont::addDescription(), OptionsCont::addSynonyme(), OptionsCont::doRegister(), and OptionsCont::getOptions().

Referenced by fillOptions(), and GNELoadThread::fillOptions().

void NWFrame::writePositionLong ( const Position pos,
OutputDevice dev 
)
static

Writes the given position to device in long format (one attribute per dimension)

Definition at line 151 of file NWFrame.cpp.

References SUMO_ATTR_X, SUMO_ATTR_Y, SUMO_ATTR_Z, OutputDevice::writeAttr(), Position::x(), Position::y(), and Position::z().

Referenced by NWWriter_SUMO::writeInternalNodes(), NWWriter_SUMO::writeJunction(), and NWWriter_XML::writeNodes().

Field Documentation

const std::string NWFrame::MAJOR_VERSION = "version=\"0.27\""
static

The documentation for this class was generated from the following files: