zypp::parser::yum::PrimaryFileReader::Impl Class Reference

Inheritance diagram for zypp::parser::yum::PrimaryFileReader::Impl:
[legend]

List of all members.

Public Member Functions

 Impl (const Pathname &primary_file, const ProcessPackage &callback, const ProgressData::ReceiverFnc &progress)
 CTOR.
bool consumeNode (xml::Reader &reader_r)
 Callback provided to the XML reader.

Private Member Functions

data::Packagebase_Ptr handoutPackage ()
 Creates a new data::Package_Ptr, swaps its contents with _package and returns it.

Private Attributes

ProcessPackage _callback
 Callback for processing package metadata passed in through constructor.
data::Packagebase_Ptr _package
 zypp::data::Packagebase object for storing the package metada.
ProgressData _ticks
 Progress reporting object.
Arch _sysarch
 system architecture, to filter out incompatible packages


Detailed Description

Definition at line 40 of file PrimaryFileReader.cc.


Constructor & Destructor Documentation

zypp::parser::yum::PrimaryFileReader::Impl::Impl ( const Pathname &  primary_file,
const ProcessPackage callback,
const ProgressData::ReceiverFnc progress 
)

CTOR.

Definition at line 100 of file PrimaryFileReader.cc.

References _ticks, consumeNode(), zypp::xml::Reader::foreachNode(), MIL, and zypp::ProgressData::sendTo().


Member Function Documentation

bool zypp::parser::yum::PrimaryFileReader::Impl::consumeNode ( xml::Reader reader_r  ) 

Callback provided to the XML reader.

This is the main parsing method which gets envoked by the xml::Reader to process each node, one at a time. It is responsible for parsing the node and calling all other consume* methods.

Parameters:
the xml reader object reading the file
Returns:
true to tell the reader to continue, false to tell it to stop
Exceptions:
AbortRequestException if user request for aborting the parsing has been received through progress reporting callback.
Note:
Semantics of this method's return value also differs from other consume* methods. While this method's return value tells the the xml reader to continue or stop, return value of the rest tells their callers if further

Definition at line 117 of file PrimaryFileReader.cc.

References _callback, _package, _sysarch, _ticks, zypp::parser::yum::FileReaderBase::BaseImpl::consumePackageNode(), handoutPackage(), zypp::ProgressData::incr(), zypp::parser::yum::FileReaderBase::BaseImpl::isBeingProcessed(), zypp::ProgressData::range(), zypp::str::strtonum(), zypp::parser::yum::FileReaderBase::BaseImpl::tag(), zypp::parser::yum::FileReaderBase::BaseImpl::tag_package, zypp::ProgressData::toMax(), zypp::ProgressData::toMin(), zypp::parser::yum::FileReaderBase::BaseImpl::toParentTag(), and ZYPP_THROW.

Referenced by Impl().

data::Packagebase_Ptr zypp::parser::yum::PrimaryFileReader::Impl::handoutPackage (  )  [private]

Creates a new data::Package_Ptr, swaps its contents with _package and returns it.

Used to hand-out the data object to its consumer (a ProcessPackage function) after it has been read.

Definition at line 177 of file PrimaryFileReader.cc.

References _package.

Referenced by consumeNode().


Member Data Documentation

ProcessPackage zypp::parser::yum::PrimaryFileReader::Impl::_callback [private]

Callback for processing package metadata passed in through constructor.

Definition at line 79 of file PrimaryFileReader.cc.

Referenced by consumeNode().

data::Packagebase_Ptr zypp::parser::yum::PrimaryFileReader::Impl::_package [private]

zypp::data::Packagebase object for storing the package metada.

This can be either a data::Package or data::SrcPackage

Definition at line 85 of file PrimaryFileReader.cc.

Referenced by consumeNode(), and handoutPackage().

ProgressData zypp::parser::yum::PrimaryFileReader::Impl::_ticks [private]

Progress reporting object.

Definition at line 90 of file PrimaryFileReader.cc.

Referenced by consumeNode(), and Impl().

Arch zypp::parser::yum::PrimaryFileReader::Impl::_sysarch [private]

system architecture, to filter out incompatible packages

Definition at line 95 of file PrimaryFileReader.cc.

Referenced by consumeNode().


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 19:23:24 2007 for libzypp by  doxygen 1.5.3