cpp-mate  0.7
Helpful library for C++.
CppMate::FileReader Class Referenceabstract

Represents fast file reader with platform-dependent implementation. More...

#include <FileReader.hpp>

Inheritance diagram for CppMate::FileReader:
Collaboration diagram for CppMate::FileReader:

Public Member Functions

virtual std::string getFilename () const =0
 Returns name of file. More...
 
- Public Member Functions inherited from CppMate::BinaryData
virtual ~BinaryData ()=default
 
virtual const uint8_t * getData () const =0
 Returns address of data. More...
 
virtual uint64_t getSize () const =0
 Returns size of data in bytes. More...
 
bool hasData () const
 Returns status of a data presence. More...
 
bool operator== (const BinaryData &other) const
 operator == More...
 
bool operator!= (const BinaryData &other) const
 operator != More...
 

Static Public Member Functions

static std::shared_ptr< FileReaderread (const std::string &filename)
 Reads file. More...
 

Detailed Description

Represents fast file reader with platform-dependent implementation.

Member Function Documentation

◆ getFilename()

virtual std::string CppMate::FileReader::getFilename ( ) const
pure virtual

Returns name of file.

Returns
the name of file.

◆ read()

static std::shared_ptr<FileReader> CppMate::FileReader::read ( const std::string &  filename)
static

Reads file.

Parameters
filenamename of the file.
Returns
instance of file reader.
Exceptions
std::ifstream::failure,std::bad_alloc

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