载入中...
搜索中...
未找到
eve::weapon::detail 命名空间参考
函数 | |
| 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. | |
| 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. | |
函数说明
◆ readOptionalDouble()
|
inline |
Decode an optional finite number for the weapon codecs.
- 参数
-
object Borrowed object, stable for this synchronous call and never retained. name Borrowed field name, never retained. path Borrowed diagnostic path, copied only on failure. source Borrowed diagnostic producer name, copied only on failure.
- 返回
- Owning optional double; missing means nullopt, invalid means an InvalidArgument diagnostic.
- 备注
- Integers convert through double; Boolean and String are not coerced.
- 注解
- Caller synchronizes input access; no callbacks or shared mutable state, callable on any thread.
在文件 NumericRead.h 第 24 行定义.
引用了 end, eve::Diagnostic::error(), found, eve::InvalidArgument, name, path, eve::readNumericDoubleValue() , 以及 source.
◆ readOptionalInt()
|
inline |
Decode an optional native int, also accepting integral finite Doubles, for the weapon codecs.
- 参数
-
object Borrowed object, stable for this synchronous call and never retained. name Borrowed field name, never retained. path Borrowed diagnostic path, copied only on failure. source Borrowed diagnostic producer name, copied only on failure.
- 返回
- Owning optional int; missing means nullopt, invalid means an InvalidArgument diagnostic.
- 备注
- Nonintegral/nonfinite Doubles fail before range validation; negative zero becomes zero.
- 注解
- Caller synchronizes input access; no callbacks or shared mutable state, callable on any thread.
在文件 NumericRead.h 第 49 行定义.
引用了 end, eve::Diagnostic::error(), found, eve::InvalidArgument, message, name, number, path , 以及 source.