namespace
{ /////////////////////////////////////////////////////////////////
- typedef zypp::capability::CapabilityImplPtr CapabilityImplPtr;
+ typedef zypp::capability::CapabilityImpl_Ptr CapabilityImpl_Ptr;
/** \todo check set ordering to assert no dups */
- struct USetOrder : public std::binary_function<CapabilityImplPtr, CapabilityImplPtr, bool>
+ struct USetOrder : public std::binary_function<CapabilityImpl_Ptr, CapabilityImpl_Ptr, bool>
{
- bool operator()( const CapabilityImplPtr & lhs,
- const CapabilityImplPtr & rhs ) const
+ bool operator()( const CapabilityImpl_Ptr & lhs,
+ const CapabilityImpl_Ptr & rhs ) const
{ return lhs->asString() < rhs->asString(); }
};
- typedef std::set<CapabilityImplPtr,USetOrder> USet;
+ typedef std::set<CapabilityImpl_Ptr,USetOrder> USet;
USet _uset;
// fix it!
if ( strval_r.empty() )
throw "no Resolvable::Kind";
- CapabilityImplPtr newcap( new capability::NamedCap( defaultRefers_r, strval_r ) );
+ CapabilityImpl_Ptr newcap( new capability::NamedCap( defaultRefers_r, strval_r ) );
USet::iterator in( _uset.insert( newcap ).first );
return Capability( *in );
}
Rel op_r,
const Edition & edition_r ) const
{
- CapabilityImplPtr newcap( new capability::NamedCap( refers_r, name_r ) );
+ CapabilityImpl_Ptr newcap( new capability::NamedCap( refers_r, name_r ) );
USet::iterator in( _uset.insert( newcap ).first );
return Capability( *in );
}
/** Implementation */
struct Impl;
/** Pointer to implementation */
- base::ImplPtr<Impl> _pimpl;
+ base::RW_pointer<Impl> _pimpl;
};
///////////////////////////////////////////////////////////////////
// METHOD NAME : Capability::Capability
// METHOD TYPE : Ctor
//
- Capability::Capability( ImplPtr impl_r )
+ Capability::Capability( Impl_Ptr impl_r )
: _pimpl( impl_r )
{}
private:
typedef capability::CapabilityImpl Impl;
- typedef capability::CapabilityImpl_Ptr ImplPtr ;
- typedef capability::CapabilityImpl_constPtr ImplconstPtr;
+ typedef capability::CapabilityImpl_Ptr Impl_Ptr ;
+ typedef capability::CapabilityImpl_constPtr Impl_constPtr;
/** Factory ctor */
explicit
- Capability( ImplPtr impl_r );
+ Capability( Impl_Ptr impl_r );
public:
/** Factory */
typedef CapFactory Factory;
private:
/** Pointer to implementation */
- base::ImplPtr<Impl,ImplPtr> _pimpl;
+ base::RW_pointer<Impl,Impl_Ptr> _pimpl;
};
///////////////////////////////////////////////////////////////////
/** */
CapSet _freshens;
- static DependenciesImplPtr nodeps()
+ static DependenciesImpl_Ptr nodeps()
{
if ( !_nodeps ) { _nodeps = new DependenciesImpl; _nodeps->ref(); }
return _nodeps;
}
private:
- static DependenciesImplPtr _nodeps;
+ static DependenciesImpl_Ptr _nodeps;
};
///////////////////////////////////////////////////////////////////
IMPL_PTR_TYPE(DependenciesImpl)
#define ZYPP_DEPENDENCIES_COW \
if(_pimpl->refCount()>1) \
{ \
- detail::DependenciesImplPtr _cow_tmp = new detail::DependenciesImpl; \
+ detail::DependenciesImpl_Ptr _cow_tmp = new detail::DependenciesImpl; \
_cow_tmp->_provides = _pimpl->_provides; \
_cow_tmp->_prerequires = _pimpl->_prerequires; \
_cow_tmp->_requires = _pimpl->_requires; \
/** Hides implementation */
struct Impl;
/** Pointer to implementation */
- base::ImplPtr<Impl> _pimpl;
+ base::RW_pointer<Impl> _pimpl;
};
///////////////////////////////////////////////////////////////////
{
/** \name Relational operators
* These are the \em real relational operator contants to
- * use. Don't mind that it's not an enum. See also: \ref inSwitch
+ * use. Don't mind that it's not an enum. See also: \ref zypp::Rel::inSwitch
*/
//@{
static const Rel EQ;
/** Implementation */
struct Impl;
/** Pointer to implementation */
- base::ImplPtr<Impl> _pimpl;
+ base::RW_pointer<Impl> _pimpl;
};
///////////////////////////////////////////////////////////////////
// METHOD NAME : SolverContext::SolverContext
// METHOD TYPE : Ctor
//
- SolverContext::SolverContext( detail::SolverContextImplPtr impl_r )
+ SolverContext::SolverContext( detail::SolverContextImpl_Ptr impl_r )
: _pimpl( impl_r )
{}
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : SolverContext::sayFriend
- // METHOD TYPE : detail::constSolverContextImplPtr
+ // METHOD TYPE : detail::constSolverContextImpl_Ptr
//
- detail::constSolverContextImplPtr SolverContext::sayFriend() const
+ detail::SolverContextImpl_constPtr SolverContext::sayFriend() const
{ return _pimpl; }
/******************************************************************
SolverContext();
/** Factory ctor */
explicit
- SolverContext( detail::SolverContextImplPtr impl_r );
+ SolverContext( detail::SolverContextImpl_Ptr impl_r );
/** Dtor */
~SolverContext();
private:
/** Pointer to implementation */
- detail::SolverContextImplPtr _pimpl;
+ detail::SolverContextImpl_Ptr _pimpl;
public:
/** Avoid a bunch of friend decl. */
- detail::constSolverContextImplPtr sayFriend() const;
+ detail::SolverContextImpl_constPtr sayFriend() const;
};
///////////////////////////////////////////////////////////////////
* \li \c shared_ptr Object ownership shared among multiple pointers
*
* \li \c weak_ptr Non-owning observers of an object owned by shared_ptr.
+ *
+ * And \ref zypp::base::RW_pointer, as wrapper around a smart pointer,
+ * poviding \c const correct read/write access to the object it refers.
*/
/*@{*/
/** Use boost::intrusive_ptr as Ptr type*/
using boost::intrusive_ptr;
+
using boost::static_pointer_cast;
using boost::const_pointer_cast;
using boost::dynamic_pointer_cast;
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : ImplPtr
+ // CLASS NAME : RW_pointer
//
/** Wrapper for \c const correct access via \ref ZYPP_BASE_SMART_PTR.
*
- * zypp::base::ImplPtr<tt>\<_D,_Ptr></tt> stores a \ref ZYPP_BASE_SMART_PTR
+ * zypp::base::RW_pointer<tt>\<_D,_Ptr></tt> stores a \ref ZYPP_BASE_SMART_PTR
* of type \c _Ptr, which must be convertible into a <tt>_D *</tt>. Pointer
* style access (via \c -> and \c *) offers a <tt>const _D *</tt> in const
- * a context, otherwise a <tt>_D *</tt>.
+ * a context, otherwise a <tt>_D *</tt>. Thus \em RW_ means \em read/write,
+ * as you get a different type, dependent on whether you're allowed to
+ * read or write.
*
* Forwarding access from an interface to an implemantation class, an
- * ImplPtr prevents const interface methods from accidentally calling
+ * RW_pointer prevents const interface methods from accidentally calling
* nonconst implementation methods. In case you have to do so, call
* unconst to get the <tt>_D *</tt>.
*
* The second template argument defaults to <tt>_Ptr = shared_ptr<_D></tt>.
+ * \code
+ * #include "zypp/base/PtrTypes.h"
+ *
+ * class Foo
+ * {
+ * ...
+ * private:
+ * // Implementation class
+ * struct Impl;
+ * // Pointer to implementation; actually a shared_ptr<Impl>
+ * base::RW_pointer<Impl> _pimpl;
*
+ * void baa() { _pimpl->... } // is Impl *
+ * void baa() const { _pimpl->... } // is Impl const *
+ * };
+ * \endcode
* \todo refine ctor and assign.
*/
template<class _D, class _Ptr = shared_ptr<_D> >
- struct ImplPtr
+ struct RW_pointer
{
typedef _D element_type;
explicit
- ImplPtr( typename _Ptr::element_type * dptr = 0 )
+ RW_pointer( typename _Ptr::element_type * dptr = 0 )
: _dptr( dptr )
{}
explicit
- ImplPtr( _Ptr dptr )
+ RW_pointer( _Ptr dptr )
: _dptr( dptr )
{}
_D * unconst() const { return _dptr.get(); }
-
_Ptr _dptr;
};
- /** \relates ImplPtr Stream output.
+ /** \relates RW_pointer Stream output.
*
- * Print the \r _D object the ImplPtr refers, or \c "NULL"
+ * Print the \c _D object the RW_pointer refers, or \c "NULL"
* if the pointer is \c NULL.
*/
template<class _D, class _Ptr>
inline std::ostream &
- operator<<( std::ostream & str, const ImplPtr<_D, _Ptr> & obj )
+ operator<<( std::ostream & str, const RW_pointer<_D, _Ptr> & obj )
{
if ( obj.get() )
return str << *obj.get();
///////////////////////////////////////////////////////////////////
/** Wrapper for \c const correct access via pointer.
*
- * Template specialization of ImplPtr, storing a raw <tt>_P *</tt>,
+ * Template specialization of RW_pointer, storing a raw <tt>_P *</tt>,
* which must be convertible into a <tt>_D *</tt>.
*
* \note The object pointed to will \b not be deleted. If you need
* raw pointer.
*/
template<class _D,class _P>
- struct ImplPtr<_D,_P*>
+ struct RW_pointer<_D,_P*>
{
typedef _D element_type;
explicit
- ImplPtr( _P * dptr = 0 )
+ RW_pointer( _P * dptr = 0 )
: _dptr( dptr )
{}
_D * unconst() const { return _dptr; }
-
_P * _dptr;
};
class NAME; \
extern void intrusive_ptr_add_ref( const NAME * ); \
extern void intrusive_ptr_release( const NAME * ); \
-typedef zypp::base::intrusive_ptr<NAME> NAME##Ptr; \
-typedef zypp::base::intrusive_ptr<const NAME> const##NAME##Ptr; \
typedef zypp::base::intrusive_ptr<NAME> NAME##_Ptr; \
typedef zypp::base::intrusive_ptr<const NAME> NAME##_constPtr;
public:
typedef ResImplConnect Self;
typedef typename _Res::Impl Impl;
- typedef base::shared_ptr<Impl> ImplPtr;
- // Ptr typed not needed
+ typedef base::shared_ptr<Impl> Impl_Ptr;
+ // Ptr types not needed
// typedef base::intrusive_ptr<Self> Ptr;
// typedef base::intrusive_ptr<const Self> constPtr;
public:
ResImplConnect( const std::string & name_r,
const Edition & edition_r,
const Arch & arch_r,
- ImplPtr impl_r )
+ Impl_Ptr impl_r )
: _Res( name_r, edition_r, arch_r )
, _impl( impl_r )
{ _impl->_backRef = this; }
virtual ~ResImplConnect()
{ _impl->_backRef = 0; }
private:
- ImplPtr _impl;
+ Impl_Ptr _impl;
virtual Impl & pimpl() { return *_impl; }
virtual const Impl & pimpl() const { return *_impl; }
};
YUMFileListParser::YUMFileListParser(istream &is, const string& baseUrl)
- : XMLNodeIterator<YUMFileListDataPtr>(is, baseUrl,FILELISTSCHEMA)
+ : XMLNodeIterator<YUMFileListData_Ptr>(is, baseUrl,FILELISTSCHEMA)
{
fetchNext();
}
YUMFileListParser::YUMFileListParser()
{ }
- YUMFileListParser::YUMFileListParser(YUMFileListDataPtr& entry)
- : XMLNodeIterator<YUMFileListDataPtr>(entry)
+ YUMFileListParser::YUMFileListParser(YUMFileListData_Ptr& entry)
+ : XMLNodeIterator<YUMFileListData_Ptr>(entry)
{ }
// do the actual processing
- YUMFileListDataPtr
+ YUMFileListData_Ptr
YUMFileListParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMFileListDataPtr dataPtr = new YUMFileListData;
+ YUMFileListData_Ptr dataPtr = new YUMFileListData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
/**
* @short Parser for YUM filelists files
* Use this class as an iterator that produces, one after one,
- * YUMFileListDataPtr(s) for the XML package elements.
+ * YUMFileListData_Ptr(s) for the XML package elements.
* Here's an example:
*
* for (YUMFileListParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMFileListParser : public XMLNodeIterator<YUMFileListDataPtr>
+ class YUMFileListParser : public XMLNodeIterator<YUMFileListData_Ptr>
{
public:
/**
*/
YUMFileListParser(std::istream &is, const std::string &baseUrl);
YUMFileListParser();
- YUMFileListParser(YUMFileListDataPtr& entry);
+ YUMFileListParser(YUMFileListData_Ptr& entry);
/**
* @param reader
* @return
*/
- virtual YUMFileListDataPtr process(const xmlTextReaderPtr reader);
+ virtual YUMFileListData_Ptr process(const xmlTextReaderPtr reader);
/**
* converts the xml stuff to c++ stuff and filters the right namespaces
YUMGroupParser::YUMGroupParser()
{ }
- YUMGroupParser::YUMGroupParser(YUMGroupDataPtr& entry)
- : XMLNodeIterator<YUMGroupDataPtr>(entry)
+ YUMGroupParser::YUMGroupParser(YUMGroupData_Ptr& entry)
+ : XMLNodeIterator<YUMGroupData_Ptr>(entry)
{ }
}
// do the actual processing
- YUMGroupDataPtr
+ YUMGroupData_Ptr
YUMGroupParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMGroupDataPtr dataPtr = new YUMGroupData;
+ YUMGroupData_Ptr dataPtr = new YUMGroupData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
return dataPtr;
} /* end process */
- void YUMGroupParser::parseGrouplist(YUMGroupDataPtr dataPtr,
+ void YUMGroupParser::parseGrouplist(YUMGroupData_Ptr dataPtr,
xmlNodePtr node)
{
assert(dataPtr);
}
- void YUMGroupParser::parsePackageList(YUMGroupDataPtr dataPtr,
+ void YUMGroupParser::parsePackageList(YUMGroupData_Ptr dataPtr,
xmlNodePtr node)
{
assert(dataPtr);
YUMGroupParser::YUMGroupParser(istream &is, const string &baseUrl)
- : XMLNodeIterator<YUMGroupDataPtr>(is, baseUrl,GROUPSCHEMA)
+ : XMLNodeIterator<YUMGroupData_Ptr>(is, baseUrl,GROUPSCHEMA)
{
fetchNext();
}
* @short Parser for YUM group files.
*
* Use this class as an iterator that produces, one after one,
- * YUMGroupDataPtr(s) for the XML group elements.
+ * YUMGroupData_Ptr(s) for the XML group elements.
* Here's an example:
*
* for (YUMGroupParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMGroupParser : public XMLNodeIterator<YUMGroupDataPtr>
+ class YUMGroupParser : public XMLNodeIterator<YUMGroupData_Ptr>
{
public:
YUMGroupParser(std::istream &is, const std::string &baseUrl);
YUMGroupParser();
- YUMGroupParser(YUMGroupDataPtr& entry);
+ YUMGroupParser(YUMGroupData_Ptr& entry);
virtual ~YUMGroupParser();
private:
virtual bool isInterested(const xmlNodePtr nodePtr);
- virtual YUMGroupDataPtr process(const xmlTextReaderPtr reader);
- void parseGrouplist(YUMGroupDataPtr dataPtr,
+ virtual YUMGroupData_Ptr process(const xmlTextReaderPtr reader);
+ void parseGrouplist(YUMGroupData_Ptr dataPtr,
xmlNodePtr node);
- void parsePackageList(YUMGroupDataPtr dataPtr,
+ void parsePackageList(YUMGroupData_Ptr dataPtr,
xmlNodePtr node);
LibXMLHelper _helper;
YUMOtherParser::YUMOtherParser(istream &is, const string& baseUrl)
- : XMLNodeIterator<YUMOtherDataPtr>(is, baseUrl,OTHERSCHEMA)
+ : XMLNodeIterator<YUMOtherData_Ptr>(is, baseUrl,OTHERSCHEMA)
{
fetchNext();
}
YUMOtherParser::YUMOtherParser()
{ }
- YUMOtherParser::YUMOtherParser(YUMOtherDataPtr& entry)
- : XMLNodeIterator<YUMOtherDataPtr>(entry)
+ YUMOtherParser::YUMOtherParser(YUMOtherData_Ptr& entry)
+ : XMLNodeIterator<YUMOtherData_Ptr>(entry)
{ }
// do the actual processing
- YUMOtherDataPtr
+ YUMOtherData_Ptr
YUMOtherParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMOtherDataPtr dataPtr = new YUMOtherData;
+ YUMOtherData_Ptr dataPtr = new YUMOtherData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
/**
* @short Parser for YUM other.xml files
* Use this class as an iterator that produces, one after one,
- * YUMOtherDataPtr(s) for the XML package elements.
+ * YUMOtherData_Ptr(s) for the XML package elements.
* Here's an example:
*
* for (YUMOtherParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMOtherParser : public XMLNodeIterator<YUMOtherDataPtr>
+ class YUMOtherParser : public XMLNodeIterator<YUMOtherData_Ptr>
{
public:
/**
YUMOtherParser(std::istream &is, const std::string &baseUrl);
YUMOtherParser();
- YUMOtherParser(YUMOtherDataPtr& entry);
+ YUMOtherParser(YUMOtherData_Ptr& entry);
/**
* Destructor.
* @param reader
* @return
*/
- virtual YUMOtherDataPtr process(const xmlTextReaderPtr reader);
+ virtual YUMOtherData_Ptr process(const xmlTextReaderPtr reader);
/**
* converts the xml stuff to c++ stuff and filters the right namespaces
{ }
YUMPatchParser::YUMPatchParser(istream &is, const string& baseUrl)
- : XMLNodeIterator<YUMPatchDataPtr>(is, baseUrl,PATCHSCHEMA)
+ : XMLNodeIterator<YUMPatchData_Ptr>(is, baseUrl,PATCHSCHEMA)
{
fetchNext();
}
YUMPatchParser::YUMPatchParser()
{ }
- YUMPatchParser::YUMPatchParser(YUMPatchDataPtr& entry)
- : XMLNodeIterator<YUMPatchDataPtr>(entry)
+ YUMPatchParser::YUMPatchParser(YUMPatchData_Ptr& entry)
+ : XMLNodeIterator<YUMPatchData_Ptr>(entry)
{ }
}
// do the actual processing
- YUMPatchDataPtr
+ YUMPatchData_Ptr
YUMPatchParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMPatchDataPtr patchPtr = new YUMPatchData;
+ YUMPatchData_Ptr patchPtr = new YUMPatchData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
patchPtr->timestamp = _helper.attribute(dataNode,"timestamp");
void
- YUMPatchParser::parseAtomsNode(YUMPatchDataPtr dataPtr,
+ YUMPatchParser::parseAtomsNode(YUMPatchData_Ptr dataPtr,
xmlNodePtr formatNode)
{
assert(formatNode);
void
- YUMPatchParser::parsePackageNode(YUMPatchDataPtr dataPtr,
+ YUMPatchParser::parsePackageNode(YUMPatchData_Ptr dataPtr,
xmlNodePtr formatNode)
{
shared_ptr<YUMPatchPackage> package(new YUMPatchPackage);
}
void
- YUMPatchParser::parseScriptNode(YUMPatchDataPtr dataPtr,
+ YUMPatchParser::parseScriptNode(YUMPatchData_Ptr dataPtr,
xmlNodePtr formatNode)
{
shared_ptr<YUMPatchScript> script(new YUMPatchScript);
}
void
- YUMPatchParser::parseMessageNode(YUMPatchDataPtr dataPtr,
+ YUMPatchParser::parseMessageNode(YUMPatchData_Ptr dataPtr,
xmlNodePtr formatNode)
{
shared_ptr<YUMPatchMessage> message(new YUMPatchMessage);
/**
* @short Parser for YUM primary.xml files (containing package metadata)
* Use this class as an iterator that produces, one after one,
- * YUMPatchDataPtr(s) for the XML package elements in the input.
+ * YUMPatchData_Ptr(s) for the XML package elements in the input.
* Here's an example:
*
* for (YUMPatchParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMPatchParser : public XMLNodeIterator<YUMPatchDataPtr>
+ class YUMPatchParser : public XMLNodeIterator<YUMPatchData_Ptr>
{
public:
YUMPatchParser(std::istream &is, const std::string &baseUrl);
YUMPatchParser();
- YUMPatchParser(YUMPatchDataPtr& entry);
+ YUMPatchParser(YUMPatchData_Ptr& entry);
virtual ~YUMPatchParser();
private:
virtual bool isInterested(const xmlNodePtr nodePtr);
- virtual YUMPatchDataPtr process(const xmlTextReaderPtr reader);
- void parseAtomsNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
- void parsePackageNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
- void parseMessageNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
- void parseScriptNode(YUMPatchDataPtr dataPtr, xmlNodePtr formatNode);
+ virtual YUMPatchData_Ptr process(const xmlTextReaderPtr reader);
+ void parseAtomsNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+ void parsePackageNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+ void parseMessageNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
+ void parseScriptNode(YUMPatchData_Ptr dataPtr, xmlNodePtr formatNode);
void parseFormatNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
void parsePkgFilesNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
void parsePkgPlainRpmNode(YUMPatchPackage *dataPtr, xmlNodePtr formatNode);
YUMPrimaryParser::YUMPrimaryParser(istream &is, const string& baseUrl)
- : XMLNodeIterator<YUMPrimaryDataPtr>(is, baseUrl,PRIMARYSCHEMA)
+ : XMLNodeIterator<YUMPrimaryData_Ptr>(is, baseUrl,PRIMARYSCHEMA)
{
fetchNext();
}
YUMPrimaryParser::YUMPrimaryParser()
{ }
- YUMPrimaryParser::YUMPrimaryParser(YUMPrimaryDataPtr& entry)
- : XMLNodeIterator<YUMPrimaryDataPtr>(entry)
+ YUMPrimaryParser::YUMPrimaryParser(YUMPrimaryData_Ptr& entry)
+ : XMLNodeIterator<YUMPrimaryData_Ptr>(entry)
{ }
// do the actual processing
- YUMPrimaryDataPtr
+ YUMPrimaryData_Ptr
YUMPrimaryParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMPrimaryDataPtr dataPtr = new YUMPrimaryData;
+ YUMPrimaryData_Ptr dataPtr = new YUMPrimaryData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
void
- YUMPrimaryParser::parseFormatNode(YUMPrimaryDataPtr dataPtr,
+ YUMPrimaryParser::parseFormatNode(YUMPrimaryData_Ptr dataPtr,
xmlNodePtr formatNode)
{
assert(formatNode);
/**
* @short Parser for YUM primary.xml files (containing package metadata)
* Use this class as an iterator that produces, one after one,
- * YUMPrimaryDataPtr(s) for the XML package elements in the input.
+ * YUMPrimaryData_Ptr(s) for the XML package elements in the input.
* Here's an example:
*
* for (YUMPrimaryParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMPrimaryParser : public XMLNodeIterator<YUMPrimaryDataPtr>
+ class YUMPrimaryParser : public XMLNodeIterator<YUMPrimaryData_Ptr>
{
public:
YUMPrimaryParser(std::istream &is, const std::string &baseUrl);
YUMPrimaryParser();
- YUMPrimaryParser(YUMPrimaryDataPtr& entry);
+ YUMPrimaryParser(YUMPrimaryData_Ptr& entry);
virtual ~YUMPrimaryParser();
private:
// FIXME move needed method to a common class, inherit it
friend class YUMPatchParser;
virtual bool isInterested(const xmlNodePtr nodePtr);
- virtual YUMPrimaryDataPtr process(const xmlTextReaderPtr reader);
- void parseFormatNode(YUMPrimaryDataPtr dataPtr,
+ virtual YUMPrimaryData_Ptr process(const xmlTextReaderPtr reader);
+ void parseFormatNode(YUMPrimaryData_Ptr dataPtr,
xmlNodePtr formatNode);
void parseDependencyEntries(std::list<YUMDependency> *depList,
xmlNodePtr depNode);
YUMRepomdParser::YUMRepomdParser()
{ }
- YUMRepomdParser::YUMRepomdParser(YUMRepomdDataPtr& entry)
- : XMLNodeIterator<YUMRepomdDataPtr>(entry)
+ YUMRepomdParser::YUMRepomdParser(YUMRepomdData_Ptr& entry)
+ : XMLNodeIterator<YUMRepomdData_Ptr>(entry)
{ }
}
// do the actual processing
- YUMRepomdDataPtr
+ YUMRepomdData_Ptr
YUMRepomdParser::process(const xmlTextReaderPtr reader)
{
assert(reader);
- YUMRepomdDataPtr repoPtr = new YUMRepomdData;
+ YUMRepomdData_Ptr repoPtr = new YUMRepomdData;
xmlNodePtr dataNode = xmlTextReaderExpand(reader);
assert(dataNode);
repoPtr->type = _helper.attribute(dataNode,"type");
YUMRepomdParser::YUMRepomdParser(istream &is, const string &baseUrl)
- : XMLNodeIterator<YUMRepomdDataPtr>(is, baseUrl,REPOMDSCHEMA)
+ : XMLNodeIterator<YUMRepomdData_Ptr>(is, baseUrl,REPOMDSCHEMA)
{
fetchNext();
}
/**
* @short Parser for YUM repomd.xml files (describing the repository)
* Use this class as an iterator that produces, one after one,
- * YUMRepomdDataPtr(s) for the XML package elements.
+ * YUMRepomdData_Ptr(s) for the XML package elements.
* Here's an example:
*
* for (YUMRepomdParser iter(anIstream, baseUrl),
* continue parsing, XMLNodeIterator will log it and consider the input as finished.
* You can query the exit status with errorStatus().
*/
- class YUMRepomdParser : public XMLNodeIterator<YUMRepomdDataPtr>
+ class YUMRepomdParser : public XMLNodeIterator<YUMRepomdData_Ptr>
{
public:
YUMRepomdParser(std::istream &is, const std::string &baseUrl);
YUMRepomdParser();
- YUMRepomdParser(YUMRepomdDataPtr& entry);
+ YUMRepomdParser(YUMRepomdData_Ptr& entry);
virtual ~YUMRepomdParser();
private:
virtual bool isInterested(const xmlNodePtr nodePtr);
- virtual YUMRepomdDataPtr process(const xmlTextReaderPtr reader);
+ virtual YUMRepomdData_Ptr process(const xmlTextReaderPtr reader);
LibXMLHelper _helper;
};