40 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) :
50 myTrackVehicles(trackVehicles),
51 myWrittenAttributes(writtenAttributes),
52 myAggregate(aggregate),
55 myExcludeEmpty(excludeEmpty),
56 myWithInternal(withInternal),
57 myDetectPersons(detectPersons),
58 myMinSamples(minSamples),
59 myMaxTravelTime(maxTravelTime),
61 mySpeedThreshold(speedThreshold) {
317 return (canParse<SUMOTime>(value) && (parse<SUMOTime>(value) >= 0));
320 if (canParse<bool>(value)) {
326 return (canParse<bool>(value));
331 return (canParse<double>(value) && (parse<double>(value) >= 0));
334 return (canParse<double>(value) && (parse<double>(value) >= 0));
336 return (canParse<double>(value) && (parse<double>(value) >= 0));
340 return (canParse<bool>(value));
348 return canParse<std::vector<SumoXMLAttr> >(value);
350 return canParse<std::vector<GNEEdge*> >(
myNet, value,
false);
354 return (canParse<bool>(value));
417 }
else if (parse<bool>(value)) {
448 myVTypes = parse<std::vector<std::string> >(value);
465 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)
std::string getCommonAttribute(const Parameterised *parameterised, 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
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 isCommonValid(SumoXMLAttr key, const std::string &value) 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
std::string myExcludeEmpty
exclude empty
std::string myEdgeFile
edge file
bool checkDrawOverContour() const
check if draw over contour (orange)
bool myAggregate
whether the data for all edges shall be aggregated
bool checkDrawDeleteContour() const
check if draw delete contour (pink/white)
bool checkDrawSelectContour() const
check if draw select contour (blue)
std::vector< std::string > myDetectPersons
detect persons
std::vector< std::string > myVTypes
VTypes.
GNEMeanData(SumoXMLTag tag, std::string ID, GNENet *net, const std::string &filename)
Default constructor.
const Parameterised::Map & getACParametersMap() const
get parameters map
GUIGlObject * getGUIGlObject()
get GUIGlObject associated with this AttributeCarrier
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform data set changes
std::vector< SumoXMLAttr > myWrittenAttributes
bit mask for checking attributes to be written
std::string myFile
filename
double getAttributeDouble(SumoXMLAttr key) const
double mySpeedThreshold
speed threshold
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::vector< std::string > myEdges
list of edges
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool checkDrawDeleteContourSmall() const
check if draw delete contour small (pink/white)
bool checkDrawFromContour() const
check if draw from contour (green)
GNEHierarchicalElement * getHierarchicalElement()
get GNEHierarchicalElement associated with this AttributeCarrier
void updateGeometry()
update pre-computed geometry information
bool myWithInternal
width internal
bool myTrackVehicles
Whether vehicles are tracked.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool checkDrawToContour() const
check if draw from contour (magenta)
std::string getAttribute(SumoXMLAttr key) const
Position getPositionInView() const
Returns element position in view.
bool checkDrawRelatedContour() const
check if draw related contour (cyan)
bool checkDrawMoveContour() const
check if draw move contour (red)
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.
std::map< std::string, std::string > Map
parameters map
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
A point in 2D or 3D with translation and scaling methods.
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