Cumulia Illustrator Rendering Engine v1.0.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
cil::EventWatcher Class Reference

The EventWatcher class defines a mechanism for managing events and callbacks. More...

#include <event.h>

Inheritance diagram for cil::EventWatcher:
cil::AbstractLocator cil::LocatorPass cil::CompositeLocator cil::Locator cil::ArrowLocator cil::PlaneLocator cil::PositionLocator cil::ShapeLocator cil::DiskLocator cil::OrientationLocator cil::BoxLocator cil::CylinderLocator cil::SphereLocator cil::BottomBoxLocator cil::BottomCylinderLocator

Public Member Functions

 EventWatcher ()
 
virtual ~EventWatcher ()
 
void bind (const std::string &name, EventCallback callback)
 Binds a callback function to a specific event name.
 
void send (const std::string &name)
 Triggers an event by its name.
 

Detailed Description

The EventWatcher class defines a mechanism for managing events and callbacks.

Constructor & Destructor Documentation

◆ EventWatcher()

cil::EventWatcher::EventWatcher ( )

◆ ~EventWatcher()

virtual cil::EventWatcher::~EventWatcher ( )
virtual

Member Function Documentation

◆ bind()

void cil::EventWatcher::bind ( const std::string & name,
EventCallback callback )

Binds a callback function to a specific event name.

Parameters
nameA string representing the event name.
callbackAn EventCallback object that will be called when the event is sent.

◆ send()

void cil::EventWatcher::send ( const std::string & name)

Triggers an event by its name.

Parameters
nameA string representing the event name to be sent.