38 GNEAdditional(net,
GLO_TAZ, tag,
GUIIconSubSys::getIcon(
GUIIcon::
MODETAZ),
"", {}, {}, {}, {}, {}, {}),
46 GNEAdditional(TAZParent->getNet(),
GLO_TAZ, sourceSinkTag,
GUIIconSubSys::getIcon(
GUIIcon::
MODETAZ),
"", {}, {edge}, {}, {TAZParent}, {}, {}),
47myDepartWeight(departWeight) {
136 new FXMenuSeparator(ret);
170 if ((maxWeightSource - minWeightSource) == 0) {
174 double percentage = (
myDepartWeight - minWeightSource) / (maxWeightSource - minWeightSource);
176 if (percentage >= 1) {
178 }
else if (percentage < 0) {
181 return toString((
int)(percentage * 10));
216 if (undoList ==
nullptr) {
243 return canParse<double>(value) && (parse<double>(value) >= 0);
245 return canParse<bool>(value);
292 if (parse<bool>(value)) {
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
@ MID_COPY_NAME
Copy object name - popup entry.
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
GUIIcon
An enumeration of icons used by the gui applications.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_MAX_SOURCE
max source (used only by TAZs)
@ GNE_ATTR_TAZCOLOR
Color of TAZSources/TAZSinks.
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ GNE_ATTR_MIN_SOURCE
min source (used only by TAZs)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
An Element which don't belong to GNENet but has influence in the simulation.
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
static const Parameterised::Map PARAMETERS_EMPTY
empty parameter maps (used by ACs without parameters)
void resetDefaultValues()
reset attribute carrier to their default values
GNENet * myNet
pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
A road/street connecting two junctions (netedit-version)
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
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 writeAdditional(OutputDevice &device) const
write additional element into a xml file
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspondent attribute are valids
void updateGeometry()
update pre-computed geometry information
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double getDepartWeight() const
get depart weight
~GNETAZSourceSink()
destructor
GNEMoveOperation * getMoveOperation()
get move operation
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
double myDepartWeight
depart Weight
const Parameterised::Map & getACParametersMap() const
get parameters map
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
GNETAZSourceSink(SumoXMLTag tag, GNENet *net)
default Constructor
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getParentName() const
Returns the name of the parent object.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
double getAttributeDouble(SumoXMLAttr key) const
bool isAttributeEnabled(SumoXMLAttr key) const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position getPositionInView() const
Returns position of additional in view.
Position getAttributePosition(SumoXMLAttr key) const
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void changeAttribute(GNEChange_Attribute *change)
special method for change attributes, avoid empty changes, always execute
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
Stores the information about how to visualize structures.
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.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
std::map< std::string, std::string > Map
parameters map
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.
static bool isValidAdditionalID(const std::string &value)
whether the given string is a valid id for an additional object