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

toml数组类 更多...

#include <toml_value.hpp>

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

Public 成员函数

 toml_array ()=default
 默认构造函数
 toml_array (toml_array &&other)=default
 移动构造函数
toml_arrayoperator= (toml_array &&other)=default
 移动赋值运算符
NEFORCE_NODISCARD types type () const noexcept override
 获取类型
NEFORCE_NODISCARD const toml_arrayas_array () const noexcept override
 转换为数组指针
void add_element (unique_ptr< toml_value > value)
 添加元素
NEFORCE_NODISCARD const toml_valueget_element (const size_t index) const noexcept
 获取常量元素指针
NEFORCE_NODISCARD size_t size () const noexcept
 获取数组大小
NEFORCE_NODISCARD const vector< unique_ptr< toml_value > > & get_elements () const noexcept
 获取所有元素的常量引用
Public 成员函数 继承自 toml_value
virtual ~toml_value ()=default
 虚析构函数
virtual NEFORCE_NODISCARD const toml_booleanas_boolean () const noexcept
 转换为布尔值指针
virtual NEFORCE_NODISCARD const toml_integeras_integer () const noexcept
 转换为整数指针
virtual NEFORCE_NODISCARD const toml_floatas_float () const noexcept
 转换为浮点数指针
virtual NEFORCE_NODISCARD const toml_stringas_string () const noexcept
 转换为字符串指针
virtual NEFORCE_NODISCARD const toml_datetimeas_datetime () const noexcept
 转换为日期时间指针
virtual NEFORCE_NODISCARD const toml_tableas_table () const noexcept
 转换为表格指针
NEFORCE_NODISCARD bool is_boolean () const noexcept
 判断是否为布尔类型
NEFORCE_NODISCARD bool is_integer () const noexcept
 判断是否为整数类型
NEFORCE_NODISCARD bool is_float () const noexcept
 判断是否为浮点数类型
NEFORCE_NODISCARD bool is_string () const noexcept
 判断是否为字符串类型
NEFORCE_NODISCARD bool is_datetime () const noexcept
 判断是否为日期时间类型
NEFORCE_NODISCARD bool is_array () const noexcept
 判断是否为数组类型
NEFORCE_NODISCARD bool is_table () const noexcept
 判断是否为表格类型
NEFORCE_NODISCARD string to_string () const
 转换为紧凑格式字符串
NEFORCE_NODISCARD string to_document () const
 转换为文档格式字符串
Public 成员函数 继承自 istringify< toml_value >
NEFORCE_NODISCARD NEFORCE_CONSTEXPR20 string to_string () const
 转换为字符串

额外继承的成员函数

Public 类型 继承自 toml_value
enum  types {
  Boolean , Integer , Float , String ,
  DateTime , Array , Table
}
 toml值类型枚举 更多...

详细描述

toml数组类

表示toml中的数组类型,包含有序的元素列表。 每个元素可以是任意toml值类型。

在文件 toml_value.hpp594 行定义.

构造及析构函数说明

◆ toml_array()

toml_array::toml_array ( toml_array && other)
default

移动构造函数

参数
other源数组

引用了 toml_array().

成员函数说明

◆ add_element()

void toml_array::add_element ( unique_ptr< toml_value > value)
inline

添加元素

参数
value元素值指针

在文件 toml_value.hpp636 行定义.

引用了 move().

◆ as_array()

NEFORCE_NODISCARD const toml_array * toml_array::as_array ( ) const
inlineoverridevirtualnoexcept

转换为数组指针

返回
返回自身指针

重载 toml_value .

在文件 toml_value.hpp630 行定义.

引用了 toml_array().

◆ get_element()

NEFORCE_NODISCARD const toml_value * toml_array::get_element ( const size_t index) const
inlinenoexcept

获取常量元素指针

参数
index元素索引
返回
元素的常量指针,索引越界返回nullptr

在文件 toml_value.hpp643 行定义.

◆ get_elements()

NEFORCE_NODISCARD const vector< unique_ptr< toml_value > > & toml_array::get_elements ( ) const
inlinenoexcept

获取所有元素的常量引用

返回
元素列表的常量引用

在文件 toml_value.hpp660 行定义.

◆ operator=()

toml_array & toml_array::operator= ( toml_array && other)
default

移动赋值运算符

参数
other源数组
返回
自身引用

引用了 toml_array().

◆ size()

NEFORCE_NODISCARD size_t toml_array::size ( ) const
inlinenoexcept

获取数组大小

返回
元素个数

在文件 toml_value.hpp654 行定义.

◆ type()

NEFORCE_NODISCARD types toml_array::type ( ) const
inlineoverridevirtualnoexcept

获取类型

返回
返回Array类型

实现了 toml_value.

在文件 toml_value.hpp624 行定义.

引用了 toml_value::Array.


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