|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
YAML时间戳值类型 更多...
#include <yaml_value.hpp>
Public 成员函数 | |
| yaml_timestamp (const string_view v) | |
| 从字符串构造时间戳(自动检测格式) | |
| yaml_timestamp (const datetime &dt) | |
| 从 datetime 对象构造时间戳 | |
| types | type () const noexcept override |
| 获取值的具体类型 | |
| const datetime & | get_value () const noexcept |
| 获取日期时间值 | |
| string | get_string_value () const |
| 获取 RFC 3339 格式的字符串表示 | |
| 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中的时间戳值。内部使用 datetime 对象存储, 支持 ISO 8601 和 RFC 3339 格式的解析。
支持的格式示例:
在文件 yaml_value.hpp 第 520 行定义.
|
inlineexplicit |
从字符串构造时间戳(自动检测格式)
| v | ISO 8601 / RFC 3339 格式的字符串 |
| yaml_exception | 格式无效时抛出 |
在文件 yaml_value.hpp 第 537 行定义.
引用了 data(), datetime::try_parse_ISO8601() , 以及 datetime::try_parse_RFC3339().
|
inlineexplicit |
|
inlinenodiscard |
|
inlinenodiscardnoexcept |
|
inlinenodiscardoverridevirtualnoexcept |