CommonTypes.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-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_COMMON_TYPES_HH_
18 #define _GAZEBO_COMMON_TYPES_HH_
19 
20 #include <vector>
21 #include <map>
22 #include <string>
23 #include <memory>
24 #include <boost/shared_ptr.hpp>
25 #include "gazebo/util/system.hh"
26 
28 // Defines
30 #ifndef NULL
31 #define NULL 0
32 #endif
33 
35 // Macros
37 
38 #if defined(__GNUC__)
39 #define GAZEBO_DEPRECATED(version) __attribute__((deprecated))
40 #define GAZEBO_FORCEINLINE __attribute__((always_inline))
41 #elif defined(_WIN32)
42 // GAZEBO_DEPRECATED should be defined as something like
43 // __declspec(deprecated), but it needs to go *before* the function name,
44 // and we're putting GAZEBO_DEPRECATED *after* the function.
45 #define GAZEBO_DEPRECATED(version)
46 #define GAZEBO_FORCEINLINE __forceinline
47 #else
48 #define GAZEBO_DEPRECATED(version) ()
49 #define GAZEBO_FORCEINLINE
50 #endif
51 
52 
56 
58 namespace gazebo
59 {
60  class WorldPlugin;
61  class ModelPlugin;
62  class SensorPlugin;
63  class GUIPlugin;
64  class SystemPlugin;
65  class VisualPlugin;
66 
69  typedef boost::shared_ptr<WorldPlugin> WorldPluginPtr;
70 
73  typedef boost::shared_ptr<ModelPlugin> ModelPluginPtr;
74 
77  typedef boost::shared_ptr<SensorPlugin> SensorPluginPtr;
78 
81  typedef boost::shared_ptr<GUIPlugin> GUIPluginPtr;
82 
85  typedef boost::shared_ptr<SystemPlugin> SystemPluginPtr;
86 
89  typedef boost::shared_ptr<VisualPlugin> VisualPluginPtr;
90 
91  namespace common
92  {
93  class Animation;
94  class Battery;
95  class Color;
96  class DiagnosticTimer;
97  class Image;
98  class Mesh;
99  class SubMesh;
100  class MouseEvent;
101  class NumericAnimation;
102  class Param;
103  class PoseAnimation;
104  class SkeletonAnimation;
105  class SphericalCoordinates;
106  class Time;
107 
108  template <typename T>
109  class ParamT;
110 
112  static const double SpeedOfLight = 299792458;
113 
116  typedef std::vector<common::Param*> Param_V;
117 
120  typedef std::map<std::string, std::string> StrStr_M;
121 
124  typedef boost::shared_ptr<Animation> AnimationPtr;
125 
128  typedef boost::shared_ptr<PoseAnimation> PoseAnimationPtr;
129 
132  typedef boost::shared_ptr<NumericAnimation> NumericAnimationPtr;
133 
136  typedef boost::shared_ptr<DiagnosticTimer> DiagnosticTimerPtr;
137 
140  typedef boost::shared_ptr<SphericalCoordinates> SphericalCoordinatesPtr;
141 
144  typedef std::shared_ptr<Battery> BatteryPtr;
145  }
146 
147  namespace event
148  {
149  class Connection;
150 
153  typedef boost::shared_ptr<Connection> ConnectionPtr;
154 
157  typedef std::vector<ConnectionPtr> Connection_V;
158  }
159 }
161 
162 #endif
boost::shared_ptr< DiagnosticTimer > DiagnosticTimerPtr
Definition: CommonTypes.hh:136
boost::shared_ptr< PoseAnimation > PoseAnimationPtr
Definition: CommonTypes.hh:128
boost::shared_ptr< WorldPlugin > WorldPluginPtr
Definition: CommonTypes.hh:69
boost::shared_ptr< NumericAnimation > NumericAnimationPtr
Definition: CommonTypes.hh:132
Definition: CommonTypes.hh:109
A class that encapsulates a connection.
Definition: Event.hh:116
std::vector< common::Param * > Param_V
Definition: CommonTypes.hh:116
boost::shared_ptr< ModelPlugin > ModelPluginPtr
Definition: CommonTypes.hh:73
boost::shared_ptr< VisualPlugin > VisualPluginPtr
Definition: CommonTypes.hh:89
boost::shared_ptr< Animation > AnimationPtr
Definition: CommonTypes.hh:124
boost::shared_ptr< GUIPlugin > GUIPluginPtr
Definition: CommonTypes.hh:81
std::map< std::string, std::string > StrStr_M
Definition: CommonTypes.hh:120
boost::shared_ptr< SphericalCoordinates > SphericalCoordinatesPtr
Definition: CommonTypes.hh:140
boost::shared_ptr< SensorPlugin > SensorPluginPtr
Definition: CommonTypes.hh:77
std::shared_ptr< Battery > BatteryPtr
Definition: CommonTypes.hh:144
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
static const double SpeedOfLight
Speed of light.
Definition: CommonTypes.hh:112
boost::shared_ptr< SystemPlugin > SystemPluginPtr
Definition: CommonTypes.hh:85
std::vector< ConnectionPtr > Connection_V
Definition: CommonTypes.hh:157