载入中...
搜索中...
未找到
WorldSnapshotParsing.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4#include "common/Snapshot.h"
5
6#include <initializer_list>
7#include <string>
8#include <string_view>
9
12bool hasExactFields(const eve::Value::Object& object, std::initializer_list<std::string_view> expected);
21const eve::Value* field(const eve::Value::Object& object, std::string_view name);
23[[nodiscard]] eve::Result<std::string> readString(const eve::Value::Object& object, std::string_view name);
25[[nodiscard]] eve::Result<std::uint64_t> readUint64(const eve::Value::Object& object, std::string_view name);
27[[nodiscard]] eve::Result<std::int64_t> readInt64(const eve::Value::Object& object, std::string_view name);
29[[nodiscard]] eve::Result<double> readNumber(const eve::Value::Object& object, std::string_view name);
31[[nodiscard]] eve::Result<float> readFloat(const eve::Value::Object& object, std::string_view name);
33[[nodiscard]] eve::Result<bool> readBool(const eve::Value::Object& object, std::string_view name);
34} // namespace eve::physics::snapshot_detail
std::string name
Definition ECS.cpp:154
Move-only, checked operation results for the common layer.
Versioned, integrity-checked persistence envelopes.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
std::map< std::string, Value > Object
Definition Value.h:34
Result< float > readFloat(const Value::Object &object, std::string_view name)
Reads a required finite number representable by float.
const Value * field(const Value::Object &object, std::string_view name)
Borrow an optional field only during the current synchronous codec call. @ownership Object owns the r...
bool hasExactFields(const Value::Object &object, std::initializer_list< std::string_view > expected)
Internal exact-field schema predicate.
Result< std::uint64_t > readUint64(const Value::Object &object, std::string_view name)
Reads a required unsigned decimal integer string.
Result< std::int64_t > readInt64(const Value::Object &object, std::string_view name)
Reads a required signed decimal integer string.
Result< bool > readBool(const Value::Object &object, std::string_view name)
Reads a required boolean.
eve::Result< double > readNumber(const eve::Value::Object &object, std::string_view name)
Reads a required finite number.
Result< std::string > readString(const Value::Object &object, std::string_view name)
Reads a required owning string.