zypp::parser::susetags::ContentFileReader Class Reference

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

#include <ContentFileReader.h>

Inheritance diagram for zypp::parser::susetags::ContentFileReader:
[legend]

List of all members.

Classes

struct  Impl
 ContentFileReader implementation. More...

Public Types

typedef function< void(const
RepoIndex_Ptr &)> 
RepoIndexConsumer

Public Member Functions

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

Protected Member Functions

virtual void beginParse ()
 Called when start parsing.
virtual void endParse ()
 Called when the parse is done.
virtual void userRequestedAbort (unsigned lineNo_r)
 Called when user(callback) request to abort.
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.

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

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

Definition at line 48 of file ContentFileReader.h.


Constructor & Destructor Documentation

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

Default ctor.

Definition at line 104 of file ContentFileReader.cc.

zypp::parser::susetags::ContentFileReader::~ContentFileReader (  )  [virtual]

Dtor.

Definition at line 112 of file ContentFileReader.cc.


Member Function Documentation

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

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

Consumer to call when repo index was parsed.

Definition at line 66 of file ContentFileReader.h.

References _repoIndexConsumer.

Referenced by zypp::repo::susetags::Downloader::download().

void zypp::parser::susetags::ContentFileReader::beginParse (  )  [protected, virtual]

Called when start parsing.

Definition at line 120 of file ContentFileReader.cc.

References _pimpl, and zypp::RW_pointer< _D, _Traits >::reset().

Referenced by parse().

void zypp::parser::susetags::ContentFileReader::endParse (  )  [protected, virtual]

Called when the parse is done.

Definition at line 133 of file ContentFileReader.cc.

References _pimpl, _repoIndexConsumer, MIL, and zypp::RW_pointer< _D, _Traits >::reset().

Referenced by parse().

void zypp::parser::susetags::ContentFileReader::userRequestedAbort ( unsigned  lineNo_r  )  [protected, virtual]

Called when user(callback) request to abort.

Exceptions:
AbortRequestException unless overloaded.

Definition at line 151 of file ContentFileReader.cc.

References errPrefix(), and ZYPP_THROW.

Referenced by parse().

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

Prefix exception message with line information.

Definition at line 161 of file ContentFileReader.cc.

References _pimpl, and zypp::str::form().

Referenced by parse(), and userRequestedAbort().


Member Data Documentation

Definition at line 88 of file ContentFileReader.h.

Referenced by beginParse(), endParse(), errPrefix(), and parse().

Definition at line 90 of file ContentFileReader.h.

Referenced by endParse(), and setRepoIndexConsumer().


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

doxygen