InspIRCd  2.0
Public Member Functions | Public Attributes | List of all members
Event Class Reference

#include <modules.h>

Inheritance diagram for Event:

Public Member Functions

 Event (Module *src, const std::string &eventid)
void Send ()
- Public Member Functions inherited from classbase
virtual CullResult cull ()

Public Attributes

ModuleRef source
const std::string id

Detailed Description

The Event class is a unicast message directed at all modules. When the class is properly instantiated it may be sent to all modules using the Send() method, which will trigger the OnEvent method in all modules passing the object as its parameter.

Constructor & Destructor Documentation

◆ Event()

Event::Event ( Module src,
const std::string &  eventid 

Create a new Event

Member Function Documentation

◆ Send()

void Event::Send ( )

Send the Event. The return result of an Event::Send() will always be NULL as no replies are expected.

Member Data Documentation

◆ id

const std::string Event::id

The event identifier. This is arbitary text which should be used to distinguish one type of event from another.

◆ source

ModuleRef Event::source

This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.

The documentation for this class was generated from the following files: