MiKTeX 26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
Stream.h
1/* miktex/Core/Stream.h: -*- C++ -*-
2
3 Copyright (C) 1996-2018 Christian Schenk
4
5 This file is part of the MiKTeX Core Library.
6
7 The MiKTeX Core Library is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2, or
10 (at your option) any later version.
11
12 The MiKTeX Core Library is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with the MiKTeX Core Library; if not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22#pragma once
23
24#if !defined(A5C8AD7AABA6476FA2A563F6C670BC2F)
25#define A5C8AD7AABA6476FA2A563F6C670BC2F
26
27#include <miktex/Core/config.h>
28
29#include <cstddef>
30
31MIKTEX_CORE_BEGIN_NAMESPACE;
32
33enum class SeekOrigin
34{
35 Begin,
36 Current,
37 End,
38};
39
40class MIKTEXNOVTABLE Stream
41{
42public:
43 virtual MIKTEXTHISCALL ~Stream() noexcept = 0;
44
45public:
46 virtual std::size_t MIKTEXTHISCALL Read(void* data, std::size_t count) = 0;
47
48public:
49 virtual void MIKTEXTHISCALL Write(const void* data, std::size_t count) = 0;
50
51public:
52 virtual void MIKTEXTHISCALL Seek(long offset, SeekOrigin origin) = 0;
53
54public:
55 virtual long MIKTEXTHISCALL GetPosition() const = 0;
56};
57
58MIKTEX_CORE_END_NAMESPACE;
59
60#endif
Definition Stream.h:41