OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::TOMLReader Class Reference

#include <TOMLReader.hpp>

Inherits s3d::TOMLValue.

Public Member Functions

SIV3D_NODISCARD_CXX20 TOMLReader ()=default
 
SIV3D_NODISCARD_CXX20 TOMLReader (FilePathView path)
 
SIV3D_NODISCARD_CXX20 TOMLReader (std::unique_ptr< IReader > &&reader)
 
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
SIV3D_NODISCARD_CXX20 TOMLReader (Reader &&reader)
 
bool open (FilePathView path)
 
bool open (std::unique_ptr< IReader > &&reader)
 
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
bool open (Reader &&reader)
 
void close ()
 
bool isOpen () const noexcept
 
 operator bool () const noexcept
 
- Public Member Functions inherited from s3d::TOMLValue
SIV3D_NODISCARD_CXX20 TOMLValue ()=default
 
SIV3D_NODISCARD_CXX20 TOMLValue (const detail::TOMLValueDetail &)
 
template<class Type >
Type get () const
 
template<class Type , class U >
Type getOr (U &&defaultValue) const
 
template<class Type >
Optional< Type > getOpt () const
 
bool isEmpty () const
 
TOMLValueType getType () const
 
bool isTable () const noexcept
 
bool isArray () const noexcept
 
bool isTableArray () const noexcept
 
bool isString () const noexcept
 
bool isBool () const noexcept
 
bool isNumber () const noexcept
 
bool isDate () const noexcept
 
bool isDateTime () const noexcept
 
bool hasMember (const String &name) const
 
TOMLTableView tableView () const
 
TOMLValue operator[] (const String &path) const
 
size_t arrayCount () const
 
TOMLArrayView arrayView () const
 
TOMLTableArrayView tableArrayView () const
 
String getString () const
 
Date getDate () const
 
DateTime getDateTime () const
 
String format () const
 

Friends

void Formatter (FormatData &formatData, const TOMLReader &reader)
 

Additional Inherited Members

- Protected Member Functions inherited from s3d::TOMLValue
template<class Type , std::enable_if_t< std::is_integral_v< Type > &&!std::is_same_v< bool, std::decay_t< Type >>> * = nullptr>
Optional< Type > getOpt_ () const
 
template<class Type , std::enable_if_t< std::is_floating_point_v< Type >> * = nullptr>
Optional< Type > getOpt_ () const
 
template<class Type , std::enable_if_t<!std::is_arithmetic_v< Type >> * = nullptr>
Optional< Type > getOpt_ () const
 
Optional< StringgetOptString () const
 
Optional< int64getOptInt64 () const
 
Optional< double > getOptDouble () const
 
Optional< bool > getOptBool () const
 
Optional< DategetOptDate () const
 
Optional< DateTimegetOptDateTime () const
 
- Protected Attributes inherited from s3d::TOMLValue
std::shared_ptr< detail::TOMLValueDetail > m_detail
 

Constructor & Destructor Documentation

◆ TOMLReader() [1/4]

SIV3D_NODISCARD_CXX20 s3d::TOMLReader::TOMLReader ( )
default

◆ TOMLReader() [2/4]

SIV3D_NODISCARD_CXX20 s3d::TOMLReader::TOMLReader ( FilePathView  path)
explicit

◆ TOMLReader() [3/4]

SIV3D_NODISCARD_CXX20 s3d::TOMLReader::TOMLReader ( std::unique_ptr< IReader > &&  reader)
explicit

◆ TOMLReader() [4/4]

template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
SIV3D_NODISCARD_CXX20 s3d::TOMLReader::TOMLReader ( Reader &&  reader)
explicit

Member Function Documentation

◆ close()

void s3d::TOMLReader::close ( )

◆ isOpen()

bool s3d::TOMLReader::isOpen ( ) const
noexcept

◆ open() [1/3]

bool s3d::TOMLReader::open ( FilePathView  path)

◆ open() [2/3]

template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
bool s3d::TOMLReader::open ( Reader &&  reader)

◆ open() [3/3]

bool s3d::TOMLReader::open ( std::unique_ptr< IReader > &&  reader)

◆ operator bool()

s3d::TOMLReader::operator bool ( ) const
explicitnoexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const TOMLReader reader 
)
friend

The documentation for this class was generated from the following file: