36 myDataSetParent(dataSetParent),
89 genericData->getParentEdges().front()->getID());
93 genericData->getParentEdges().front()->getID() +
"->" + genericData->getParentEdges().back()->getID());
108 for (
const auto& param : genericData->getParametersMap()) {
110 if (canParse<double>(param.second)) {
112 const double value = parse<double>(param.second);
129const std::map<SumoXMLTag, GNEDataSet::AttributeColors>&
277const std::vector<GNEGenericData*>&
288 (genericData->getParentEdges().front() == edge)) {
301 (genericData->getParentEdges().front() == fromEdge) &&
302 (genericData->getParentEdges().back() == toEdge)) {
315 (genericData->getParentAdditionals().size() == 1) &&
316 (genericData->getParentAdditionals().front() ==
TAZ)) {
329 (genericData->getParentAdditionals().size() == 2) &&
330 (genericData->getParentAdditionals().front() == fromTAZ) &&
331 (genericData->getParentAdditionals().back() == toTAZ)) {
397 return canParse<double>(value);
399 return canParse<double>(value);
433 myBegin = parse<double>(value);
438 myEnd = parse<double>(value);
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_TAZREL
a relation between two TAZs
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
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
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
GNENet * getNet() const
get pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
virtual void updateGeometry()=0
update pre-computed geometry information
std::string getCommonAttribute(SumoXMLAttr key) const
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void fixDataIntervalProblem()
fix data element problem (by default throw an exception, has to be reimplemented in children)
Position getAttributePosition(SumoXMLAttr key) const override
bool isAttributeEnabled(SumoXMLAttr key) const
double myBegin
begin interval
Position getPositionInView() const
Returns element position in view.
GNEDataInterval(GNEDataSet *dataSetParent, const double begin, const double end)
Constructor.
bool edgeRelExists(const GNEEdge *fromEdge, const GNEEdge *toEdge) const
check if there is already a edgeRel defined between two edges
GNEDataSet * myDataSetParent
GNEDataSet parent to which this data interval belongs.
double getAttributeDouble(SumoXMLAttr key) const override
void removeGenericDataChild(GNEGenericData *genericData)
add generic data child
bool checkDrawDeleteContourSmall() const override
check if draw delete contour small (pink/white)
Parameterised * getParameters() override
get parameters associated with this dataInterval
bool isValid(SumoXMLAttr key, const std::string &value) override
method for checking if the key and their conrrespond attribute are valids
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
method for setting the attribute and letting the object perform data element changes
GNEHierarchicalElement * getHierarchicalElement() override
methods to retrieve the elements linked to this dataInterval
bool isDataIntervalValid() const
bool checkDrawFromContour() const override
check if draw from contour (green)
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
void updateGeometry() override
update pre-computed geometry information
bool hasGenericDataChild(GNEGenericData *genericData) const
check if given generic data is child of this data interval
bool TAZRelExists(const GNEAdditional *TAZ) const
check if there is already a TAZRel defined in one TAZ
bool edgeRelSingleExists(const GNEEdge *edge) const
check if there is already a edgeRel single defined in the given edge
GNEDataSet::AttributeColors myAllAttributeColors
all attribute colors
GNEMoveElement * getMoveElement() const override
get GNEMoveElement associated with this dataInterval
bool checkDrawRelatedContour() const override
check if draw related contour (cyan)
bool checkDrawOverContour() const override
check if draw over contour (orange)
const std::vector< GNEGenericData * > & getGenericDataChildren() const
get generic data children
bool checkDrawMoveContour() const override
check if draw move contour (red)
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
const std::map< SumoXMLTag, GNEDataSet::AttributeColors > & getSpecificAttributeColors() const
specific attribute colors
std::string getAttribute(SumoXMLAttr key) const override
void updateGenericDataIDs()
update generic data child IDs
~GNEDataInterval()
Destructor.
bool checkDrawToContour() const override
check if draw from contour (magenta)
std::map< SumoXMLTag, GNEDataSet::AttributeColors > mySpecificAttributeColors
specific attribute colors
std::string getDataIntervalProblem() const
return a string with the current data element problem (by default empty, can be reimplemented in chil...
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
const GNEDataSet::AttributeColors & getAllAttributeColors() const
all attribute colors
std::vector< GNEGenericData * > myGenericDataChildren
vector with generic data children
GUIGlObject * getGUIGlObject() override
get GUIGlObject associated with this dataInterval
void addGenericDataChild(GNEGenericData *genericData)
add generic data child
bool checkDrawDeleteContour() const override
check if draw delete contour (pink/white)
void updateAttributeColors()
update attribute colors deprecated
bool checkDrawSelectContour() const override
check if draw select contour (blue)
void clear()
clear AttributeColors
void updateValues(const std::string &attribute, const double value)
update value for an specific attribute
void updateAttributeColors()
update attribute colors deprecated
std::string getAttribute(SumoXMLAttr key) const override
void removeCurrentEditedAttributeCarrier(const GNEAttributeCarrier *HE)
if given AttributeCarrier is the same of myHE, set it as nullptr
GNEDataInterval * getDataIntervalParent() const
get data interval parent
GNEElementTree * getHierarchicalElementTree() const
get GNEElementTree modul
void insertGenericData(GNEGenericData *genericData)
insert generic data in container
void deleteGenericData(GNEGenericData *genericData)
delete generic data of container
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNEPathManager * getDataPathManager()
get data path manager
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
bool isUpdateGeometryEnabled() const
check if update geometry after inserting or removing has to be updated
bool isUpdateDataEnabled() const
check if update data after inserting or removing has to be updated
GNEViewNet * getViewNet() const
get view net
void removePath(GNEPathElement *pathElement)
remove path
bool isPlacedInRTree() const
return true if Tag correspond to an element that has to be placed in RTREE
void uninspectAC(GNEAttributeCarrier *AC)
uninspect AC
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
GNEViewParent * getViewParent() const
get the net object
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.