Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::UniReader Class Referencefinal

Cross-platform file reader, primarily adapted for Windows, supports UTF-8. More...

#include <UniReader.h>

Public Types

using Ptr = std::shared_ptr<UniReader>
 

Public Member Functions

 ~UniReader ()
 
std::string readLine ()
 

Static Public Member Functions

static std::shared_ptr< UniReadercreate (const std::string &fileName) noexcept
 

Private Member Functions

 UniReader ()=default
 

Private Attributes

io::FileStream::Ptr fileStream
 
io::StreamReader::Ptr reader
 

Detailed Description

Cross-platform file reader, primarily adapted for Windows, supports UTF-8.

Deprecated
Please consider using sese::text::TextReader

Member Typedef Documentation

◆ Ptr

using sese::UniReader::Ptr = std::shared_ptr<UniReader>

Constructor & Destructor Documentation

◆ ~UniReader()

sese::UniReader::~UniReader ( )

References fileStream.

◆ UniReader()

sese::UniReader::UniReader ( )
privatedefault

Member Function Documentation

◆ create()

std::shared_ptr< sese::UniReader > sese::UniReader::create ( const std::string & fileName)
staticnoexcept

Opens a file

Parameters
fileNameThe file name
Return values
nullptrIf opening fails

References sese::io::FileStream::create(), MAKE_SHARED_PRIVATE, and sese::io::FileStream::T_READ.

◆ readLine()

std::string sese::UniReader::readLine ( )

Reads a line

Returns
The text read. When string.empty() is true, it indicates no more content to read

Member Data Documentation

◆ fileStream

io::FileStream::Ptr sese::UniReader::fileStream
private

Referenced by ~UniReader().

◆ reader

io::StreamReader::Ptr sese::UniReader::reader
private

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