|
UCILoader 1.1.2
Small C++ library that allows user to connect to a chess engines via UCI protocol.
|
Template for creating typed event objects with a payload. More...
#include <EngineEvent.h>
Public Member Functions | |
| ConcreteEvent (const Payload &p) | |
| Constructor that stores the payload. | |
| uint32_t | getType () const override |
| Get the event type code. | |
| virtual const void * | getPayload () const override |
| Get pointer to the stored payload. | |
Public Member Functions inherited from UCILoader::EngineEvent | |
| virtual | ~EngineEvent () |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual uint32_t | getType () const =0 |
| Get the type code of this event. | |
| virtual const void * | getPayload () const =0 |
| Get the payload data associated with this event. | |
Template for creating typed event objects with a payload.
| Payload | The data type of the event payload |
| EventCode | The unique event type code (must be power of 2) |
ConcreteEvent is a template base class for implementing concrete event types that carry data. Instances are typically created by factory functions in NamedEngineEvents namespace rather than instantiated directly.
Type Safety: Payload is type-checked at compile time. Getters use virtual methods to return the payload pointer, which the caller must cast to the appropriate type based on getType().
|
inline |
Constructor that stores the payload.
| p | The payload value to store |
|
inlineoverridevirtual |
Get pointer to the stored payload.
Implements UCILoader::EngineEvent.
|
inlineoverridevirtual |