48 myAllowUndoRedo(allowUndoRedo) {
67 dataSet->
incRef(
"buildDataSet");
77 const std::string& dataSetID,
const double begin,
const double end) {
81 if (dataSet ==
nullptr) {
94 dataInterval->
incRef(
"buildDataInterval");
105 dataInterval->
incRef(
"buildDataInterval");
113 const std::map<std::string, std::string>& parameters) {
116 if (dataSet !=
nullptr) {
121 if (dataInterval !=
nullptr) {
133 edgeData->
incRef(
"buildEdgeData");
149 const std::string& toEdgeID,
const std::map<std::string, std::string>& parameters) {
152 if (dataSet !=
nullptr) {
157 if (dataInterval !=
nullptr) {
161 if (fromEdge && toEdge) {
171 edgeData->
incRef(
"buildEdgeData");
187 const std::string& toTAZID,
const std::map<std::string, std::string>& parameters) {
190 if (dataSet !=
nullptr) {
195 if (dataInterval !=
nullptr) {
199 if (fromTAZ ==
nullptr) {
201 }
else if (toTAZ ==
nullptr) {
203 }
else if ((fromTAZ != toTAZ) && dataInterval->
TAZRelExists(fromTAZ, toTAZ)) {
205 }
else if ((fromTAZ == toTAZ) && dataInterval->
TAZRelExists(fromTAZ)) {
207 }
else if (fromTAZ == toTAZ) {
216 edgeData->
incRef(
"buildEdgeData");
228 edgeData->
incRef(
"buildEdgeData");
242 WRITE_ERROR(
"Could not build " +
toString(tag) +
" with ID '" +
id +
"' in netedit; declared twice.");
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_MEANDATA_EDGE
an edge based mean data detector
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
The XML-Handler for network loading.
GNEDataHandler(GNENet *net, const std::string &file, const bool allowUndoRedo)
Constructor.
~GNEDataHandler()
Destructor.
void buildTAZRelationData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &fromTAZID, const std::string &toTAZID, const std::map< std::string, std::string > ¶meters)
Builds TAZRelationData.
void writeErrorInvalidParent(const SumoXMLTag tag, const SumoXMLTag parent) const
write error "invalid parent element"
void buildEdgeRelationData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &fromEdgeID, const std::string &toEdgeID, const std::map< std::string, std::string > ¶meters)
Builds edgeRelationData.
void buildDataSet(const std::string &dataSetID)
Builds DataSet (exlcusive of NETEDIT)
const bool myAllowUndoRedo
allow undo/redo
void buildEdgeData(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &edgeID, const std::map< std::string, std::string > ¶meters)
Builds edgeData.
void buildDataInterval(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const std::string &dataSetID, const double begin, const double end)
Builds DataInterval.
GNENet * myNet
pointer to GNENet
void writeErrorDuplicated(const SumoXMLTag tag, const std::string &id) const
write error "duplicated additional"
An Element which don't belongs to GNENet but has influency in the simulation.
bool TAZRelExists(const GNETAZElement *TAZ) const
check if there is already a TAZRel defined in one TAZ
void addGenericDataChild(GNEGenericData *genericData)
add generic data child
GNEDataInterval * retrieveInterval(const double begin, const double end) const
return interval
void addDataIntervalChild(GNEDataInterval *dataInterval)
add data interval child
An Element which don't belongs to GNENet but has influency in the simulation.
A road/street connecting two junctions (netedit-version)
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
void addChildElement(T *element)
add child element
GNETAZElement * retrieveTAZElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named TAZElement.
void insertDataSet(GNEDataSet *dataSet)
Insert a demand element element int GNENet container.
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
void incRef(const std::string &debugMsg="")
Increarse reference.
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
GNEUndoList * getUndoList() const
get the undoList object