PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
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
FILE * | desc
| 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

  desc | stream 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
| ) |  |
| override virtual

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

Throws exception if can't read.

Parameters

  buff | destination buffer
  buf_size | size 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:

- plask/utils/xml/reader.hpp
- plask/utils/xml/reader.cpp