zypp/parser/yum/Makefile \
zypp/parser/yum/schema/Makefile \
zypp/parser/tagfile/Makefile \
+ zypp/pool/Makefile \
zypp/solver/Makefile \
zypp/solver/detail/Makefile \
zypp/solver/temporary/Makefile \
## Process this file with automake to produce Makefile.in
## ##################################################
-SUBDIRS = base url media capability detail parser source target solver
+SUBDIRS = base url media capability detail pool parser source target solver
## ##################################################
ResStatus.h \
ResStore.h \
ResFilters.h \
+ ResPool.h \
Package.h \
Pathname.h \
Selection.h \
ResTraits.cc \
ResStatus.cc \
ResStore.cc \
+ ResPool.cc \
Package.cc \
Pathname.cc \
Selection.cc \
lib@PACKAGE@_la_LIBADD = base/lib@PACKAGE@_base.la \
detail/lib@PACKAGE@_detail.la \
capability/lib@PACKAGE@_capability.la \
+ pool/lib@PACKAGE@_pool.la \
parser/lib@PACKAGE@_parser.la \
source/lib@PACKAGE@_source.la \
media/lib@PACKAGE@_media.la \
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/ResPool.cc
+ *
+*/
+#include <iostream>
+//#include "zypp/base/Logger.h"
+
+#include "zypp/ResPool.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ResPool::Impl
+ //
+ /** ResPool implementation. */
+ struct ResPool::Impl
+ {
+
+ public:
+ /** Offer default Impl. */
+ static shared_ptr<Impl> nullimpl()
+ {
+ static shared_ptr<Impl> _nullimpl( new Impl );
+ return _nullimpl;
+ }
+
+ private:
+ friend Impl * rwcowClone<Impl>( const Impl * rhs );
+ /** clone for RWCOW_pointer */
+ Impl * clone() const
+ { return new Impl( *this ); }
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates ResPool::Impl Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const ResPool::Impl & obj )
+ {
+ return str << "ResPool::Impl";
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ResPool
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ResPool::ResPool
+ // METHOD TYPE : Ctor
+ //
+ ResPool::ResPool()
+ : _pimpl( Impl::nullimpl() )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ResPool::~ResPool
+ // METHOD TYPE : Dtor
+ //
+ ResPool::~ResPool()
+ {}
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const ResPool & obj )
+ {
+ return str << *obj._pimpl;
+ }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/ResPool.h
+ *
+*/
+#ifndef ZYPP_RESPOOL_H
+#define ZYPP_RESPOOL_H
+
+#include <iosfwd>
+
+#include "zypp/base/PtrTypes.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ResPool
+ //
+ /** */
+ class ResPool
+ {
+ friend std::ostream & operator<<( std::ostream & str, const ResPool & obj );
+
+ public:
+ /** Implementation */
+ class Impl;
+
+ public:
+ /** Default ctor */
+ ResPool();
+ /** Dtor */
+ ~ResPool();
+
+ public:
+
+ private:
+ /** Pointer to implementation */
+ RWCOW_pointer<Impl> _pimpl;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates ResPool Stream output */
+ std::ostream & operator<<( std::ostream & str, const ResPool & obj );
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_RESPOOL_H
#include <set>
#include "zypp/base/PtrTypes.h"
-#include "zypp/Package.h"
+#include "zypp/ResObject.h"
///////////////////////////////////////////////////////////////////
namespace zypp
--- /dev/null
+Makefile.in
+Makefile
+.deps
+.libs
+*.o
+*.lo
+*.a
+*.la
--- /dev/null
+## Process this file with automake to produce Makefile.in
+## ##################################################
+
+SUBDIRS =
+
+## ##################################################
+
+baseincludedir = $(pkgincludedir)/pool
+
+baseinclude_HEADERS = \
+ PoolItem.h
+
+noinst_LTLIBRARIES = lib@PACKAGE@_pool.la
+
+## ##################################################
+
+lib@PACKAGE@_pool_la_SOURCES = \
+ PoolItem.cc
+
+# lib@PACKAGE@_pool_la_LIBADD =
+
+## ##################################################
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/pool/PoolItem.cc
+ *
+*/
+#include <iostream>
+//#include "zypp/base/Logger.h"
+
+#include "zypp/pool/PoolItem.h"
+
+using std::endl;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace pool
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : PoolItem::Impl
+ //
+ /** PoolItem implementation. */
+ struct PoolItem::Impl
+ {
+ Impl( ResObject::constPtr res_r,
+ const ResStatus & status_r = ResStatus() )
+ : _status( status_r )
+ , _resolvable( res_r )
+ {}
+
+ ResStatus & status() const
+ { return _status; }
+
+ ResObject::constPtr resolvable() const
+ { return _resolvable; }
+
+ private:
+ mutable ResStatus _status;
+ ResObject::constPtr _resolvable;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates PoolItem::Impl Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const PoolItem::Impl & obj )
+ {
+ return str << "PoolItem::Impl";
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : PoolItem
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : PoolItem::PoolItem
+ // METHOD TYPE : Ctor
+ //
+ PoolItem::PoolItem()
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : PoolItem::PoolItem
+ // METHOD TYPE : Ctor
+ //
+ PoolItem::PoolItem( ResObject::constPtr res_r )
+ : _pimpl( new Impl( res_r ) )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : PoolItem::PoolItem
+ // METHOD TYPE : Ctor
+ //
+ PoolItem::PoolItem( ResObject::constPtr res_r, const ResStatus & status_r )
+ : _pimpl( new Impl( res_r, status_r ) )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : PoolItem::~PoolItem
+ // METHOD TYPE : Dtor
+ //
+ PoolItem::~PoolItem()
+ {}
+
+ ResStatus & PoolItem::status() const
+ { return _pimpl->status(); }
+
+ ResObject::constPtr PoolItem::resolvable() const
+ { return _pimpl->resolvable(); }
+
+ /******************************************************************
+ **
+ ** FUNCTION NAME : operator<<
+ ** FUNCTION TYPE : std::ostream &
+ */
+ std::ostream & operator<<( std::ostream & str, const PoolItem & obj )
+ {
+ return str << *obj._pimpl;
+ }
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace pool
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/pool/PoolItem.h
+ *
+*/
+#ifndef ZYPP_POOL_POOLITEM_H
+#define ZYPP_POOL_POOLITEM_H
+
+#include <iosfwd>
+#include <functional>
+
+#include "zypp/base/PtrTypes.h"
+#include "zypp/ResObject.h"
+#include "zypp/ResStatus.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace pool
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : PoolItem
+ //
+ /**
+ */
+ class PoolItem
+ {
+ friend std::ostream & operator<<( std::ostream & str, const PoolItem & obj );
+
+ public:
+ /** Implementation */
+ class Impl;
+
+ public:
+ /** Default ctor for use in std::container. */
+ PoolItem();
+
+ /** Ctor */
+ explicit
+ PoolItem( ResObject::constPtr res_r );
+
+ /** Ctor */
+ PoolItem( ResObject::constPtr res_r, const ResStatus & status_r );
+
+ /** Dtor */
+ ~PoolItem();
+
+ public:
+ /** */
+ ResStatus & status() const;
+
+ /** */
+ ResObject::constPtr resolvable() const;
+
+ /** Implicit conversion into ResObject::constPtr to
+ * support query filters operating on ResObject.
+ */
+ operator ResObject::constPtr() const
+ { return resolvable(); }
+
+ /** Forward \c -> access to ResObject. */
+ ResObject::constPtr operator->() const
+ { return resolvable(); }
+
+ private:
+ /** Pointer to implementation */
+ RW_pointer<Impl> _pimpl;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /** \relates PoolItem Stream output */
+ std::ostream & operator<<( std::ostream & str, const PoolItem & obj );
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace pool
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////
+namespace std
+{ /////////////////////////////////////////////////////////////////
+
+ /** \relates zypp::pool::PoolItem Order in std::container follows ResObject::constPtr.*/
+ template<>
+ inline bool less<zypp::pool::PoolItem>::operator()( const zypp::pool::PoolItem & lhs, const zypp::pool::PoolItem & rhs ) const
+ { return lhs.resolvable() < rhs.resolvable(); }
+
+ /** \relates zypp::pool::PoolItem Equal for std::container follows ResObject::constPtr. */
+ template<>
+ inline bool equal_to<zypp::pool::PoolItem>::operator()( const zypp::pool::PoolItem & lhs, const zypp::pool::PoolItem & rhs ) const
+ { return lhs.resolvable() == rhs.resolvable(); }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+
+
+#endif // ZYPP_POOL_POOLITEM_H