libzypp  17.14.0
zypp::parser::susetags::ContentFileReader Class Reference

Parse repoindex part from a content file. More...

#include <ContentFileReader.h>

Inheritance diagram for zypp::parser::susetags::ContentFileReader:


struct  Impl
 ContentFileReader implementation. More...

Public Types

typedef function< void(const RepoIndex_Ptr &)> RepoIndexConsumer

Public Member Functions

 ContentFileReader ()
 Default ctor. More...
virtual ~ContentFileReader ()
 Dtor. More...
virtual void parse (const InputStream &imput_r, const ProgressData::ReceiverFnc &fnc_r=ProgressData::ReceiverFnc())
 Parse the stream. More...
void setRepoIndexConsumer (const RepoIndexConsumer &fnc_r)
 Consumer to call when repo index was parsed. More...

Protected Member Functions

virtual void beginParse ()
 Called when start parsing. More...
virtual void endParse ()
 Called when the parse is done. More...
virtual void userRequestedAbort (unsigned lineNo_r)
 Called when user(callback) request to abort. More...
std::string errPrefix (unsigned lineNo_r, const std::string &msg_r=std::string(), const std::string &line_r="-") const
 Prefix exception message with line information. More...

Private Attributes

RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
RepoIndexConsumer _repoIndexConsumer

Detailed Description

Parse repoindex part from a content file.

This is all the downloader needs.

Definition at line 45 of file ContentFileReader.h.

Member Typedef Documentation

◆ RepoIndexConsumer

typedef function<void(const RepoIndex_Ptr &)> zypp::parser::susetags::ContentFileReader::RepoIndexConsumer

Definition at line 48 of file ContentFileReader.h.

Constructor & Destructor Documentation

◆ ContentFileReader()

zypp::parser::susetags::ContentFileReader::ContentFileReader ( )

Default ctor.

Definition at line 102 of file

◆ ~ContentFileReader()

zypp::parser::susetags::ContentFileReader::~ContentFileReader ( )


Definition at line 110 of file

Member Function Documentation

◆ parse()

void zypp::parser::susetags::ContentFileReader::parse ( const InputStream imput_r,
const ProgressData::ReceiverFnc fnc_r = ProgressData::ReceiverFnc() 

Parse the stream.

ParseExceptionon errors.
AbortRequestExceptionon user request. Invokes consume for each tag. consume might throw other exceptions as well.

Definition at line 175 of file

◆ setRepoIndexConsumer()

void zypp::parser::susetags::ContentFileReader::setRepoIndexConsumer ( const RepoIndexConsumer fnc_r)

Consumer to call when repo index was parsed.

Definition at line 66 of file ContentFileReader.h.

◆ beginParse()

void zypp::parser::susetags::ContentFileReader::beginParse ( )

Called when start parsing.

Definition at line 118 of file

◆ endParse()

void zypp::parser::susetags::ContentFileReader::endParse ( )

Called when the parse is done.

Definition at line 131 of file

◆ userRequestedAbort()

void zypp::parser::susetags::ContentFileReader::userRequestedAbort ( unsigned  lineNo_r)

Called when user(callback) request to abort.

AbortRequestExceptionunless overloaded.

Definition at line 149 of file

◆ errPrefix()

std::string zypp::parser::susetags::ContentFileReader::errPrefix ( unsigned  lineNo_r,
const std::string &  msg_r = std::string(),
const std::string &  line_r = "-" 
) const

Prefix exception message with line information.

Definition at line 159 of file

Member Data Documentation

◆ _pimpl

RW_pointer<Impl,rw_pointer::Scoped<Impl> > zypp::parser::susetags::ContentFileReader::_pimpl

Definition at line 88 of file ContentFileReader.h.

◆ _repoIndexConsumer

RepoIndexConsumer zypp::parser::susetags::ContentFileReader::_repoIndexConsumer

Definition at line 90 of file ContentFileReader.h.

The documentation for this class was generated from the following files: