Close menu
Start
Download
Getting Started
License
Reference
Jam Build Tool
Class Index
Namespaces
Modules
Pt
›
Documentation
Documentation
›
Get Platinum
≡
Class Index
Namespaces
Modules
include
Pt
System
TarReader.h
1
/* Copyright (C) 2008 Marc Boris Duerner
2
SPDX-License-Identifier: LGPL-2.1-or-later WITH mif-exception
3
*/
4
5
#ifndef PT_SYSTEM_TAR_READER_H
6
#define PT_SYSTEM_TAR_READER_H
7
8
#include <Pt/System/Api.h>
9
#include <Pt/System/TarEntry.h>
10
11
#include <istream>
12
#include <ios>
13
#include <cstddef>
14
15
namespace
Pt
{
16
17
namespace
System
{
18
89
class
PT_SYSTEM_API
TarReader
90
{
91
public
:
92
using
Entry =
TarEntry
;
93
94
public
:
97
TarReader
();
98
101
explicit
TarReader
(std::istream& is);
102
105
~TarReader
();
106
112
void
attach
(std::istream& is);
113
119
void
detach
();
120
123
void
reset
();
124
129
void
reset
(std::istream& is);
130
149
const
TarEntry
*
advance
(std::streamsize importSize = 0);
150
153
bool
isEnd
()
const
;
154
155
private
:
156
TarReader
(
const
TarReader
&);
157
158
TarReader
& operator=(
const
TarReader
&);
159
160
private
:
161
class
TarReaderImpl* _impl;
162
};
163
164
}
// namespace System
165
166
}
// namespace Pt
167
168
#endif
// PT_SYSTEM_TAR_READER_H
Pt::System::TarEntry
One entry in a tar archive.
Definition
TarEntry.h:72
Pt::System::TarReader::TarReader
TarReader(std::istream &is)
Creates a reader that parses is.
Pt::System::TarReader::reset
void reset(std::istream &is)
Clears the parse state and attaches is.
Pt::System::TarReader::~TarReader
~TarReader()
Destructor.
Pt::System::TarReader::advance
const TarEntry * advance(std::streamsize importSize=0)
Parses the next header or delivers the next content chunk.
Pt::System::TarReader::attach
void attach(std::istream &is)
Attaches is as the source.
Pt::System::TarReader::detach
void detach()
Detaches the current source.
Pt::System::TarReader::TarReader
TarReader()
Creates a reader with no stream attached.
Pt::System::TarReader::reset
void reset()
Clears the parse state and detaches the source.
Pt::System::TarReader::isEnd
bool isEnd() const
Returns true after the end-of-archive marker has been read.
Pt::System
System programming
Definition
Connection.h:26
Pt
Core module.
Definition
Allocator.h:33