読み込み用テキストファイル
More...
#include <TextReader.hpp>
|
| SIV3D_NODISCARD_CXX20 | TextReader () |
| | デフォルトコンストラクタ More...
|
| |
| SIV3D_NODISCARD_CXX20 | TextReader (FilePathView path, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルをオープンします。 More...
|
| |
| template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr> |
| SIV3D_NODISCARD_CXX20 | TextReader (Reader &&reader, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルを IReader 経由でオープンします。 More...
|
| |
| SIV3D_NODISCARD_CXX20 | TextReader (std::unique_ptr< IReader > &&reader, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルを IReader 経由でオープンします。 More...
|
| |
| bool | open (FilePathView path, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルをオープンします。 More...
|
| |
| 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, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルを IReader 経由でオープンします。 More...
|
| |
| bool | open (std::unique_ptr< IReader > &&reader, const Optional< TextEncoding > &encoding=unspecified) |
| | テキストファイルを IReader 経由でオープンします。 More...
|
| |
| void | close () |
| | テキストファイルをクローズします。 More...
|
| |
| bool | isOpen () const noexcept |
| | テキストファイルがオープンされているかを返します。 More...
|
| |
| | operator bool () const noexcept |
| | テキストファイルがオープンされているかを返します。 More...
|
| |
| Optional< char32 > | readChar () |
| | テキストファイルから 1 文字読み込みます。 More...
|
| |
| Optional< String > | readLine () |
| | テキストファイルから 1 行読み込みます。 More...
|
| |
| Array< String > | readLines () |
| | テキストファイルのすべての行を読み込みます。 More...
|
| |
| String | readAll () |
| | テキストファイルの内容をすべて読み込みます。 More...
|
| |
| bool | readChar (char32 &ch) |
| | テキストファイルから 1 文字読み込みます。 More...
|
| |
| bool | readLine (String &line) |
| | テキストファイルから 1 行読み込みます。 More...
|
| |
| bool | readLines (Array< String > &lines) |
| | テキストファイルのすべての行を読み込みます。 More...
|
| |
| bool | readAll (String &s) |
| | テキストファイルの内容をすべて読み込みます。 More...
|
| |
| TextEncoding | encoding () const noexcept |
| | テキストのエンコーディング形式を返します。 More...
|
| |
| const FilePath & | path () const noexcept |
| | オープンしているファイルのフルパスを返します。 More...
|
| |
◆ TextReader() [1/4]
| SIV3D_NODISCARD_CXX20 s3d::TextReader::TextReader |
( |
| ) |
|
◆ TextReader() [2/4]
テキストファイルをオープンします。
- Parameters
-
| path | ファイルパス |
| encoding | テキストのエンコーディング形式 |
◆ TextReader() [3/4]
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
テキストファイルを IReader 経由でオープンします。
- Template Parameters
-
- Parameters
-
| reader | IReader オブジェクト |
| encoding | テキストのエンコーディング形式 |
◆ TextReader() [4/4]
テキストファイルを IReader 経由でオープンします。
- Parameters
-
| reader | IReader オブジェクト |
| encoding | テキストのエンコーディング形式 |
◆ close()
| void s3d::TextReader::close |
( |
| ) |
|
◆ encoding()
テキストのエンコーディング形式を返します。
- Returns
- テキストのエンコーディング形式
◆ isOpen()
| bool s3d::TextReader::isOpen |
( |
| ) |
const |
|
noexcept |
テキストファイルがオープンされているかを返します。
- Returns
- ファイルがオープンされている場合 true, それ以外の場合は false
◆ open() [1/3]
テキストファイルをオープンします。
- Parameters
-
| path | ファイルパス |
| encoding | テキストのエンコーディング形式 |
- Returns
- ファイルのオープンに成功した場合 true, それ以外の場合は false
◆ open() [2/3]
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
テキストファイルを IReader 経由でオープンします。
- Template Parameters
-
- Parameters
-
| reader | IReader オブジェクト |
| encoding | テキストのエンコーディング形式 |
- Returns
- ファイルのオープンに成功した場合 true, それ以外の場合は false
◆ open() [3/3]
テキストファイルを IReader 経由でオープンします。
- Parameters
-
| reader | IReader オブジェクト |
| encoding | テキストのエンコーディング形式 |
- Returns
- ファイルのオープンに成功した場合 true, それ以外の場合は false
◆ operator bool()
| s3d::TextReader::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
テキストファイルがオープンされているかを返します。
- Returns
- ファイルがオープンされている場合 true, それ以外の場合は false
◆ path()
| const FilePath& s3d::TextReader::path |
( |
| ) |
const |
|
noexcept |
オープンしているファイルのフルパスを返します。
- Returns
- ファイルがオープンしている場合、ファイルのフルパス。それ以外の場合は空の文字列。
◆ readAll() [1/2]
| String s3d::TextReader::readAll |
( |
| ) |
|
テキストファイルの内容をすべて読み込みます。
- Returns
- 読み込んだ文字列
◆ readAll() [2/2]
| bool s3d::TextReader::readAll |
( |
String & |
s | ) |
|
テキストファイルの内容をすべて読み込みます。
- Parameters
-
- Returns
- 読み込みに成功した場合 true, ファイルの終端や失敗の場合は false
◆ readChar() [1/2]
テキストファイルから 1 文字読み込みます。
- Returns
- 読み込みに成功した場合はその文字の Optional, ファイルの終端や失敗の場合は none
◆ readChar() [2/2]
| bool s3d::TextReader::readChar |
( |
char32 & |
ch | ) |
|
テキストファイルから 1 文字読み込みます。
- Parameters
-
- Returns
- 読み込みに成功した場合 true, ファイルの終端や失敗の場合は false
◆ readLine() [1/2]
テキストファイルから 1 行読み込みます。
- Returns
- 読み込みに成功した場合はその文字列の Optional, ファイルの終端や失敗の場合は none
◆ readLine() [2/2]
| bool s3d::TextReader::readLine |
( |
String & |
line | ) |
|
テキストファイルから 1 行読み込みます。
- Parameters
-
- Returns
- 読み込みに成功した場合 true, ファイルの終端や失敗の場合は false
◆ readLines() [1/2]
テキストファイルのすべての行を読み込みます。
- Returns
- 読み込んだすべての行
◆ readLines() [2/2]
| bool s3d::TextReader::readLines |
( |
Array< String > & |
lines | ) |
|
テキストファイルのすべての行を読み込みます。
- Parameters
-
- Returns
- 読み込みに成功した場合 true, ファイルの終端や失敗の場合は false
The documentation for this class was generated from the following file: