libzypp: zypp/parser/RepoFileReader.h Source File

libzypp 17.38.14

RepoFileReader.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_REPO_REPOFILEREADER_H
13#define ZYPP_REPO_REPOFILEREADER_H
14
15#include <iosfwd>
16
17#include <zypp-core/base/PtrTypes.h>
18#include <zypp-core/base/InputStream>
19#include <zypp/RepoInfo.h>
20#include <zypp-core/ui/ProgressData>
21
23namespace zypp
24{
26 namespace parser
27 {
28
51 class RepoFileReader
52 {
53 friend std::ostream & operator<<( std::ostream & str, const RepoFileReader & obj );
54 public:
55
64 using ProcessRepo = function<bool (const RepoInfo &)>;
65
67 class Impl;
68
69 public:
81 RepoFileReader( const Pathname & repo_file,
82 ProcessRepo callback,
83 const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() );
84
96 RepoFileReader( const InputStream &is,
97 ProcessRepo callback,
98 const ProgressData::ReceiverFnc &progress = ProgressData::ReceiverFnc() );
99
103 ~RepoFileReader();
104 private:
105 ProcessRepo _callback;
106 };
107
108
110 std::ostream & operator<<( std::ostream & str, const RepoFileReader & obj );
111
113 } // namespace parser
116} // namespace zypp
118#endif // ZYPP_REPO_REPOFILEREADER_H
PtrTypes.h
RepoInfo.h
Impl
bool
zypp::InputStream
Helper to create and pass std::istream.
Definition inputstream.h:57
zypp::ProgressData::ReceiverFnc
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
Definition progressdata.h:140
zypp::RepoInfo
What is known about a repository.
Definition RepoInfo.h:72
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::parser::RepoFileReader
Read repository data from a .repo file.
Definition RepoFileReader.h:52
zypp::parser::RepoFileReader::operator<<
friend std::ostream & operator<<(std::ostream &str, const RepoFileReader &obj)
relates: RepoFileReader Stream output
Definition RepoFileReader.cc:269
zypp::parser::RepoFileReader::ProcessRepo
function< bool(const RepoInfo &)> ProcessRepo
Callback definition.
Definition RepoFileReader.h:64
zypp::parser::RepoFileReader::RepoFileReader
RepoFileReader(const Pathname &repo_file, ProcessRepo callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Constructor.
Definition RepoFileReader.cc:249
zypp::parser::RepoFileReader::~RepoFileReader
~RepoFileReader()
Dtor.
Definition RepoFileReader.cc:265
zypp::parser::RepoFileReader::_callback
ProcessRepo _callback
Definition RepoFileReader.h:105
str
String related utilities and Regular expression matching.
zypp::callback
Callbacks light.
Definition Callback.h:146
zypp::parser
Definition HistoryLogReader.cc:30
zypp::parser::operator<<
std::ostream & operator<<(std::ostream &str, const ProductFileData &obj)
relates: ProductFileData Stream output
Definition ProductFileReader.cc:107
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2