SUMO - Simulation of Urban MObility
TraCIAPI::TraCIScopeWrapper Class Reference

An abstract interface for accessing type-dependent values. More...

#include <TraCIAPI.h>

Inheritance diagram for TraCIAPI::TraCIScopeWrapper:
Inheritance graph
Collaboration diagram for TraCIAPI::TraCIScopeWrapper:
Collaboration graph

Public Member Functions

void clearSubscriptionResults ()
 
const libsumo::ContextSubscriptionResults getAllContextSubscriptionResults () const
 
const libsumo::SubscriptionResults getAllSubscriptionResults () const
 
const libsumo::SubscriptionResults getContextSubscriptionResults (const std::string &objID) const
 
libsumo::SubscriptionResultsgetModifiableContextSubscriptionResults (const std::string &objID)
 
libsumo::SubscriptionResultsgetModifiableSubscriptionResults ()
 
std::string getParameter (const std::string &objectID, const std::string &key) const
 retrieve generic paramter More...
 
const libsumo::TraCIResults getSubscriptionResults (const std::string &objID) const
 
void setParameter (const std::string &objectID, const std::string &key, const std::string &value) const
 set generic paramter More...
 
void subscribe (const std::string &objID, const std::vector< int > &vars, double beginTime, double endTime) const
 
void subscribeContext (const std::string &objID, int domain, double range, const std::vector< int > &vars, double beginTime, double endTime) const
 
 TraCIScopeWrapper (TraCIAPI &parent, int cmdGetID, int cmdSetID, int subscribeID, int contextSubscribeID)
 Constructor. More...
 
virtual ~TraCIScopeWrapper ()
 Destructor. More...
 

Protected Attributes

int myCmdGetID
 
int myCmdSetID
 
int myContextSubscribeID
 
libsumo::ContextSubscriptionResults myContextSubscriptionResults
 
TraCIAPImyParent
 The parent TraCI client which offers the connection. More...
 
int mySubscribeID
 
libsumo::SubscriptionResults mySubscriptionResults
 

Private Member Functions

TraCIScopeWrapperoperator= (const TraCIScopeWrapper &src)
 invalidated assignment operator More...
 
 TraCIScopeWrapper (const TraCIScopeWrapper &src)
 invalidated copy constructor More...
 

Detailed Description

An abstract interface for accessing type-dependent values.

Must be derived by interfaces which implement access methods to certain object types

Definition at line 106 of file TraCIAPI.h.

Constructor & Destructor Documentation

◆ TraCIScopeWrapper() [1/2]

TraCIAPI::TraCIScopeWrapper::TraCIScopeWrapper ( TraCIAPI parent,
int  cmdGetID,
int  cmdSetID,
int  subscribeID,
int  contextSubscribeID 
)
inline

Constructor.

Parameters
[in]parentThe parent TraCI client which offers the connection

Definition at line 111 of file TraCIAPI.h.

◆ ~TraCIScopeWrapper()

◆ TraCIScopeWrapper() [2/2]

TraCIAPI::TraCIScopeWrapper::TraCIScopeWrapper ( const TraCIScopeWrapper src)
private

invalidated copy constructor

Member Function Documentation

◆ clearSubscriptionResults()

void TraCIAPI::TraCIScopeWrapper::clearSubscriptionResults ( )

Definition at line 3313 of file TraCIAPI.cpp.

Referenced by ~TraCIScopeWrapper().

◆ getAllContextSubscriptionResults()

const libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllContextSubscriptionResults ( ) const

Definition at line 3297 of file TraCIAPI.cpp.

Referenced by ~TraCIScopeWrapper().

◆ getAllSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getAllSubscriptionResults ( ) const

Definition at line 3281 of file TraCIAPI.cpp.

Referenced by ~TraCIScopeWrapper().

◆ getContextSubscriptionResults()

const libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::getContextSubscriptionResults ( const std::string &  objID) const

Definition at line 3303 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI(), and ~TraCIScopeWrapper().

◆ getModifiableContextSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableContextSubscriptionResults ( const std::string &  objID)

Definition at line 3326 of file TraCIAPI.cpp.

Referenced by ~TraCIScopeWrapper().

◆ getModifiableSubscriptionResults()

libsumo::SubscriptionResults & TraCIAPI::TraCIScopeWrapper::getModifiableSubscriptionResults ( )

Definition at line 3320 of file TraCIAPI.cpp.

Referenced by ~TraCIScopeWrapper().

◆ getParameter()

std::string TraCIAPI::TraCIScopeWrapper::getParameter ( const std::string &  objectID,
const std::string &  key 
) const

retrieve generic paramter

Definition at line 3235 of file TraCIAPI.cpp.

References TYPE_STRING, VAR_PARAMETER, tcpip::Storage::writeByte(), and tcpip::Storage::writeString().

Referenced by TraCITestClient::testAPI(), and ~TraCIScopeWrapper().

◆ getSubscriptionResults()

const libsumo::TraCIResults TraCIAPI::TraCIScopeWrapper::getSubscriptionResults ( const std::string &  objID) const

Definition at line 3287 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI(), and ~TraCIScopeWrapper().

◆ operator=()

◆ setParameter()

void TraCIAPI::TraCIScopeWrapper::setParameter ( const std::string &  objectID,
const std::string &  key,
const std::string &  value 
) const

◆ subscribe()

void TraCIAPI::TraCIScopeWrapper::subscribe ( const std::string &  objID,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const

Definition at line 3259 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI(), and ~TraCIScopeWrapper().

◆ subscribeContext()

void TraCIAPI::TraCIScopeWrapper::subscribeContext ( const std::string &  objID,
int  domain,
double  range,
const std::vector< int > &  vars,
double  beginTime,
double  endTime 
) const

Definition at line 3271 of file TraCIAPI.cpp.

Referenced by TraCITestClient::testAPI(), and ~TraCIScopeWrapper().

Field Documentation

◆ myCmdGetID

int TraCIAPI::TraCIScopeWrapper::myCmdGetID
protected

Definition at line 146 of file TraCIAPI.h.

◆ myCmdSetID

int TraCIAPI::TraCIScopeWrapper::myCmdSetID
protected

Definition at line 147 of file TraCIAPI.h.

◆ myContextSubscribeID

int TraCIAPI::TraCIScopeWrapper::myContextSubscribeID
protected

Definition at line 149 of file TraCIAPI.h.

◆ myContextSubscriptionResults

libsumo::ContextSubscriptionResults TraCIAPI::TraCIScopeWrapper::myContextSubscriptionResults
protected

Definition at line 151 of file TraCIAPI.h.

◆ myParent

TraCIAPI& TraCIAPI::TraCIScopeWrapper::myParent
protected

The parent TraCI client which offers the connection.

Definition at line 145 of file TraCIAPI.h.

◆ mySubscribeID

int TraCIAPI::TraCIScopeWrapper::mySubscribeID
protected

Definition at line 148 of file TraCIAPI.h.

◆ mySubscriptionResults

libsumo::SubscriptionResults TraCIAPI::TraCIScopeWrapper::mySubscriptionResults
protected

Definition at line 150 of file TraCIAPI.h.


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