zypp::parser::yum::PatchFileReader::Impl Class Reference

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

List of all members.

Public Member Functions

 Impl (const Pathname &patch_file, const ProcessPatch &callback)
 CTOR.
bool consumeNode (xml::Reader &reader_r)
 Callback provided to the XML reader.
bool consumeAtomsNode (xml::Reader &reader_r)
 Process atoms node and all of its children.
bool consumePackageNode (xml::Reader &reader_r)
 Process package node and all of its children.
bool consumePatchrpmNode (xml::Reader &reader_r)
 Process patchrpm node and all of its children.
bool consumeDeltarpmNode (xml::Reader &reader_r)
 Process deltarpm node and all of its children.
bool consumeMessageNode (xml::Reader &reader_r)
 Process message node and all of its children.
bool consumeScriptNode (xml::Reader &reader_r)
 Process script node and all of its children.
data::Patch_Ptr handoutPatch ()
 Creates a new data::Patch_Ptr, swaps its contents with _patch and returns it.
void saveAtomInPatch ()
 Creates a new data::ResObject_Ptr, swap its contents with _tmpResObj and inserts it into _patch.atoms.
void copyPackageAtomFromTmpObj (data::Atom_Ptr &atom_ptr) const

Private Attributes

ProcessPatch _callback
 Callback for processing patch metadata passed in through constructor.
data::Patch_Ptr _patch
 Pointer to the zypp::data::Patch object for storing the patch metada (except of depencencies).
data::ResObject_Ptr _tmpResObj
 Pointer to an atom currently being read.
data::PatchRpm_Ptr _patchrpm
 Data object for storing patchrpm data.
data::DeltaRpm_Ptr _deltarpm
 Data object for storing deltarpm data.


Detailed Description

Definition at line 39 of file PatchFileReader.cc.


Constructor & Destructor Documentation

zypp::parser::yum::PatchFileReader::Impl::Impl ( const Pathname &  patch_file,
const ProcessPatch callback 
)

CTOR.

Definition at line 159 of file PatchFileReader.cc.

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


Member Function Documentation

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

Callback provided to the XML reader.

Parameters:
the xml reader object reading the file
Returns:
true to tell the reader to continue, false to tell it to stop
See also:
PrimaryFileReader::consumeNode(xml::Reader)

Definition at line 183 of file PatchFileReader.cc.

References _callback, _patch, zypp::xml::XmlString::asString(), consumeAtomsNode(), zypp::parser::yum::FileReaderBase::BaseImpl::consumeDependency(), handoutPatch(), zypp::parser::yum::FileReaderBase::BaseImpl::isBeingProcessed(), zypp::xml::Reader::nodeText(), zypp::parser::yum::FileReaderBase::BaseImpl::tag(), zypp::parser::yum::FileReaderBase::BaseImpl::tag_atoms, zypp::parser::yum::FileReaderBase::BaseImpl::tag_patch, zypp::parser::yum::FileReaderBase::BaseImpl::toParentTag(), and WAR.

Referenced by Impl().

bool zypp::parser::yum::PatchFileReader::Impl::consumeAtomsNode ( xml::Reader reader_r  ) 

Process atoms node and all of its children.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 308 of file PatchFileReader.cc.

References _tmpResObj, consumeMessageNode(), consumePackageNode(), consumeScriptNode(), zypp::parser::yum::FileReaderBase::BaseImpl::isBeingProcessed(), saveAtomInPatch(), zypp::parser::yum::FileReaderBase::BaseImpl::tag(), zypp::parser::yum::FileReaderBase::BaseImpl::tag_message, zypp::parser::yum::FileReaderBase::BaseImpl::tag_package, zypp::parser::yum::FileReaderBase::BaseImpl::tag_script, and zypp::parser::yum::FileReaderBase::BaseImpl::toParentTag().

Referenced by consumeNode().

bool zypp::parser::yum::PatchFileReader::Impl::consumePackageNode ( xml::Reader reader_r  ) 

Process package node and all of its children.

This method uses FileReaderBase::consumePackageNode(xml::Reader,data::Package_Ptr) method and adds pkgfiles element processing.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 411 of file PatchFileReader.cc.

References _deltarpm, _patchrpm, _tmpResObj, zypp::xml::XmlString::asString(), consumeDeltarpmNode(), zypp::parser::yum::FileReaderBase::BaseImpl::consumePackageNode(), consumePatchrpmNode(), DBG, zypp::ZConfig::instance(), zypp::parser::yum::FileReaderBase::BaseImpl::isBeingProcessed(), zypp::xml::Reader::nodeText(), zypp::ZConfig::systemArchitecture(), zypp::parser::yum::FileReaderBase::BaseImpl::tag(), zypp::parser::yum::FileReaderBase::BaseImpl::tag_deltarpm, zypp::parser::yum::FileReaderBase::BaseImpl::tag_package, zypp::parser::yum::FileReaderBase::BaseImpl::tag_patchrpm, zypp::parser::yum::FileReaderBase::BaseImpl::tag_pkgfiles, zypp::parser::yum::FileReaderBase::BaseImpl::toParentTag(), and ZYPP_THROW.

Referenced by consumeAtomsNode().

bool zypp::parser::yum::PatchFileReader::Impl::consumePatchrpmNode ( xml::Reader reader_r  ) 

Process patchrpm node and all of its children.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 539 of file PatchFileReader.cc.

References _patchrpm, zypp::xml::XmlString::asString(), and zypp::xml::Reader::nodeText().

Referenced by consumePackageNode().

bool zypp::parser::yum::PatchFileReader::Impl::consumeDeltarpmNode ( xml::Reader reader_r  ) 

Process deltarpm node and all of its children.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 615 of file PatchFileReader.cc.

References _deltarpm, zypp::xml::XmlString::asString(), and zypp::xml::Reader::nodeText().

Referenced by consumePackageNode().

bool zypp::parser::yum::PatchFileReader::Impl::consumeMessageNode ( xml::Reader reader_r  ) 

Process message node and all of its children.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 699 of file PatchFileReader.cc.

References _tmpResObj, zypp::xml::XmlString::asString(), zypp::parser::yum::FileReaderBase::BaseImpl::consumeDependency(), and zypp::xml::Reader::nodeText().

Referenced by consumeAtomsNode().

bool zypp::parser::yum::PatchFileReader::Impl::consumeScriptNode ( xml::Reader reader_r  ) 

Process script node and all of its children.

Parameters:
reader_r XML file reader reading the patch file.
Returns:
true if current node has been completely processed, false if additional processing is required outside of the method.

Definition at line 748 of file PatchFileReader.cc.

References _tmpResObj, zypp::xml::XmlString::asString(), zypp::parser::yum::FileReaderBase::BaseImpl::consumeDependency(), zypp::xml::Reader::nodeText(), and WAR.

Referenced by consumeAtomsNode().

data::Patch_Ptr zypp::parser::yum::PatchFileReader::Impl::handoutPatch (  ) 

Creates a new data::Patch_Ptr, swaps its contents with _patch and returns it.

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

Definition at line 847 of file PatchFileReader.cc.

References _patch.

Referenced by consumeNode().

void zypp::parser::yum::PatchFileReader::Impl::saveAtomInPatch (  ) 

Creates a new data::ResObject_Ptr, swap its contents with _tmpResObj and inserts it into _patch.atoms.

Used after an atom is read.

Definition at line 856 of file PatchFileReader.cc.

References _patch, and _tmpResObj.

Referenced by consumeAtomsNode().

void zypp::parser::yum::PatchFileReader::Impl::copyPackageAtomFromTmpObj ( data::Atom_Ptr &  atom_ptr  )  const


Member Data Documentation

ProcessPatch zypp::parser::yum::PatchFileReader::Impl::_callback [private]

Callback for processing patch metadata passed in through constructor.

Definition at line 135 of file PatchFileReader.cc.

Referenced by consumeNode().

data::Patch_Ptr zypp::parser::yum::PatchFileReader::Impl::_patch [private]

Pointer to the zypp::data::Patch object for storing the patch metada (except of depencencies).

Definition at line 141 of file PatchFileReader.cc.

Referenced by consumeNode(), handoutPatch(), and saveAtomInPatch().

data::ResObject_Ptr zypp::parser::yum::PatchFileReader::Impl::_tmpResObj [private]

Pointer to an atom currently being read.

This can be either a data::PackageAtom, data::Message, or data::Script.

See also:
data::Patch::atoms

Definition at line 149 of file PatchFileReader.cc.

Referenced by consumeAtomsNode(), consumeMessageNode(), consumePackageNode(), consumeScriptNode(), and saveAtomInPatch().

data::PatchRpm_Ptr zypp::parser::yum::PatchFileReader::Impl::_patchrpm [private]

Data object for storing patchrpm data.

Definition at line 152 of file PatchFileReader.cc.

Referenced by consumePackageNode(), and consumePatchrpmNode().

data::DeltaRpm_Ptr zypp::parser::yum::PatchFileReader::Impl::_deltarpm [private]

Data object for storing deltarpm data.

Definition at line 155 of file PatchFileReader.cc.

Referenced by consumeDeltarpmNode(), and consumePackageNode().


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