PLaSK library
Loading...
Searching...
No Matches
plask::XMLReader::CFileDataSource Struct Reference

Allows to read XML from old C FILE. More...

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

Inheritance diagram for plask::XMLReader::CFileDataSource:
[legend]
Collaboration diagram for plask::XMLReader::CFileDataSource:
[legend]

Public Member Functions

 CFileDataSource (FILE *desc)
 
 ~CFileDataSource ()
 
std::size_t read (char *buff, std::size_t buf_size) override
 Read buf_size bytes of data and store it in buffer buff.
 
- Public Member Functions inherited from plask::XMLReader::DataSource
virtual ~DataSource ()
 Empty, virtual destructor.
 

Public Attributes

FILEdesc
 Stream to read from.
 

Detailed Description

Allows to read XML from old C FILE.

Definition at line 166 of file reader.hpp.

Constructor & Destructor Documentation

◆ CFileDataSource()

plask::XMLReader::CFileDataSource::CFileDataSource ( FILE desc)
inline
Parameters
descstream to read from

Definition at line 174 of file reader.hpp.

◆ ~CFileDataSource()

plask::XMLReader::CFileDataSource::~CFileDataSource ( )
inline

Definition at line 176 of file reader.hpp.

Member Function Documentation

◆ read()

std::size_t plask::XMLReader::CFileDataSource::read ( char buff,
std::size_t  buf_size 
)
overridevirtual

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

Implements plask::XMLReader::DataSource.

Definition at line 30 of file reader.cpp.

Member Data Documentation

◆ desc

FILE* plask::XMLReader::CFileDataSource::desc

Stream to read from.

Definition at line 169 of file reader.hpp.


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