Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEDemandElementDistribution.h>
Public Member Functions | |
void | addDistributionKey (const GNEDemandElement *key, const double value, GNEUndoList *undoList) |
add distribution key | |
void | editDistributionValue (const GNEDemandElement *key, const double newValue, GNEUndoList *undoList) |
remove distribution (used in GNEDemandElementDistribution) | |
std::string | getAttributeDistributionKeys () const |
get attribute distribution keys in string format sorted by ID | |
double | getAttributeDistributionValue (const GNEDemandElement *key) |
get attribute distribution value | |
std::string | getAttributeDistributionValues () const |
get attribute distribution keys in string format sorted by ID | |
const std::map< const GNEDemandElement *, double > & | getDistributionKeyValues () const |
get map with distribution keys and values | |
std::map< std::string, GNEDemandElement * > | getPossibleDistributionKeys (SumoXMLTag type) const |
get list of possible keys sorted by ID | |
GNEDemandElementDistribution (GNEDemandElement *demandElement) | |
Constructor. | |
bool | isDistributionEmpty () const |
check if distribution is empty | |
bool | isValueValid (const GNEDemandElement *key, const double value) const |
check if the given key-value can be added in distribution | |
bool | keyExists (const GNEDemandElement *key) const |
check if the given key can be added in distribution | |
void | removeDistributionKey (const GNEDemandElement *key, GNEUndoList *undoList) |
remove distribution key | |
Private Member Functions | |
void | addDistributionKey (const GNEDemandElement *key, const double value) |
add distribution (used in GNEDemandElementDistribution) | |
void | editDistributionValue (const GNEDemandElement *key, const double newValue) |
remove distribution (used in GNEDemandElementDistribution) | |
GNEDemandElementDistribution (const GNEDemandElementDistribution &)=delete | |
Invalidated copy constructor. | |
GNEDemandElementDistribution & | operator= (const GNEDemandElementDistribution &)=delete |
Invalidated assignment operator. | |
void | removeDistributionKey (const GNEDemandElement *key) |
remove distribution (used in GNEDemandElementDistribution) | |
Private Attributes | |
GNEDemandElement * | myDemandElement |
demand element | |
std::map< const GNEDemandElement *, double > | myDistributionValues |
map with distribution keys and values | |
Friends | |
class | GNEChange_Distribution |
friend declaration | |
class | GNERouteHandler |
Definition at line 35 of file GNEDemandElementDistribution.h.
GNEDemandElementDistribution::GNEDemandElementDistribution | ( | GNEDemandElement * | demandElement | ) |
Constructor.
Definition at line 30 of file GNEDemandElementDistribution.cpp.
|
privatedelete |
Invalidated copy constructor.
|
private |
add distribution (used in GNEDemandElementDistribution)
Definition at line 135 of file GNEDemandElementDistribution.cpp.
References myDistributionValues.
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().
|
private |
remove distribution (used in GNEDemandElementDistribution)
Definition at line 155 of file GNEDemandElementDistribution.cpp.
References myDistributionValues.
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().
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().
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().
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().
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().
std::map< std::string, GNEDemandElement * > GNEDemandElementDistribution::getPossibleDistributionKeys | ( | SumoXMLTag | type | ) | const |
get list of possible keys sorted by ID
Definition at line 64 of file GNEDemandElementDistribution.cpp.
References GNENet::getAttributeCarriers(), GNENetHelper::AttributeCarriers::getDemandElements(), GNEAttributeCarrier::getNet(), keyExists(), and myDemandElement.
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().
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.
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().
|
privatedelete |
Invalidated assignment operator.
|
private |
remove distribution (used in GNEDemandElementDistribution)
Definition at line 145 of file GNEDemandElementDistribution.cpp.
References myDistributionValues.
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().
|
friend |
friend declaration
Definition at line 38 of file GNEDemandElementDistribution.h.
|
friend |
Definition at line 39 of file GNEDemandElementDistribution.h.
|
private |
demand element
Definition at line 80 of file GNEDemandElementDistribution.h.
Referenced by addDistributionKey(), editDistributionValue(), getPossibleDistributionKeys(), and removeDistributionKey().
|
private |
map with distribution keys and values
Definition at line 83 of file GNEDemandElementDistribution.h.
Referenced by addDistributionKey(), editDistributionValue(), getAttributeDistributionKeys(), getAttributeDistributionValue(), getAttributeDistributionValues(), getDistributionKeyValues(), isDistributionEmpty(), isValueValid(), keyExists(), and removeDistributionKey().