CommonTypes.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 #ifndef Q_MOC_RUN
25 #include <boost/shared_ptr.hpp>
26 #endif
27 #include "gazebo/util/system.hh"
28 
30 // Defines
32 #ifndef NULL
33 #define NULL 0
34 #endif
35 
37 // Macros
39 
40 #if defined(__GNUC__)
41 #define GAZEBO_DEPRECATED(version) __attribute__((deprecated))
42 #define GAZEBO_FORCEINLINE __attribute__((always_inline))
43 #elif defined(_WIN32)
44 // GAZEBO_DEPRECATED should be defined as something like
45 // __declspec(deprecated), but it needs to go *before* the function name,
46 // and we're putting GAZEBO_DEPRECATED *after* the function.
47 #define GAZEBO_DEPRECATED(version)
48 #define GAZEBO_FORCEINLINE __forceinline
49 #else
50 #define GAZEBO_DEPRECATED(version) ()
51 #define GAZEBO_FORCEINLINE
52 #endif
53 
54 
58 
60 namespace gazebo
61 {
62  class WorldPlugin;
63  class ModelPlugin;
64  class SensorPlugin;
65  class GUIPlugin;
66  class SystemPlugin;
67  class VisualPlugin;
68 
71  typedef boost::shared_ptr<WorldPlugin> WorldPluginPtr;
72 
75  typedef boost::shared_ptr<ModelPlugin> ModelPluginPtr;
76 
79  typedef boost::shared_ptr<SensorPlugin> SensorPluginPtr;
80 
83  typedef boost::shared_ptr<GUIPlugin> GUIPluginPtr;
84 
87  typedef boost::shared_ptr<SystemPlugin> SystemPluginPtr;
88 
91  typedef boost::shared_ptr<VisualPlugin> VisualPluginPtr;
92 
93  namespace common
94  {
95  class Animation;
96  class Battery;
97  class Color;
98  class DiagnosticTimer;
99  class Image;
100  class Mesh;
101  class SubMesh;
102  class MouseEvent;
103  class NumericAnimation;
104  class Param;
105  class PoseAnimation;
106  class SkeletonAnimation;
107  class SphericalCoordinates;
108  class Time;
109 
110  template <typename T>
111  class ParamT;
112 
114  static const double SpeedOfLight = 299792458;
115 
118  typedef std::vector<common::Param*> Param_V;
119 
122  typedef std::map<std::string, std::string> StrStr_M;
123 
126  typedef boost::shared_ptr<Animation> AnimationPtr;
127 
130  typedef boost::shared_ptr<PoseAnimation> PoseAnimationPtr;
131 
134  typedef boost::shared_ptr<NumericAnimation> NumericAnimationPtr;
135 
138  typedef boost::shared_ptr<DiagnosticTimer> DiagnosticTimerPtr;
139 
142  typedef boost::shared_ptr<SphericalCoordinates> SphericalCoordinatesPtr;
143 
146  typedef std::shared_ptr<Battery> BatteryPtr;
147  }
148 
149  namespace event
150  {
151  class Connection;
152 
155  typedef boost::shared_ptr<Connection> ConnectionPtr;
156 
159  typedef std::vector<ConnectionPtr> Connection_V;
160  }
161 }
163 
164 #endif
boost::shared_ptr< DiagnosticTimer > DiagnosticTimerPtr
Definition: CommonTypes.hh:138
boost::shared_ptr< PoseAnimation > PoseAnimationPtr
Definition: CommonTypes.hh:130
boost::shared_ptr< WorldPlugin > WorldPluginPtr
Definition: CommonTypes.hh:71
boost::shared_ptr< NumericAnimation > NumericAnimationPtr
Definition: CommonTypes.hh:134
Definition: CommonTypes.hh:111
A class that encapsulates a connection.
Definition: Event.hh:118
Forward declarations for the common classes.
Definition: Animation.hh:33
std::vector< common::Param * > Param_V
Definition: CommonTypes.hh:118
boost::shared_ptr< ModelPlugin > ModelPluginPtr
Definition: CommonTypes.hh:75
boost::shared_ptr< VisualPlugin > VisualPluginPtr
Definition: CommonTypes.hh:91
boost::shared_ptr< Animation > AnimationPtr
Definition: CommonTypes.hh:126
boost::shared_ptr< GUIPlugin > GUIPluginPtr
Definition: CommonTypes.hh:83
std::map< std::string, std::string > StrStr_M
Definition: CommonTypes.hh:122
boost::shared_ptr< SphericalCoordinates > SphericalCoordinatesPtr
Definition: CommonTypes.hh:142
boost::shared_ptr< SensorPlugin > SensorPluginPtr
Definition: CommonTypes.hh:79
std::shared_ptr< Battery > BatteryPtr
Definition: CommonTypes.hh:146
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:155
static const double SpeedOfLight
Speed of light.
Definition: CommonTypes.hh:114
boost::shared_ptr< SystemPlugin > SystemPluginPtr
Definition: CommonTypes.hh:87
std::vector< ConnectionPtr > Connection_V
Definition: CommonTypes.hh:159