![]() |
OpenSiv3D
v0.6.5
C++20 framework for creative coding
|
#include <INI.hpp>
Public Types | |
| using | Section = String |
| using | SectionView = StringView |
| using | Name = String |
| using | NameView = StringView |
| using | Section_Dot_Name = String |
| using | Section_Dot_NameView = StringView |
| using | Value = String |
| using | SectionIndex = size_t |
| using | KeyIndex = size_t |
Public Member Functions | |
| INI () | |
| INI (FilePathView path, const Optional< TextEncoding > &encoding=unspecified) | |
| template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr> | |
| INI (Reader &&reader, const Optional< TextEncoding > &encoding=unspecified) | |
| INI (std::unique_ptr< IReader > &&reader, const Optional< TextEncoding > &encoding=unspecified) | |
| bool | load (FilePathView path, const Optional< TextEncoding > &encoding=unspecified) |
| template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr> | |
| bool | load (Reader &&reader, const Optional< TextEncoding > &encoding=unspecified) |
| bool | load (std::unique_ptr< IReader > &&reader, const Optional< TextEncoding > &encoding=unspecified) |
| void | clear () |
| bool | isEmpty () const noexcept |
| operator bool () const noexcept | |
| const Array< INISection > & | sections () const noexcept |
| bool | hasSection (SectionView section) const |
| const INISection & | getSection (SectionView section) const |
| bool | hasValue (SectionView section, NameView name) const |
| const String & | getValue (SectionView section, NameView name) const |
| bool | hasGlobalValue (NameView name) const |
| const String & | getGlobalValue (NameView name) const |
| const Value & | operator[] (Section_Dot_NameView section_dot_name) const |
| INIValueWrapper | operator[] (Section_Dot_NameView section_dot_name) |
| template<class Type > | |
| Type | get (SectionView section, NameView name) const |
| template<class Type > | |
| Type | get (Section_Dot_NameView section_dot_name) const |
| template<class Type , class U > | |
| Type | getOr (SectionView section, NameView name, U &&defaultValue) const |
| template<class Type , class U > | |
| Type | getOr (Section_Dot_NameView section_dot_name, U &&defaultValue) const |
| template<class Type > | |
| Optional< Type > | getOpt (SectionView section, NameView name) const |
| template<class Type > | |
| Optional< Type > | getOpt (Section_Dot_NameView section_dot_name) const |
| void | addSection (SectionView section) |
| void | removeSection (SectionView section) |
| void | write (SectionView section, NameView name, const Value &value) |
| template<class Type > | |
| void | write (SectionView section, NameView name, const Type &value) |
| void | writeGlobal (NameView name, const Value &value) |
| template<class Type > | |
| void | writeGlobal (NameView name, const Type &value) |
| bool | save (FilePathView path) const |
INI 形式のデータの読み書き
| using s3d::INI::KeyIndex = size_t |
| using s3d::INI::Name = String |
| using s3d::INI::NameView = StringView |
| using s3d::INI::Section = String |
| using s3d::INI::Section_Dot_Name = String |
| using s3d::INI::SectionIndex = size_t |
| using s3d::INI::SectionView = StringView |
| using s3d::INI::Value = String |
| s3d::INI::INI | ( | ) |
|
explicit |
|
explicit |
|
explicit |
| void s3d::INI::addSection | ( | SectionView | section | ) |
| void s3d::INI::clear | ( | ) |
| Type s3d::INI::get | ( | Section_Dot_NameView | section_dot_name | ) | const |
| Type s3d::INI::get | ( | SectionView | section, |
| NameView | name | ||
| ) | const |
| Optional<Type> s3d::INI::getOpt | ( | Section_Dot_NameView | section_dot_name | ) | const |
| Optional<Type> s3d::INI::getOpt | ( | SectionView | section, |
| NameView | name | ||
| ) | const |
| Type s3d::INI::getOr | ( | Section_Dot_NameView | section_dot_name, |
| U && | defaultValue | ||
| ) | const |
| Type s3d::INI::getOr | ( | SectionView | section, |
| NameView | name, | ||
| U && | defaultValue | ||
| ) | const |
| const INISection& s3d::INI::getSection | ( | SectionView | section | ) | const |
| const String& s3d::INI::getValue | ( | SectionView | section, |
| NameView | name | ||
| ) | const |
| bool s3d::INI::hasGlobalValue | ( | NameView | name | ) | const |
| bool s3d::INI::hasSection | ( | SectionView | section | ) | const |
| bool s3d::INI::hasValue | ( | SectionView | section, |
| NameView | name | ||
| ) | const |
|
noexcept |
| bool s3d::INI::load | ( | FilePathView | path, |
| const Optional< TextEncoding > & | encoding = unspecified |
||
| ) |
| bool s3d::INI::load | ( | Reader && | reader, |
| const Optional< TextEncoding > & | encoding = unspecified |
||
| ) |
| bool s3d::INI::load | ( | std::unique_ptr< IReader > && | reader, |
| const Optional< TextEncoding > & | encoding = unspecified |
||
| ) |
|
explicitnoexcept |
| INIValueWrapper s3d::INI::operator[] | ( | Section_Dot_NameView | section_dot_name | ) |
| const Value& s3d::INI::operator[] | ( | Section_Dot_NameView | section_dot_name | ) | const |
| void s3d::INI::removeSection | ( | SectionView | section | ) |
| bool s3d::INI::save | ( | FilePathView | path | ) | const |
|
noexcept |
| void s3d::INI::write | ( | SectionView | section, |
| NameView | name, | ||
| const Type & | value | ||
| ) |
| void s3d::INI::write | ( | SectionView | section, |
| NameView | name, | ||
| const Value & | value | ||
| ) |
| void s3d::INI::writeGlobal | ( | NameView | name, |
| const Type & | value | ||
| ) |