ExistenceEventSource.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 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
18#ifndef GAZEBO_PLUGINS_EXISTENCEVENTSOURCE_HH_
19#define GAZEBO_PLUGINS_EXISTENCEVENTSOURCE_HH_
20
21#include <string>
22
23#include "EventSource.hh"
24
25namespace gazebo
26{
28 {
33 physics::WorldPtr _world);
34
37 public: virtual void Load(const sdf::ElementPtr _sdf);
38
42 public: void OnExistence(const std::string &_model, bool _alive);
43
48 private: std::string model;
49
52 private: event::ConnectionPtr existenceConnection;
53 };
54}
55
56#endif
The base class for emitting SimEvents.
Definition EventSource.hh:35
Definition ExistenceEventSource.hh:28
void OnExistence(const std::string &_model, bool _alive)
callback for gazebo event
virtual void Load(const sdf::ElementPtr _sdf)
Reads the model filter and event name.
ExistenceEventSource(transport::PublisherPtr _pub, physics::WorldPtr _world)
Constructor.
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
boost::shared_ptr< World > WorldPtr
Definition PhysicsTypes.hh:89
boost::shared_ptr< Publisher > PublisherPtr
Definition TransportTypes.hh:49
Forward declarations for the common classes.
Definition Animation.hh:27