载入中...
搜索中...
未找到
GrowthEvents.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4#include <cstdint>
5#include <string>
6#include <vector>
7
8namespace eve::growth {
9
11enum class GrowthEventKind : std::uint8_t {
12 StageChanged = 0,
13 Matured,
16 Watered,
17 Fed,
20 Cured,
21 Bred,
23 Died,
24};
25
29 std::uint64_t organismId = 0;
30 std::string speciesId;
31 std::string detail;
32};
33
36public:
37 void push(GrowthEvent event);
38 void clear();
39 [[nodiscard]] int count() const;
46 [[nodiscard]] const GrowthEvent* at(int index) const;
53 [[nodiscard]] static const char* kindName(GrowthEventKind kind) noexcept;
54
55private:
56 std::vector<GrowthEvent> events_;
57};
58
59} // namespace eve::growth
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::string kind
int count
std::size_t at
uint32_t index
Append-only event log cleared explicitly (economy-style).
GrowthEventKind
Kind of a deterministic growth lifecycle event.
One queued lifecycle observation.