cpptoml
A C++11 parser for TOML
|
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <map>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <vector>
Go to the source code of this file.
Typedefs | |
using | cpptoml::string_to_base_map = std::unordered_map< std::string, std::shared_ptr< base > > |
typedef offset_datetime | cpptoml::datetime |
Functions | |
std::ostream & | cpptoml::operator<< (std::ostream &os, const local_date &dt) |
std::ostream & | cpptoml::operator<< (std::ostream &os, const local_time <ime) |
std::ostream & | cpptoml::operator<< (std::ostream &os, const zone_offset &zo) |
std::ostream & | cpptoml::operator<< (std::ostream &os, const local_datetime &dt) |
std::ostream & | cpptoml::operator<< (std::ostream &os, const offset_datetime &dt) |
template<class T > | |
std::shared_ptr< typename value_traits< T >::type > | cpptoml::make_value (T &&val) |
std::shared_ptr< array > | cpptoml::make_array () |
template<class T > | |
std::shared_ptr< T > | cpptoml::make_element () |
std::shared_ptr< table > | cpptoml::make_table () |
std::shared_ptr< table_array > | cpptoml::make_table_array () |
template<> | |
std::shared_ptr< array > | cpptoml::make_element< array > () |
template<> | |
std::shared_ptr< table_array > | cpptoml::make_element< table_array > () |
template<class T > | |
std::enable_if<!std::is_floating_point< T >::value &&std::is_signed< T >::value, option< T > >::type | cpptoml::get_impl (const std::shared_ptr< base > &elem) |
template<class T > | |
std::enable_if<!std::is_same< T, bool >::value &&std::is_unsigned< T >::value, option< T > >::type | cpptoml::get_impl (const std::shared_ptr< base > &elem) |
template<class T > | |
std::enable_if<!std::is_integral< T >::value||std::is_same< T, bool >::value, option< T > >::type | cpptoml::get_impl (const std::shared_ptr< base > &elem) |
template<> | |
std::shared_ptr< table > | cpptoml::make_element< table > () |
bool | cpptoml::is_number (char c) |
template<class OnError > | |
consumer< OnError > | cpptoml::make_consumer (std::string::iterator &it, const std::string::iterator &end, OnError &&on_error) |
std::istream & | cpptoml::detail::getline (std::istream &input, std::string &line) |
std::shared_ptr< table > | cpptoml::parse_file (const std::string &filename) |
Utility function to parse a file as a TOML file. More... | |
std::ostream & | cpptoml::operator<< (std::ostream &stream, const base &b) |
template<class T > | |
std::ostream & | cpptoml::operator<< (std::ostream &stream, const value< T > &v) |
std::ostream & | cpptoml::operator<< (std::ostream &stream, const table &t) |
std::ostream & | cpptoml::operator<< (std::ostream &stream, const table_array &t) |
std::ostream & | cpptoml::operator<< (std::ostream &stream, const array &a) |
|
inline |
Utility function to parse a file as a TOML file.
Returns the root table. Throws a parse_exception if the file cannot be opened.