PoDoFo 1.2.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
18class PODOFO_API InputStreamDevice : virtual public StreamDeviceBase, public InputStream
19{
20protected:
22 InputStreamDevice(bool init);
23
24public:
28 bool Peek(char& ch) const;
29
30protected:
33 virtual bool peek(char& ch) const = 0;
34
35 void checkRead() const override;
36};
37
38};
39
40#endif // AUX_INPUT_DEVICE_H
This class represents an input device It optionally supports peeking.
Definition InputDevice.h:19
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:17
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13