PoDoFo 1.1.0
Loading...
Searching...
No Matches
InputDevice.h
1// SPDX-FileCopyrightText: 2006 Dominik Seichter <domseichter@web.de>
2// SPDX-FileCopyrightText: 2020 Francesco Pretto <ceztko@gmail.com>
3// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
4
5#ifndef AUX_INPUT_DEVICE_H
6#define AUX_INPUT_DEVICE_H
7
8#include <istream>
9#include <fstream>
10
11#include "StreamDeviceBase.h"
12#include "InputStream.h"
13
14namespace PoDoFo {
15
19class PODOFO_API InputStreamDevice : virtual public StreamDeviceBase, public InputStream
20{
21protected:
23 InputStreamDevice(bool init);
24
25public:
30 bool Peek(char& ch) const;
31
32protected:
36 virtual bool peek(char& ch) const = 0;
37
38 void checkRead() const override;
39};
40
41};
42
43#endif // AUX_INPUT_DEVICE_H
This class represents an input device It optionally supports peeking.
Definition InputDevice.h:20
virtual bool peek(char &ch) const =0
Peek at next char in stream.
An interface for reading blocks of data from a data source.
Definition InputStream.h:18
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:35
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13