WSF
XWsfRouteNetwork Class Reference

#include <XWsfRouteNetwork.hpp>

Inheritance diagram for XWsfRouteNetwork:

Classes

class  NetworkInput

Public Member Functions

 XWsfRouteNetwork ()=default
virtual ~XWsfRouteNetwork ()=default
virtual bool Initialize (const WsfScenario &aScenario)
 If Initialize is redefined, make sure to call XWsfRouteNetwork::Initialize().
virtual void Update (double)
 An update method for applications that need simulation updates.
virtual bool ProcessInput (UtInput &aInput)

Protected Types

using Networks = std::vector<ut::CloneablePtr<NetworkInput>>

Protected Member Functions

 XWsfRouteNetwork (const XWsfRouteNetwork &aSrc)=default
XWsfRouteNetworkoperator= (const XWsfRouteNetwork &aRhs)=delete
virtual bool ProcessCommand (UtInput &aInput, NetworkInput &aNetworkInput)

Protected Attributes

ut::Random mRandom
Networks mNetworks

Detailed Description

XWsfRouteNetwork provides an abstract base for applications that need to use a route network. This class supports multiple route networks and stores the input data into mNetworks (protected). It provides an input processor and can process basic route network parameters. Applications that extend XWsfRouteNetwork can also inherit from the NetworkInput class to add any needed parameters (XWsfRoadTraffic is an example).

Member Typedef Documentation

◆ Networks

using XWsfRouteNetwork::Networks = std::vector<ut::CloneablePtr<NetworkInput>>
protected

Constructor & Destructor Documentation

◆ XWsfRouteNetwork() [1/2]

XWsfRouteNetwork::XWsfRouteNetwork ( )
default

Referenced by operator=(), and XWsfRouteNetwork().

◆ ~XWsfRouteNetwork()

virtual XWsfRouteNetwork::~XWsfRouteNetwork ( )
virtualdefault

References Initialize().

◆ XWsfRouteNetwork() [2/2]

XWsfRouteNetwork::XWsfRouteNetwork ( const XWsfRouteNetwork & aSrc)
protecteddefault

References XWsfRouteNetwork().

Member Function Documentation

◆ Initialize()

bool XWsfRouteNetwork::Initialize ( const WsfScenario & aScenario)
virtual

If Initialize is redefined, make sure to call XWsfRouteNetwork::Initialize().

Verifies and initializes each of the route networks.

References WsfObjectTypeList< T >::Find(), WsfRouteNetworkTypes::Get(), mNetworks, and ok.

Referenced by XWsfOSM_Traffic::Initialize(), and ~XWsfRouteNetwork().

◆ operator=()

XWsfRouteNetwork & XWsfRouteNetwork::operator= ( const XWsfRouteNetwork & aRhs)
protecteddelete

◆ ProcessCommand()

bool XWsfRouteNetwork::ProcessCommand ( UtInput & aInput,
NetworkInput & aNetworkInput )
protectedvirtual

Derived classes call ProcessCommand for commands that exist in their network end_network blocks that aren't recognized. If the command isn't recognized at this level an exception is thrown.

Reimplemented in XWsfRoadTraffic::Data.

References XWsfRouteNetwork::NetworkInput::mVehicleCount, and XWsfRouteNetwork::NetworkInput::mVehicleDensity.

Referenced by operator=(), and ProcessInput().

◆ ProcessInput()

bool XWsfRouteNetwork::ProcessInput ( UtInput & aInput)
virtual

If ProcessInput is redefined, do no call XWsfRouteNetwork::Initialize(). Instead derived classes must call ProcessCommand for unknown commands in the input stream.

Processes basic commands in a network end_network block. Note: If a derived class redefines ProcessInput, this version should not be called. Instead ProcessCommand should be used (see below).

Reimplemented in WsfOSM_TrafficInput.

References mNetworks, and ProcessCommand().

◆ Update()

virtual void XWsfRouteNetwork::Update ( double )
inlinevirtual

An update method for applications that need simulation updates.

Member Data Documentation

◆ mNetworks

◆ mRandom

ut::Random XWsfRouteNetwork::mRandom
protected

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved