载入中...
搜索中...
未找到
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()

Result< std::optional< double > > eve::weapon::detail::readOptionalDouble ( const Value::Object &  object,
std::string_view  name,
std::string_view  path,
std::string_view  source 
)
inline

Decode an optional finite number for the weapon codecs.

参数
objectBorrowed object, stable for this synchronous call and never retained.
nameBorrowed field name, never retained.
pathBorrowed diagnostic path, copied only on failure.
sourceBorrowed 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()

Result< std::optional< int > > eve::weapon::detail::readOptionalInt ( const Value::Object &  object,
std::string_view  name,
std::string_view  path,
std::string_view  source 
)
inline

Decode an optional native int, also accepting integral finite Doubles, for the weapon codecs.

参数
objectBorrowed object, stable for this synchronous call and never retained.
nameBorrowed field name, never retained.
pathBorrowed diagnostic path, copied only on failure.
sourceBorrowed 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.