NeBuild dev
|
#include "preprocessor.hpp"
#include "table.hpp"
#include "parse_result.hpp"
#include "header_start.hpp"
#include "header_end.hpp"
Go to the source code of this file.
Namespaces | |
namespace | literals |
Functions | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::string_view doc, std::string_view source_path={}) |
Parses a TOML document from a string view. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::string_view doc, std::string &&source_path) |
Parses a TOML document from a string view. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse_file (std::string_view file_path) |
Parses a TOML document from a file. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::string_view doc, std::wstring_view source_path) |
Parses a TOML document from a string view. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::istream &doc, std::wstring_view source_path) |
Parses a TOML document from a stream. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse_file (std::wstring_view file_path) |
Parses a TOML document from a file. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::istream &doc, std::string_view source_path={}) |
Parses a TOML document from a stream. | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV | parse (std::istream &doc, std::string &&source_path) |
Parses a TOML document from a stream. | |
literals::TOML_ABI_NAMESPACE_BOOL (TOML_EXCEPTIONS, lit_ex, lit_noex) | |
TOML_NODISCARD TOML_ALWAYS_INLINE parse_result | literals::operator""_toml (const char *str, size_t len) |
Parses TOML data from a string literal. | |
Variables | |
TOML_NAMESPACE_START | |
TOML_ABI_NAMESPACE_END | |
literals::TOML_ABI_NAMESPACE_END | |
TOML_NAMESPACE_END | |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
std::string && | source_path | ||
) |
Parses a TOML document from a stream.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss, "foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
std::string_view | source_path = {} |
||
) |
Parses a TOML document from a stream.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
std::wstring_view | source_path | ||
) |
Parses a TOML document from a stream.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
std::string && | source_path | ||
) |
Parses a TOML document from a string view.
\detail \cpp auto tbl = toml::parse("a = 3"sv, "foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
std::string_view | source_path = {} |
||
) |
Parses a TOML document from a string view.
\detail \cpp auto tbl = toml::parse("a = 3"sv); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
std::wstring_view | source_path | ||
) |
Parses a TOML document from a string view.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp auto tbl = toml::parse("a = 3"sv, L"foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
doc | The TOML document to parse. Must be valid UTF-8. |
source_path | The path used to initialize each node's source().path . If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse_file | ( | std::string_view | file_path | ) |
Parses a TOML document from a file.
\detail \cpp toml::parse_result get_foo_toml() { return toml::parse_file("foo.toml"); } \ecpp
file_path | The TOML document to parse. Must be valid UTF-8. |
TOML_NODISCARD TOML_EXPORTED_FREE_FUNCTION parse_result TOML_CALLCONV parse_file | ( | std::wstring_view | file_path | ) |
Parses a TOML document from a file.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp toml::parse_result get_foo_toml() { return toml::parse_file(L"foo.toml"); } \ecpp
file_path | The TOML document to parse. Must be valid UTF-8. |
TOML_ABI_NAMESPACE_END |
TOML_NAMESPACE_END |
TOML_NAMESPACE_START |