载入中...
搜索中...
未找到
eve::event::sdl::Event类 参考final

#include <Event.h>

类 eve::event::sdl::Event 继承关系图:
eve::event::Event eve::Module

Public 成员函数

 Event ()
 
virtual ~Event ()
 
void pump () override
 Pumps the event queue. This function gathers all the pending input information from devices and places it on the event queue. Normally not needed if you poll for events.
 
Messagewait () override
 Waits for the next event (indefinitely). Useful for creating games where the screen and game state only needs updating when the user interacts with the window.
 
void clear () override
 Clears the event queue.
 
- Public 成员函数 继承自 eve::event::Event
 Module_REG (Event)
 
void push (Message *msg)
 Queues a message. Thread-safe: workers may push completions for the main loop to poll.
 
void pushData (std::string name, std::string data="")
 Script helper: pushes an event with an optional string payload.
 
Messagepoll ()
 Pops the oldest message, or nullptr if the queue is empty (caller must delete).
 
std::string pollName ()
 Script helper: pops one message and returns its name, or "" if none.
 
std::string getLastData () const
 First string arg of the message most recently returned by pollName/pollData.
 
std::string pollData ()
 Pops one message and returns its first string arg (or ""). Name is discarded — use pollName when you need the type.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 
virtual std::string getName () const =0
 

额外继承的成员函数

- Protected 属性 继承自 eve::event::Event
std::mutex queueMu_
 
std::queue< Message * > queue
 
std::string lastData_
 

详细描述

在文件 Event.h11 行定义.

构造及析构函数说明

◆ Event()

eve::event::sdl::Event::Event ( )

在文件 Event.cpp15 行定义.

◆ ~Event()

eve::event::sdl::Event::~Event ( )
virtual

重载 eve::event::Event .

在文件 Event.cpp26 行定义.

成员函数说明

◆ clear()

void eve::event::sdl::Event::clear ( )
overridevirtual

Clears the event queue.

重载 eve::event::Event .

在文件 Event.cpp73 行定义.

引用了 eve::event::Event::clear().

◆ pump()

void eve::event::sdl::Event::pump ( )
overridevirtual

Pumps the event queue. This function gathers all the pending input information from devices and places it on the event queue. Normally not needed if you poll for events.

实现了 eve::event::Event.

在文件 Event.cpp31 行定义.

引用了 eve::event::IPlatformEventSink::onPumpFinished(), eve::event::Event::push() , 以及 eve::cap::query().

◆ wait()

Message * eve::event::sdl::Event::wait ( )
overridevirtual

Waits for the next event (indefinitely). Useful for creating games where the screen and game state only needs updating when the user interacts with the window.

实现了 eve::event::Event.

在文件 Event.cpp47 行定义.

引用了 eve::event::Event::poll().


该类的文档由以下文件生成: