InspIRCd  3.0
Classes | Public Types | Public Member Functions | List of all members
Events::ModuleEventProvider Class Reference

#include <event.h>

Inheritance diagram for Events::ModuleEventProvider:
ServiceProvider dynamic_reference_base::CaptureHook classbase ClientProtocol::EventProvider ClientProtocol::MessageTagEvent


struct  Comp
struct  ElementComp

Public Types

typedef insp::flat_multiset< ModuleEventListener *, Comp, ElementCompSubscriberList

Public Member Functions

 ModuleEventProvider (Module *mod, const std::string &eventid)
const ModuleGetModule () const
const SubscriberListGetSubscribers () const
void Subscribe (ModuleEventListener *subscriber)
void Unsubscribe (ModuleEventListener *subscriber)
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
const char * GetTypeString () const
virtual void RegisterService ()
void DisableAutoRegister ()
- Public Member Functions inherited from classbase
virtual CullResult cull ()

Additional Inherited Members

- Public Attributes inherited from ServiceProvider
ModuleRef creator
const std::string name
const ServiceType service

Detailed Description

Provider of one or more cross-module events. Modules who wish to provide events for other modules create instances of this class and use one of the macros below to fire the event, passing the instance of the event provider class to the macro. Event providers are identified using a unique identifier string.

Constructor & Destructor Documentation

◆ ModuleEventProvider()

Events::ModuleEventProvider::ModuleEventProvider ( Module mod,
const std::string &  eventid 


modModule providing the event(s)
eventidIdentifier of the event or event group provided, must be unique

Member Function Documentation

◆ GetModule()

const Module* Events::ModuleEventProvider::GetModule ( ) const

Retrieves the module which created this listener.

◆ GetSubscribers()

const SubscriberList& Events::ModuleEventProvider::GetSubscribers ( ) const

Get list of objects subscribed to this event

List of subscribed objects

◆ Subscribe()

void Events::ModuleEventProvider::Subscribe ( ModuleEventListener subscriber)

Subscribes a listener to this event.

subscriberThe listener to subscribe.

◆ Unsubscribe()

void Events::ModuleEventProvider::Unsubscribe ( ModuleEventListener subscriber)

Unsubscribes a listener from this event.

subscriberThe listener to unsubscribe.

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