PlotComponent Class Reference
A container of the component data that keeps track of the registered attributes and update their values and their registered charts. More...
#include <Plotting.hh>
Public Member Functions | |
| PlotComponent (const std::string &_type, Entity _entity, ComponentTypeId _typeId) | |
| Constructor. More... | |
| ~PlotComponent () | |
| Destructor. More... | |
| std::map< std::string, std::shared_ptr< gz::gui::PlotData > > | Data () const |
| Get all attributes of the component. More... | |
| Entity | Entity () |
| Get the Component entity ID. More... | |
| bool | HasCharts () |
| Check if any of the component attributes has any chart. More... | |
| void | RegisterChart (std::string _attribute, int _chart) |
| Add a registered chart to the attribute. More... | |
| void | SetAttributeValue (std::string _attribute, const double &_value) |
| Set a value of specefic component attribute. More... | |
| ComponentTypeId | TypeId () |
| Get the Component type ID. More... | |
| void | UnRegisterChart (std::string _attribute, int _chart) |
| Remove a registered chart from the attribute. More... | |
Detailed Description
A container of the component data that keeps track of the registered attributes and update their values and their registered charts.
Constructor & Destructor Documentation
◆ PlotComponent()
| PlotComponent | ( | const std::string & | _type, |
| Entity | _entity, | ||
| ComponentTypeId | _typeId | ||
| ) |
Constructor.
- Parameters
-
[in] _type component data type (Pose3d, Vector3d, double) [in] _entity entity id of that component [in] _typeId type identifier unique to each component type
◆ ~PlotComponent()
| ~PlotComponent | ( | ) |
Destructor.
Member Function Documentation
◆ Data()
| std::map<std::string, std::shared_ptr<gz::gui::PlotData> > Data | ( | ) | const |
Get all attributes of the component.
- Returns
- component attributes
◆ Entity()
◆ HasCharts()
| bool HasCharts | ( | ) |
Check if any of the component attributes has any chart.
- Returns
- true if any attribute has a chart false if all attributes are empty from the charts
◆ RegisterChart()
| void RegisterChart | ( | std::string | _attribute, |
| int | _chart | ||
| ) |
Add a registered chart to the attribute.
- Parameters
-
[in] _attribute component attribute to add the chart to it [in] _chart chart ID to be added to the attribute
◆ SetAttributeValue()
| void SetAttributeValue | ( | std::string | _attribute, |
| const double & | _value | ||
| ) |
Set a value of specefic component attribute.
- Parameters
-
[in] _attribute component attribute to set its value ex : yaw attribute in Pose3d type Component [in] _value value to be set to the attribute
◆ TypeId()
| ComponentTypeId TypeId | ( | ) |
Get the Component type ID.
- Returns
- component type ID
◆ UnRegisterChart()
| void UnRegisterChart | ( | std::string | _attribute, |
| int | _chart | ||
| ) |
Remove a registered chart from the attribute.
- Parameters
-
[in] _attribute component attribute to remove the chart from it [in] _chart chart ID to be removed from the attribute
The documentation for this class was generated from the following file: