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

#include <TOMLReader.hpp>

Inherited by s3d::TOMLReader.

Classes

struct  Visitor
 

Public Member Functions

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
 

Protected Member Functions

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

std::shared_ptr< detail::TOMLValueDetail > m_detail
 

Friends

void Formatter (FormatData &formatData, const TOMLValue &value)
 

Constructor & Destructor Documentation

◆ TOMLValue() [1/2]

SIV3D_NODISCARD_CXX20 s3d::TOMLValue::TOMLValue ( )
default

◆ TOMLValue() [2/2]

SIV3D_NODISCARD_CXX20 s3d::TOMLValue::TOMLValue ( const detail::TOMLValueDetail &  )
explicit

Member Function Documentation

◆ arrayCount()

size_t s3d::TOMLValue::arrayCount ( ) const

◆ arrayView()

TOMLArrayView s3d::TOMLValue::arrayView ( ) const

◆ format()

String s3d::TOMLValue::format ( ) const

◆ get()

template<class Type >
Type s3d::TOMLValue::get ( ) const

◆ getDate()

Date s3d::TOMLValue::getDate ( ) const

◆ getDateTime()

DateTime s3d::TOMLValue::getDateTime ( ) const

◆ getOpt()

template<class Type >
Optional<Type> s3d::TOMLValue::getOpt ( ) const

◆ getOpt_() [1/3]

template<class Type , std::enable_if_t< std::is_integral_v< Type > &&!std::is_same_v< bool, std::decay_t< Type >>> * = nullptr>
Optional<Type> s3d::TOMLValue::getOpt_ ( ) const
protected

◆ getOpt_() [2/3]

template<class Type , std::enable_if_t< std::is_floating_point_v< Type >> * = nullptr>
Optional<Type> s3d::TOMLValue::getOpt_ ( ) const
protected

◆ getOpt_() [3/3]

template<class Type , std::enable_if_t<!std::is_arithmetic_v< Type >> * = nullptr>
Optional<Type> s3d::TOMLValue::getOpt_ ( ) const
protected

◆ getOptBool()

Optional<bool> s3d::TOMLValue::getOptBool ( ) const
protected

◆ getOptDate()

Optional<Date> s3d::TOMLValue::getOptDate ( ) const
protected

◆ getOptDateTime()

Optional<DateTime> s3d::TOMLValue::getOptDateTime ( ) const
protected

◆ getOptDouble()

Optional<double> s3d::TOMLValue::getOptDouble ( ) const
protected

◆ getOptInt64()

Optional<int64> s3d::TOMLValue::getOptInt64 ( ) const
protected

◆ getOptString()

Optional<String> s3d::TOMLValue::getOptString ( ) const
protected

◆ getOr()

template<class Type , class U >
Type s3d::TOMLValue::getOr ( U &&  defaultValue) const

◆ getString()

String s3d::TOMLValue::getString ( ) const

◆ getType()

TOMLValueType s3d::TOMLValue::getType ( ) const

◆ hasMember()

bool s3d::TOMLValue::hasMember ( const String name) const

◆ isArray()

bool s3d::TOMLValue::isArray ( ) const
noexcept

◆ isBool()

bool s3d::TOMLValue::isBool ( ) const
noexcept

◆ isDate()

bool s3d::TOMLValue::isDate ( ) const
noexcept

◆ isDateTime()

bool s3d::TOMLValue::isDateTime ( ) const
noexcept

◆ isEmpty()

bool s3d::TOMLValue::isEmpty ( ) const

◆ isNumber()

bool s3d::TOMLValue::isNumber ( ) const
noexcept

◆ isString()

bool s3d::TOMLValue::isString ( ) const
noexcept

◆ isTable()

bool s3d::TOMLValue::isTable ( ) const
noexcept

◆ isTableArray()

bool s3d::TOMLValue::isTableArray ( ) const
noexcept

◆ operator[]()

TOMLValue s3d::TOMLValue::operator[] ( const String path) const

◆ tableArrayView()

TOMLTableArrayView s3d::TOMLValue::tableArrayView ( ) const

◆ tableView()

TOMLTableView s3d::TOMLValue::tableView ( ) const

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const TOMLValue value 
)
friend

Member Data Documentation

◆ m_detail

std::shared_ptr<detail::TOMLValueDetail> s3d::TOMLValue::m_detail
protected

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