40 const SUMOTime period,
const SUMOTime begin,
const SUMOTime end,
const bool trackVehicles,
const std::vector<SumoXMLAttr>& writtenAttributes,
41 const bool aggregate,
const std::vector<std::string>& edges,
const std::string& edgeFile,
const std::string& excludeEmpty,
42 const bool withInternal,
const std::vector<std::string>& detectPersons,
const double minSamples,
const double maxTravelTime,
43 const std::vector<std::string>& vTypes,
const double speedThreshold) :
51 myTrackVehicles(trackVehicles),
52 myWrittenAttributes(writtenAttributes),
53 myAggregate(aggregate),
56 myExcludeEmpty(excludeEmpty),
57 myWithInternal(withInternal),
58 myDetectPersons(detectPersons),
59 myMinSamples(minSamples),
60 myMaxTravelTime(maxTravelTime),
62 mySpeedThreshold(speedThreshold) {
355 return (canParse<SUMOTime>(value) && (parse<SUMOTime>(value) >= 0));
358 if (canParse<bool>(value)) {
364 return (canParse<bool>(value));
369 return (canParse<double>(value) && (parse<double>(value) >= 0));
372 return (canParse<double>(value) && (parse<double>(value) >= 0));
374 return (canParse<double>(value) && (parse<double>(value) >= 0));
378 return (canParse<bool>(value));
386 return canParse<std::vector<SumoXMLAttr> >(value);
388 return canParse<std::vector<GNEEdge*> >(
myNet, value,
false);
392 return (canParse<bool>(value));
452 }
else if (parse<bool>(value)) {
483 myVTypes = parse<std::vector<std::string> >(value);
500 myEdges = parse<std::vector<std::string> >(value);
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_TRACK_VEHICLES
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_WITH_INTERNAL
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_MAX_TRAVELTIME
@ SUMO_ATTR_HALTING_SPEED_THRESHOLD
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_WRITE_ATTRIBUTES
@ SUMO_ATTR_DETECT_PERSONS
@ SUMO_ATTR_EXCLUDE_EMPTY
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
double getCommonAttributeDouble(SumoXMLAttr key) const
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
Position getCommonAttributePosition(SumoXMLAttr key) const
void resetDefaultValues(const bool allowUndoRedo)
reset attribute carrier to their default values
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
double myMinSamples
minSamples
GUIGlObject * getGUIGlObject() override
get GUIGlObject associated with this meanData
std::string myExcludeEmpty
exclude empty
std::string myEdgeFile
edge file
void updateGeometry() override
update pre-computed geometry information
Parameterised * getParameters() override
get parameters associated with this meanData
bool myAggregate
whether the data for all edges shall be aggregated
bool checkDrawMoveContour() const override
check if draw move contour (red)
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::vector< std::string > myDetectPersons
detect persons
std::vector< std::string > myVTypes
VTypes.
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
std::string getAttribute(SumoXMLAttr key) const override
GNEMeanData(SumoXMLTag tag, std::string ID, GNENet *net, const std::string &filename)
Default constructor.
std::vector< SumoXMLAttr > myWrittenAttributes
bit mask for checking attributes to be written
std::string myFile
filename
double mySpeedThreshold
speed threshold
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
std::vector< std::string > myEdges
list of edges
bool checkDrawToContour() const override
check if draw from contour (magenta)
GNEHierarchicalElement * getHierarchicalElement() override
methods to retrieve the elements linked to this meanData
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
bool myWithInternal
width internal
bool myTrackVehicles
Whether vehicles are tracked.
bool checkDrawOverContour() const override
check if draw over contour (orange)
bool isValid(SumoXMLAttr key, const std::string &value) override
method for checking if the key and their conrrespond attribute are valids
double getAttributeDouble(SumoXMLAttr key) const override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
method for setting the attribute and letting the object perform data set changes
GNEMoveElement * getMoveElement() const override
get GNEMoveElement associated with this meanData
bool checkDrawSelectContour() const override
check if draw select contour (blue)
Position getAttributePosition(SumoXMLAttr key) const override
bool checkDrawFromContour() const override
check if draw from contour (green)
Position getPositionInView() const
Returns element position in view.
double myMaxTravelTime
max travel time
~GNEMeanData()
Destructor.
void writeMeanData(OutputDevice &device) const
write meanData element into a xml file
GNEMeanData * retrieveMeanData(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named meanData.
void updateMeanDataID(GNEMeanData *meanData, const std::string &newID)
update meanData ID in container
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
double getDefaultDoubleValue(SumoXMLAttr attr) const
get default double value
SUMOTime getDefaultTimeValue(SumoXMLAttr attr) const
get default time value
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const std::string & getDefaultStringValue(SumoXMLAttr attr) const
default values
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
static StringBijection< MeanDataType > MeanDataTypes
reference positions (used creating certain elements in netedit)
static StringBijection< PersonMode > PersonModeValues
person modes
static StringBijection< ExcludeEmpty > ExcludeEmptys
exclude empty values
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
const std::string & getString(const T key) const
get string
bool hasString(const std::string &str) const
check if the given string exist