UCILoader 1.1.2
Small C++ library that allows user to connect to a chess engines via UCI protocol.
Loading...
Searching...
No Matches
UCILoader::NoPayloadEvent Class Reference

Simple event type with no associated payload. More...

#include <EngineEvent.h>

Inheritance diagram for UCILoader::NoPayloadEvent:
UCILoader::EngineEvent

Public Member Functions

 NoPayloadEvent (uint32_t c)
 Constructor that stores the event type code.
 
uint32_t getType () const override
 Get the event type code.
 
virtual const void * getPayload () const override
 Get the payload (always nullptr for NoPayloadEvent).
 
- 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.
 

Detailed Description

Simple event type with no associated payload.

NoPayloadEvent is used for events that don't carry any data beyond their type code. Instances are typically created by factory functions in NamedEngineEvents namespace.

getPayload() always returns nullptr for this event type.

See also
NamedEngineEvents for event type definitions using this class

Constructor & Destructor Documentation

◆ NoPayloadEvent()

UCILoader::NoPayloadEvent::NoPayloadEvent ( uint32_t  c)
inline

Constructor that stores the event type code.

Parameters
cThe event type code

Member Function Documentation

◆ getPayload()

virtual const void * UCILoader::NoPayloadEvent::getPayload ( ) const
inlineoverridevirtual

Get the payload (always nullptr for NoPayloadEvent).

Returns
Always returns nullptr

Implements UCILoader::EngineEvent.

◆ getType()

uint32_t UCILoader::NoPayloadEvent::getType ( ) const
inlineoverridevirtual

Get the event type code.

Returns
The stored event type code

Implements UCILoader::EngineEvent.


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