SUMO - Simulation of Urban MObility
libsumo::Helper::SubscriptionWrapper Class Reference

#include <Helper.h>

Inheritance diagram for libsumo::Helper::SubscriptionWrapper:
Inheritance graph
Collaboration diagram for libsumo::Helper::SubscriptionWrapper:
Collaboration graph

Public Types

typedef bool(* SubscriptionHandler) (const std::string &objID, const int variable, VariableWrapper *wrapper)
 Definition of a method to be called for serving an associated commandID. More...
 

Public Member Functions

void setContext (const std::string &refID)
 
 SubscriptionWrapper (VariableWrapper::SubscriptionHandler handler, SubscriptionResults &into, ContextSubscriptionResults &context)
 
bool wrapColor (const std::string &objID, const int variable, const TraCIColor &value)
 
bool wrapDouble (const std::string &objID, const int variable, const double value)
 
bool wrapInt (const std::string &objID, const int variable, const int value)
 
bool wrapPosition (const std::string &objID, const int variable, const TraCIPosition &value)
 
bool wrapString (const std::string &objID, const int variable, const std::string &value)
 
bool wrapStringList (const std::string &objID, const int variable, const std::vector< std::string > &value)
 

Data Fields

SubscriptionHandler handle
 

Private Member Functions

SubscriptionWrapperoperator= (const SubscriptionWrapper &s)=delete
 Invalidated assignment operator. More...
 

Private Attributes

SubscriptionResultsmyActiveResults
 
ContextSubscriptionResults myContextResults
 
SubscriptionResults myResults
 

Detailed Description

Definition at line 184 of file Helper.h.

Member Typedef Documentation

◆ SubscriptionHandler

typedef bool(* libsumo::VariableWrapper::SubscriptionHandler) (const std::string &objID, const int variable, VariableWrapper *wrapper)
inherited

Definition of a method to be called for serving an associated commandID.

Definition at line 117 of file Subscription.h.

Constructor & Destructor Documentation

◆ SubscriptionWrapper()

libsumo::Helper::SubscriptionWrapper::SubscriptionWrapper ( VariableWrapper::SubscriptionHandler  handler,
SubscriptionResults into,
ContextSubscriptionResults context 
)

Definition at line 1062 of file Helper.cpp.

Member Function Documentation

◆ operator=()

SubscriptionWrapper& libsumo::Helper::SubscriptionWrapper::operator= ( const SubscriptionWrapper s)
privatedelete

Invalidated assignment operator.

◆ setContext()

void libsumo::Helper::SubscriptionWrapper::setContext ( const std::string &  refID)
virtual

Reimplemented from libsumo::VariableWrapper.

Definition at line 1069 of file Helper.cpp.

References myActiveResults, myContextResults, and myResults.

◆ wrapColor()

bool libsumo::Helper::SubscriptionWrapper::wrapColor ( const std::string &  objID,
const int  variable,
const TraCIColor value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1112 of file Helper.cpp.

References myActiveResults.

◆ wrapDouble()

bool libsumo::Helper::SubscriptionWrapper::wrapDouble ( const std::string &  objID,
const int  variable,
const double  value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1075 of file Helper.cpp.

References myActiveResults.

◆ wrapInt()

bool libsumo::Helper::SubscriptionWrapper::wrapInt ( const std::string &  objID,
const int  variable,
const int  value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1082 of file Helper.cpp.

References myActiveResults.

◆ wrapPosition()

bool libsumo::Helper::SubscriptionWrapper::wrapPosition ( const std::string &  objID,
const int  variable,
const TraCIPosition value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1105 of file Helper.cpp.

References myActiveResults.

◆ wrapString()

bool libsumo::Helper::SubscriptionWrapper::wrapString ( const std::string &  objID,
const int  variable,
const std::string &  value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1089 of file Helper.cpp.

References myActiveResults.

◆ wrapStringList()

bool libsumo::Helper::SubscriptionWrapper::wrapStringList ( const std::string &  objID,
const int  variable,
const std::vector< std::string > &  value 
)
virtual

Implements libsumo::VariableWrapper.

Definition at line 1096 of file Helper.cpp.

References myActiveResults.

Field Documentation

◆ handle

SubscriptionHandler libsumo::VariableWrapper::handle
inherited

Definition at line 119 of file Subscription.h.

◆ myActiveResults

SubscriptionResults& libsumo::Helper::SubscriptionWrapper::myActiveResults
private

◆ myContextResults

ContextSubscriptionResults libsumo::Helper::SubscriptionWrapper::myContextResults
private

Definition at line 196 of file Helper.h.

Referenced by setContext().

◆ myResults

SubscriptionResults libsumo::Helper::SubscriptionWrapper::myResults
private

Definition at line 195 of file Helper.h.

Referenced by setContext().


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