Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / Resolvable.cc
index 0832a83..db3fb80 100644 (file)
@@ -9,64 +9,27 @@
 /** \file zypp/Resolvable.cc
  *
 */
-#include <iostream>
-
 #include "zypp/Resolvable.h"
-#include "zypp/detail/ResolvableImpl.h"
-
-using namespace std;
+#include "zypp/ResObject.h"
+#include "zypp/PoolItem.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
-{ /////////////////////////////////////////////////////////////////
+{
+  IMPL_PTR_TYPE(Resolvable);
 
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Resolvable::Resolvable
-  //   METHOD TYPE : Ctor
-  //
-  Resolvable::Resolvable( detail::ResolvableImplPtr impl_r )
-  : _pimpl( impl_r )
+  Resolvable::Resolvable( const sat::Solvable & solvable_r )
+  : _solvable( solvable_r )
   {}
 
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Resolvable::~Resolvable
-  //   METHOD TYPE : Dtor
-  //
   Resolvable::~Resolvable()
   {}
 
-  const ResKind & Resolvable::kind() const
-  { return _pimpl->kind(); }
-
-  const ResName & Resolvable::name() const
-  { return _pimpl->name(); }
-
-  const ResEdition & Resolvable::edition() const
-  { return _pimpl->edition(); }
-
-  const ResArch & Resolvable::arch() const
-  { return _pimpl->arch(); }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Resolvable::~Resolvable
-  //   METHOD TYPE : Dtor
-  //
-  detail::constResolvableImplPtr Resolvable::sayFriend() const
-  { return _pimpl; }
+  PoolItem Resolvable::poolItem() const
+  { return PoolItem( *this ); }
 
-  /******************************************************************
-  **
-  **   FUNCTION NAME : operator<<
-  **   FUNCTION TYPE : std::ostream &
-  */
-  std::ostream & operator<<( std::ostream & str, const Resolvable & obj )
-  {
-    return str << *obj.sayFriend();
-  }
+  std::ostream & Resolvable::dumpOn( std::ostream & str ) const
+  { return str << satSolvable(); }
 
-  /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////