PLaSK library
Loading...
Searching...
No Matches
plask::XMLReader::DataSource Struct Referenceabstract

Base class to source of data. More...

#include <plask/utils/xml/reader.hpp>

Inheritance diagram for plask::XMLReader::DataSource:
[legend]

Public Member Functions

virtual std::size_t read (char *buff, std::size_t buf_size)=0
 Read buf_size bytes of data and store it in buffer buff.
 
virtual ~DataSource ()
 Empty, virtual destructor.
 

Detailed Description

Base class to source of data.

Definition at line 133 of file reader.hpp.

Constructor & Destructor Documentation

◆ ~DataSource()

virtual plask::XMLReader::DataSource::~DataSource ( )
inlinevirtual

Empty, virtual destructor.

Definition at line 146 of file reader.hpp.

Member Function Documentation

◆ read()

virtual std::size_t plask::XMLReader::DataSource::read ( char buff,
std::size_t  buf_size 
)
pure virtual

Read buf_size bytes of data and store it in buffer buff.

Throws exception if can't read.

Parameters
buffdestination buffer
buf_sizesize of buff
Returns
number of bytes read, less than buf_size only at the end of data

Implemented in plask::XMLReader::StreamDataSource, and plask::XMLReader::CFileDataSource.


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