#include <ExistenceEventSource.hh>
Inherits EventSource.
§ ExistenceEventSource()
Constructor. 
- Parameters
 - 
  
    | [in] | _pub | the publisher for SimEvents  | 
    | [in] | _world | the word  | 
  
   
 
 
§ Emit()
  
  
      
        
          | void Emit  | 
          ( | 
          const std::string &  | 
          _data | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
emit an event with data to the internal publisher (and using the internal type) 
- Parameters
 - 
  
    | [in] | _data | the JSON data related to this event.  | 
  
   
 
 
§ Init()
§ IsActive()
  
  
      
        
          | virtual bool IsActive  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtualinherited   | 
  
 
An event source can be used to enable other events. 
Inactive events do not generate an message when Emit is called. 
- Returns
 - true if the event is active 
 
 
 
§ Load()
  
  
      
        
          | virtual void Load  | 
          ( | 
          const sdf::ElementPtr  | 
          _sdf | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Reads the model filter and event name. 
- Parameters
 - 
  
    | [in] | _sdf | the element for this event source  | 
  
   
Reimplemented from EventSource.
 
 
§ OnExistence()
      
        
          | void OnExistence  | 
          ( | 
          const std::string &  | 
          _model,  | 
        
        
           | 
           | 
          bool  | 
          _alive  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
callback for gazebo event 
- Parameters
 - 
  
    | [in] | _model | the name of the model  | 
    | [in] | _alive | true for spawn, false for delete  | 
  
   
 
 
§ active
True if the event source is active. 
Inactive event sources do not emit events 
 
 
§ name
§ pub
a way to send messages to the other topics (to the REST) 
 
 
§ type
§ world
The documentation for this class was generated from the following file: