Independent sequence cursor used to consume an GameEventLog in batches. 更多...
#include <GameEvent.h>
Public 成员函数 | |
| int | read (int maxCount) |
| Reads at most maxCount events and advances past the returned batch. | |
| int | batchCount () const |
| Returns the number of events in the most recent batch. | |
| const GameEvent * | batchAt (int index) const |
| Returns an event from the most recent batch, or nullptr. @ownership Borrowed from the source GameEventLog; never delete it. @lifetime Valid until the consumer reads again or the source log mutates. @thread GameEventLog owner thread only. @reentrancy No callbacks are invoked. | |
| EventSequence | position () const |
| Returns the next stream-local sequence this consumer will inspect. | |
| void | seek (EventSequence sequence) |
| Moves the cursor to a sequence without reading events. | |
| void | seek (uint64_t sequence) |
| Compatibility facade accepting the old untyped sequence value. | |
友元 | |
| class | GameEventLog |
详细描述
Independent sequence cursor used to consume an GameEventLog in batches.
在文件 GameEvent.h 第 224 行定义.
成员函数说明
◆ batchAt()
| const GameEvent * eve::game_event::EventConsumer::batchAt | ( | int | index | ) | const |
Returns an event from the most recent batch, or nullptr. @ownership Borrowed from the source GameEventLog; never delete it. @lifetime Valid until the consumer reads again or the source log mutates. @thread GameEventLog owner thread only. @reentrancy No callbacks are invoked.
在文件 GameEvent.cpp 第 239 行定义.
引用了 index.
◆ batchCount()
| int eve::game_event::EventConsumer::batchCount | ( | ) | const |
Returns the number of events in the most recent batch.
在文件 GameEvent.cpp 第 237 行定义.
◆ position()
| EventSequence eve::game_event::EventConsumer::position | ( | ) | const |
Returns the next stream-local sequence this consumer will inspect.
在文件 GameEvent.cpp 第 243 行定义.
◆ read()
| int eve::game_event::EventConsumer::read | ( | int | maxCount | ) |
Reads at most maxCount events and advances past the returned batch.
在文件 GameEvent.cpp 第 224 行定义.
◆ seek() [1/2]
| void eve::game_event::EventConsumer::seek | ( | EventSequence | sequence | ) |
Moves the cursor to a sequence without reading events.
在文件 GameEvent.cpp 第 245 行定义.
引用了 sequence , 以及 eve::detail::StrongUint64< Tag >::value().
◆ seek() [2/2]
| void eve::game_event::EventConsumer::seek | ( | uint64_t | sequence | ) |
Compatibility facade accepting the old untyped sequence value.
在文件 GameEvent.cpp 第 250 行定义.
引用了 sequence.
友元及相关函数文档
◆ GameEventLog
|
friend |
在文件 GameEvent.h 第 246 行定义.
该类的文档由以下文件生成:
- src/modules/game_event/GameEvent.h
- src/modules/game_event/GameEvent.cpp