Eclipse SUMO - Simulation of Urban MObility
GNEDemandElementDistribution Class Reference

#include <GNEDemandElementDistribution.h>

Inheritance diagram for GNEDemandElementDistribution:
[legend]
Collaboration diagram for GNEDemandElementDistribution:
[legend]

Public Member Functions

void addDistributionKey (const GNEDemandElement *key, const double value, GNEUndoList *undoList)
 add distribution key More...
 
void editDistributionValue (const GNEDemandElement *key, const double newValue, GNEUndoList *undoList)
 remove distribution (used in GNEDemandElementDistribution) More...
 
std::string getAttributeDistributionKeys () const
 get attribute distribution keys in string format sorted by ID More...
 
double getAttributeDistributionValue (const GNEDemandElement *key)
 get attribute distribution value More...
 
std::string getAttributeDistributionValues () const
 get attribute distribution keys in string format sorted by ID More...
 
const std::map< const GNEDemandElement *, double > & getDistributionKeyValues () const
 get map with distribution keys and values More...
 
std::map< std::string, GNEDemandElement * > getPossibleDistributionKeys (SumoXMLTag type) const
 get list of possible keys sorted by ID More...
 
 GNEDemandElementDistribution (GNEDemandElement *demandElement)
 Constructor. More...
 
bool isDistributionEmpty () const
 check if distribution is empty More...
 
bool isValueValid (const GNEDemandElement *key, const double value) const
 check if the given key-value can be added in distribution More...
 
bool keyExists (const GNEDemandElement *key) const
 check if the given key can be added in distribution More...
 
void removeDistributionKey (const GNEDemandElement *key, GNEUndoList *undoList)
 remove distribution key More...
 

Private Member Functions

void addDistributionKey (const GNEDemandElement *key, const double value)
 add distribution (used in GNEDemandElementDistribution) More...
 
void editDistributionValue (const GNEDemandElement *key, const double newValue)
 remove distribution (used in GNEDemandElementDistribution) More...
 
 GNEDemandElementDistribution (const GNEDemandElementDistribution &)=delete
 Invalidated copy constructor. More...
 
GNEDemandElementDistributionoperator= (const GNEDemandElementDistribution &)=delete
 Invalidated assignment operator. More...
 
void removeDistributionKey (const GNEDemandElement *key)
 remove distribution (used in GNEDemandElementDistribution) More...
 

Private Attributes

GNEDemandElementmyDemandElement
 demand element More...
 
std::map< const GNEDemandElement *, double > myDistributionValues
 map with distribution keys and values More...
 

Friends

class GNEChange_Distribution
 friend declaration More...
 
class GNERouteHandler
 

Detailed Description

Definition at line 35 of file GNEDemandElementDistribution.h.

Constructor & Destructor Documentation

◆ GNEDemandElementDistribution() [1/2]

GNEDemandElementDistribution::GNEDemandElementDistribution ( GNEDemandElement demandElement)

Constructor.

Definition at line 30 of file GNEDemandElementDistribution.cpp.

◆ GNEDemandElementDistribution() [2/2]

GNEDemandElementDistribution::GNEDemandElementDistribution ( const GNEDemandElementDistribution )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ addDistributionKey() [1/2]

void GNEDemandElementDistribution::addDistributionKey ( const GNEDemandElement key,
const double  value 
)
private

add distribution (used in GNEDemandElementDistribution)

Definition at line 135 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

◆ addDistributionKey() [2/2]

void GNEDemandElementDistribution::addDistributionKey ( const GNEDemandElement key,
const double  value,
GNEUndoList undoList 
)

add distribution key

Definition at line 117 of file GNEDemandElementDistribution.cpp.

References GNEChange_Distribution::addKey(), and myDemandElement.

Referenced by GNERouteHandler::buildRoute(), GNERouteHandler::buildRouteDistribution(), GNERouteHandler::buildVType(), GNERouteHandler::buildVTypeDistribution(), GNEChange_Distribution::redo(), and GNEChange_Distribution::undo().

Here is the caller graph for this function:

◆ editDistributionValue() [1/2]

void GNEDemandElementDistribution::editDistributionValue ( const GNEDemandElement key,
const double  newValue 
)
private

remove distribution (used in GNEDemandElementDistribution)

Definition at line 155 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

◆ editDistributionValue() [2/2]

void GNEDemandElementDistribution::editDistributionValue ( const GNEDemandElement key,
const double  newValue,
GNEUndoList undoList 
)

remove distribution (used in GNEDemandElementDistribution)

Definition at line 129 of file GNEDemandElementDistribution.cpp.

References GNEChange_Distribution::editValue(), and myDemandElement.

Referenced by GNEChange_Distribution::redo(), and GNEChange_Distribution::undo().

Here is the caller graph for this function:

◆ getAttributeDistributionKeys()

std::string GNEDemandElementDistribution::getAttributeDistributionKeys ( ) const

get attribute distribution keys in string format sorted by ID

Definition at line 79 of file GNEDemandElementDistribution.cpp.

References myDistributionValues, and toString().

Referenced by GNERouteDistribution::writeDemandElement(), and GNEVTypeDistribution::writeDemandElement().

Here is the caller graph for this function:

◆ getAttributeDistributionValue()

double GNEDemandElementDistribution::getAttributeDistributionValue ( const GNEDemandElement key)

get attribute distribution value

Definition at line 107 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

Referenced by GNEChange_Distribution::editValue().

Here is the caller graph for this function:

◆ getAttributeDistributionValues()

std::string GNEDemandElementDistribution::getAttributeDistributionValues ( ) const

get attribute distribution keys in string format sorted by ID

Definition at line 91 of file GNEDemandElementDistribution.cpp.

References myDistributionValues, and toString().

Referenced by GNERouteDistribution::writeDemandElement(), and GNEVTypeDistribution::writeDemandElement().

Here is the caller graph for this function:

◆ getDistributionKeyValues()

const std::map< const GNEDemandElement *, double > & GNEDemandElementDistribution::getDistributionKeyValues ( ) const

get map with distribution keys and values

Definition at line 58 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

Referenced by GNEDistribution::getAttributeDouble(), GNEDistribution::getCenteringBoundary(), GNEDistribution::getColor(), GNEDistribution::getFirstPathLane(), GNEDistribution::getLastPathLane(), GNEDistribution::getPositionInView(), and GNEDistribution::getVClass().

Here is the caller graph for this function:

◆ getPossibleDistributionKeys()

std::map< std::string, GNEDemandElement * > GNEDemandElementDistribution::getPossibleDistributionKeys ( SumoXMLTag  type) const

◆ isDistributionEmpty()

bool GNEDemandElementDistribution::isDistributionEmpty ( ) const

check if distribution is empty

Definition at line 36 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

Referenced by GNERouteDistribution::writeDemandElement(), and GNEVTypeDistribution::writeDemandElement().

Here is the caller graph for this function:

◆ isValueValid()

bool GNEDemandElementDistribution::isValueValid ( const GNEDemandElement key,
const double  value 
) const

check if the given key-value can be added in distribution

Definition at line 48 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

◆ keyExists()

bool GNEDemandElementDistribution::keyExists ( const GNEDemandElement key) const

check if the given key can be added in distribution

Definition at line 42 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

Referenced by getPossibleDistributionKeys().

Here is the caller graph for this function:

◆ operator=()

GNEDemandElementDistribution& GNEDemandElementDistribution::operator= ( const GNEDemandElementDistribution )
privatedelete

Invalidated assignment operator.

◆ removeDistributionKey() [1/2]

void GNEDemandElementDistribution::removeDistributionKey ( const GNEDemandElement key)
private

remove distribution (used in GNEDemandElementDistribution)

Definition at line 145 of file GNEDemandElementDistribution.cpp.

References myDistributionValues.

◆ removeDistributionKey() [2/2]

void GNEDemandElementDistribution::removeDistributionKey ( const GNEDemandElement key,
GNEUndoList undoList 
)

remove distribution key

Definition at line 123 of file GNEDemandElementDistribution.cpp.

References myDemandElement, and GNEChange_Distribution::removeKey().

Referenced by GNEChange_Distribution::redo(), and GNEChange_Distribution::undo().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ GNEChange_Distribution

friend declaration

Definition at line 38 of file GNEDemandElementDistribution.h.

◆ GNERouteHandler

friend class GNERouteHandler
friend

Definition at line 39 of file GNEDemandElementDistribution.h.

Field Documentation

◆ myDemandElement

GNEDemandElement* GNEDemandElementDistribution::myDemandElement
private

◆ myDistributionValues

std::map<const GNEDemandElement*, double> GNEDemandElementDistribution::myDistributionValues
private

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