 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
67 return (myForceDeleteAdditionals->getCheck() == TRUE);
73 return (myDeleteOnlyGeometryPoints->getCheck() == TRUE);
79 return (myProtectDemandElements->getCheck() == TRUE);
87 GNEFrame(horizontalFrameParent, viewNet,
"Delete") {
201 if (subordinatedElements.additionalChildren > 0) {
203 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
204 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
208 toString(subordinatedElements.additionalChildren) +
" additional child" + plural +
".\n Check 'Force deletion of additionals' to force deletion.").c_str());
210 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
233 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
234 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
236 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
237 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.additionalChildren) +
" additional" + plural +
238 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
240 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
243 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
244 std::string plural = subordinatedElements.additionalParents > 1 ?
"s" :
"";
246 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
247 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.additionalParents) +
" additional" + plural +
248 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
250 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
253 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
254 std::string plural = subordinatedElements.demandElementChildren > 1 ?
"s" :
"";
256 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
257 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.demandElementChildren) +
" demand element" + plural +
258 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
260 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
263 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
264 std::string plural = subordinatedElements.demandElementParents > 1 ?
"s" :
"";
266 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
267 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.demandElementParents) +
" demand element" + plural +
268 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
270 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
291 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
292 std::string plural = subordinatedElements.additionalChildren > 1 ?
"s" :
"";
294 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
295 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.additionalChildren) +
" additional" + plural +
296 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
298 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
301 WRITE_DEBUG(
"Opening FXMessageBox 'Force deletion needed'");
302 std::string plural = subordinatedElements.additionalParents > 1 ?
"s" :
"";
304 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
305 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.additionalParents) +
" additional" + plural +
306 ".\n Check 'Force deletion of additionals' to force deletion.").c_str());
308 WRITE_DEBUG(
"Closed FXMessageBox 'Force deletion needed' with 'OK'");
311 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
312 std::string plural = subordinatedElements.demandElementChildren > 1 ?
"s" :
"";
314 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
315 (tagstr +
" '" +
id +
"' cannot be deleted because owns " +
toString(subordinatedElements.demandElementChildren) +
" demand element" + plural +
316 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
318 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
321 WRITE_DEBUG(
"Opening FXMessageBox 'Unprotect demand elements'");
322 std::string plural = subordinatedElements.demandElementParents > 1 ?
"s" :
"";
324 FXMessageBox::warning(
getViewNet()->getApp(), MBOX_OK, (
"Problem deleting " + tagstr).c_str(),
"%s",
325 (tagstr +
" '" +
id +
"' cannot be deleted because is part of " +
toString(subordinatedElements.demandElementParents) +
" demand element" + plural +
326 ".\n Uncheck 'Protect demand elements' to force deletion.").c_str());
328 WRITE_DEBUG(
"Closed FXMessageBox 'Unprotect demand elements' with 'OK'");
366 additionalParents(0),
367 additionalChildren(0),
368 demandElementParents(0),
369 demandElementChildren(0) {
383 additionalParents(0),
384 additionalChildren(0),
385 demandElementParents(0),
386 demandElementChildren(0) {
393 for (
const auto& i : edge->
getLanes()) {
400 additionalParents(0),
401 additionalChildren(0),
402 demandElementParents(0),
403 demandElementChildren(0) {
413 additionalParents(0),
414 additionalChildren(0),
415 demandElementParents(0),
416 demandElementChildren(0) {
421 additionalParents(0),
422 additionalChildren(0),
423 demandElementParents(0),
424 demandElementChildren(0) {
447 if (i.second->isAttributeCarrierSelected()) {
451 for (
const auto& j : i.second->getGNEIncomingEdges()) {
452 if (j->isAttributeCarrierSelected()) {
456 for (
auto k : j->getLanes()) {
457 if (k->isAttributeCarrierSelected()) {
462 for (
const auto& k : j->getGNEConnections()) {
463 if (k->isAttributeCarrierSelected()) {
469 for (
const auto& j : i.second->getGNECrossings()) {
470 if (j->isAttributeCarrierSelected()) {
479 for (
const auto& j : i.second) {
480 if (j.second->isAttributeCarrierSelected()) {
488 GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
495 GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
503 if (i.second->isAttributeCarrierSelected()) {
509 if (i.second->isAttributeCarrierSelected()) {
515 if (i.second->isAttributeCarrierSelected()) {
521 if (i.second->isAttributeCarrierSelected()) {
527 if (i.second->isAttributeCarrierSelected()) {
533 if (i.second->isAttributeCarrierSelected()) {
539 if (i.second->isAttributeCarrierSelected()) {
545 if (i.second->isAttributeCarrierSelected()) {
551 if (i.second->isAttributeCarrierSelected()) {
557 if (i.second->isAttributeCarrierSelected()) {
void hideAttributeCarrierHierarchy()
hide AttributeCarrierHierarchy
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
void showAttributeCarrierHierarchy(GNEAttributeCarrier *AC)
show AttributeCarrierHierarchy
void hide()
hide delete frame
An Element which don't belongs to GNENet but has influency in the simulation.
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
An Element which don't belongs to GNENet but has influency in the simulation.
stop placed over a parking area (used in netedit)
std::map< std::string, GNEJunction * > junctions
map with the name and pointer to junctions of net
const std::string getID() const
function to support debugging
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
begin/end of the description of a polygon
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
int demandElementParents
demand element parents
stop placed over a lane (used in netedit)
FXCheckButton * myProtectDemandElements
checkbox for enable/disable automatic deletion of demand children
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void disableUpdateGeometry()
disable update geometry of elements after inserting or removing an element in net
GNEViewNet * getViewNet() const
get view net
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
begin/end of the description of a single lane
DeleteOptions * myDeleteOptions
modul for delete options
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
void update() const
Mark the entire GNEViewNet to be repainted later.
std::vector< GNEConnection * > retrieveConnections(bool onlySelected=false) const
return all connections
std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > additionals
map with the name and pointer to additional elements of net
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
A road/street connecting two junctions (netedit-version)
SubordinatedElements(const GNEJunction *junction)
constructor (for junctions)
GNENet * getNet() const
get the net object
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT)
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
DeleteOptions * getDeleteOptions() const
get delete options
a flow definitio nusing a from-to edges instead of a route (used by router)
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
modul for hierarchy
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
stop placed over a charging station (used in netedit)
class used to group all variables related with objects under cursor after a click over view
int demandElementChildren
demand element children
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
void enableUpdateGeometry()
begin/end of the description of an edge
FXCheckButton * myForceDeleteAdditionals
checkbox for enable/disable automatic deletion of additionals children
Network mode (Edges, junctions, etc..)
Supermode currentSupermode
the current supermode
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
#define GUIDesignCheckButton
checkButton placed in left position
A point in 2D or 3D with translation and scaling methods.
GNEViewNet * myViewNet
View Net.
GNEUndoList * getUndoList() const
get the undoList object
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
std::vector< GNECrossing * > retrieveCrossings(bool onlySelected=false) const
return all crossings
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
void show()
show delete frame
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
bool forceDeleteAdditionals() const
check if force delete additionals checkbox is enabled
int additionalParents
additional parents
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
const POIs & getPOIs() const
Returns all pois.
GNEDeleteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
a traffic assignment zone
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool isSelectable() const
return true if tag correspond to a selectable element
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
stop placed over a containerStop (used in netedit)
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators)
crossing between edges for pedestrians
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
bool ACsToDelete() const
check if there is ACs to delete
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parent this edge (For example, Calibrators)
const std::vector< GNEAdditional * > & getAdditionalChildren() const
return vector of additionals that have as Parent this edge (For example, Calibrators)
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
connectio between two lanes
struct for saving subordinated elements (Junction->Edge->Lane->(Additional | DemandElement)
GNECrossing * getCrossingFront() const
get front crossing (or a pointer to nullptr if there isn't)
int additionalChildren
additional children
begin/end of the description of a route
SubordinatedElements & operator+=(const SubordinatedElements &other)
add operator
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
bool protectDemandElements() const
check if protect demand elements checkbox is enabled
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
stop placed over a busStop (used in netedit)
const std::string & getTagStr() const
get tag assigned to this object in string format
const Polygons & getPolygons() const
Returns all polygons.
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
~GNEDeleteFrame()
Destructor.
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators)
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
DeleteOptions(GNEDeleteFrame *deleteFrameParent)
constructor
virtual void show()
show Frame
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
GNEShape * getShapeFront() const
get front shape element (or a pointer to nullptr if there isn't)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
~DeleteOptions()
destructor
virtual void hide()
hide Frame
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
a single trip definition (used by router)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
begin/end of the description of a junction
FXCheckButton * myDeleteOnlyGeometryPoints
checkbox for enable/disable delete only geometry points