NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
yaml_float类 参考final

YAML浮点数值类型 更多...

#include <yaml_value.hpp>

类 yaml_float 继承关系图:
[图例]

Public 成员函数

 yaml_float (const double v)
 构造浮点数值
types type () const noexcept override
 获取值的具体类型
double get_value () const noexcept
 获取浮点数值
Public 成员函数 继承自 yaml_value
void set_anchor (const string &a)
 设置锚点名
void set_tag (const string &t)
 设置类型标签
string to_string () const
 紧凑单行序列化
string to_document () const
 格式化文档序列化
Public 成员函数 继承自 istringify< yaml_value >
constexpr string to_string () const
 转换为字符串

额外继承的成员函数

Public 类型 继承自 yaml_value
enum  types {
  Null , Boolean , Integer , Float ,
  String , Timestamp , Sequence , Mapping
}
 YAML值类型枚举 更多...
Public 属性 继承自 yaml_value
string anchor
 锚点名(YAML &anchor 语法),空字符串表示无锚点
string tag
 类型标签(YAML !tag 语法),空字符串表示无标签

详细描述

YAML浮点数值类型

表示YAML中的浮点数值。存储为IEEE 754双精度浮点数(double)。 支持YAML中的特殊浮点值:

  • 无穷大:.inf、.Inf、.INF
  • 负无穷大:-.inf、-.Inf、-.INF
  • 非数字:.nan、.NaN、.NAN
  • 科学记数法:1.23e+4、5.67E-10

在文件 yaml_value.hpp412 行定义.

构造及析构函数说明

◆ yaml_float()

yaml_float::yaml_float ( const double v)
inlineexplicit

构造浮点数值

参数
v双精度浮点数

在文件 yaml_value.hpp428 行定义.

成员函数说明

◆ get_value()

double yaml_float::get_value ( ) const
inlinenodiscardnoexcept

获取浮点数值

返回
存储的双精度浮点数

在文件 yaml_value.hpp438 行定义.

◆ type()

types yaml_float::type ( ) const
inlinenodiscardoverridevirtualnoexcept

获取值的具体类型

返回
类型枚举值

实现了 yaml_value.

在文件 yaml_value.hpp431 行定义.

引用了 yaml_value::Float.


该类的文档由以下文件生成: