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