PlotManager.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GAZEBO_GUI_PLOT_PLOTMANAGER_HH_
18 #define GAZEBO_GUI_PLOT_PLOTMANAGER_HH_
19 
20 #include <memory>
21 #include <string>
22 
23 #include "gazebo/msgs/msgs.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
30  namespace gui
31  {
32  // Forward declare private data class
33  class PlotManagerPrivate;
34 
35  class PlotWindow;
36 
38  class GZ_GUI_VISIBLE PlotManager : public SingletonT<PlotManager>
39  {
41  public: PlotManager();
42 
44  public: virtual ~PlotManager();
45 
49  public: void OnWorldControl(ConstWorldControlPtr &_data);
50 
55  public: void AddIntrospectionCurve(const std::string &_name,
56  PlotCurveWeakPtr _curve);
57 
60  public: void RemoveIntrospectionCurve(PlotCurveWeakPtr _curve);
61 
66  public: void AddTopicCurve(const std::string &_topic,
67  PlotCurveWeakPtr _curve);
68 
71  public: void RemoveTopicCurve(PlotCurveWeakPtr _curve);
72 
76  public: void AddWindow(PlotWindow *_window);
77 
80  public: void RemoveWindow(PlotWindow *_window);
81 
85  public: std::string HumanReadableName(const std::string &_uri) const;
86 
88  private: friend class SingletonT<PlotManager>;
89 
92  private: std::unique_ptr<PlotManagerPrivate> dataPtr;
93  };
94  }
95 }
96 #endif
Forward declarations for the common classes.
Definition: Animation.hh:26
Singleton template class.
Definition: SingletonT.hh:33
Plot window.
Definition: PlotWindow.hh:36
A class that connects simulation data with the plotting tool.
Definition: PlotManager.hh:38
std::weak_ptr< PlotCurve > PlotCurveWeakPtr
Definition: PlottingTypes.hh:41
default namespace for gazebo