载入中...
搜索中...
未找到
NumericRead.h
浏览该文件的文档.
24[[nodiscard]] inline Result<std::optional<double>> readOptionalDouble(const Value::Object& object,
32 DiagnosticCode::InvalidArgument, "Expected number", std::string(path), {}, std::string(source)));
35 DiagnosticCode::InvalidArgument, "Expected finite number", std::string(path), {}, std::string(source)));
49[[nodiscard]] inline Result<std::optional<int>> readOptionalInt(const Value::Object& object, std::string_view name,
55 DiagnosticCode::InvalidArgument, std::move(message), std::string(path), {}, std::string(source)));
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
Definition NumericRead.h:12
Result< std::optional< double > > readOptionalDouble(const Value::Object &object, std::string_view name, std::string_view path, std::string_view source)
Decode an optional finite number for the weapon codecs.
Definition NumericRead.h:24
Result< std::optional< int > > readOptionalInt(const Value::Object &object, std::string_view name, std::string_view path, std::string_view source)
Decode an optional native int, also accepting integral finite Doubles, for the weapon codecs.
Definition NumericRead.h:49
@ InvalidArgument
Result< double > readNumericDoubleValue(const Value &value)
Read an Int64 or Double as a double without imposing a finite-value policy.
Definition Value.cpp:74