67 const std::string
getID()
const;
106 void drawInLayer(
const double typeOrLayer,
const double extraOffset = 0)
const;
284 static T
parse(
const std::string&
string);
290 static bool canParse(
const GNENet* net,
const std::string& value,
const bool checkConsecutivity);
298 static std::string
parseIDs(
const std::vector<T>& ACs);
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEAttributeCarrier(const GNEAttributeCarrier &)=delete
Invalidated copy constructor.
virtual std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
virtual bool checkDrawMoveContour() const =0
check if draw move contour (red)
void markForDrawingFront()
mark for drawing front
virtual bool checkDrawDeleteContourSmall() const =0
check if draw delete contour small (pink/white)
GNEAttributeCarrier & operator=(const GNEAttributeCarrier &src)=delete
Invalidated assignment operator.
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
void selectAttributeCarrier()
select attribute carrier using GUIGlobalSelection
void setInGrid(bool value)
virtual bool checkDrawRelatedContour() const =0
check if draw related contour (cyan)
bool isMarkedForDrawingFront() const
check if this AC is marked for drawing front
bool myDrawInFront
boolean to check if drawn this AC over other elements
bool myCenterAfterCreation
boolean to check if center this element after creation
FXIcon * getACIcon() const
get FXIcon associated to this AC
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
virtual const GUIGlObject * getGUIGlObject() const =0
get GUIGlObject associated with this AttributeCarrier (constant)
static bool canParse(const GNENet *net, const std::string &value, const bool checkConsecutivity)
true if a value of type T can be parsed from string (requieres network)
virtual bool checkDrawToContour() const =0
check if draw from contour (magenta)
void setACParameters(const std::string ¶meters, GNEUndoList *undoList)
set parameters (string)
bool checkDrawFrontContour() const
check if draw front contour (green/blue)
const bool myIsTemplate
whether the current object is a template object (used for edit attributes)
virtual void setAttribute(SumoXMLAttr key, const std::string &value)=0
method for setting the attribute and nothing else (used in GNEChange_Attribute)
virtual bool checkDrawFromContour() const =0
check if draw from contour (green)
virtual void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_ToggleAttribute)
static const std::string FEATURE_LOADED
feature is still unchanged after being loaded (implies approval)
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
std::string getCommonAttribute(const Parameterised *parameterised, SumoXMLAttr key) const
static const std::string FEATURE_APPROVED
feature has been approved but not changed (i.e. after being reguessed)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
bool myInGrid
boolean to check if this AC is in grid
std::string getAlternativeValueForDisabledAttributes(SumoXMLAttr key) const
virtual bool isAttributeComputed(SumoXMLAttr key) const
static const std::string True
true value in string format (used for comparing boolean values in getAttribute(......
std::string myFilename
filename in which save this AC
void unselectAttributeCarrier()
unselect attribute carrier using GUIGlobalSelection
void removeACParametersKeys(const std::vector< std::string > &keepKeys, GNEUndoList *undoList)
remove keys
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
virtual bool isAttributeEnabled(SumoXMLAttr key) const
const std::string & getTagStr() const
get tag assigned to this object in string format
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
bool isTemplate() const
check if this AC is template
virtual const Parameterised::Map & getACParametersMap() const =0
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
void addACParameters(const std::string &key, const std::string &attribute, GNEUndoList *undoList)
add (or update attribute) key and attribute
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
static T parse(const GNENet *net, const std::string &value)
parses a complex value of type T from string (use for list of edges, list of lanes,...
void resetDefaultValues(const bool allowUndoRedo)
reset attribute carrier to their default values
const std::string & getFilename() const
get filename in which save this AC
bool hasAttribute(SumoXMLAttr key) const
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
virtual bool checkDrawSelectContour() const =0
check if draw select contour (blue)
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
virtual GNEHierarchicalElement * getHierarchicalElement()=0
get GNEHierarchicalElement associated with this AttributeCarrier
GNENet * myNet
pointer to net
bool inGrid() const
check if this AC was inserted in grid
void unmarkForDrawingFront()
unmark for drawing front
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
bool isCommonValid(SumoXMLAttr key, const std::string &value) const
GNENet * getNet() const
get pointer to net
virtual void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
static const std::string False
true value in string format(used for comparing boolean values in getAttribute(...))
virtual void updateGeometry()=0
update pre-computed geometry information
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
T getACParameters() const
get parameters
virtual ~GNEAttributeCarrier()
Destructor.
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool checkDrawInspectContour() const
check if draw inspect contour (black/white)
virtual GUIGlObject * getGUIGlObject()=0
void changeDefaultFilename(const std::string &file)
change defaultFilename (only used in SavingFilesHandler)
virtual bool checkDrawOverContour() const =0
check if draw over contour (orange)
virtual bool checkDrawDeleteContour() const =0
check if draw delete contour (pink/white)
const GNETagProperties * myTagProperty
reference to tagProperty associated with this attribute carrier
the function-object for an editing operation (abstract base)
the function-object for an editing operation (abstract base)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
A NBNetBuilder extended by visualisation and editing capabilities.
An upper class for objects with additional parameters.
std::map< std::string, std::string > Map
parameters map