Imported Upstream version 15.19.0 83/94683/1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:06:25 +0000 (11:06 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Nov 2016 02:06:26 +0000 (11:06 +0900)
Change-Id: Ic46d7cd27330c3dd7bcbcc5c069c50fee3fce66a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
153 files changed:
CMakeLists.txt
VERSION.cmake
devel/devel.ma/AOUT.cc [deleted file]
devel/devel.ma/CleandepsOnRemove.cc [deleted file]
devel/devel.ma/CommitCb.cc [deleted file]
devel/devel.ma/DumpSolv.cc [deleted file]
devel/devel.ma/Ex.cc [deleted file]
devel/devel.ma/ExPure.cc [deleted file]
devel/devel.ma/ExplicitMap.h
devel/devel.ma/FakePool.cc [deleted file]
devel/devel.ma/FakePool.h [deleted file]
devel/devel.ma/FilelistTransform.cc [deleted file]
devel/devel.ma/MT.cc
devel/devel.ma/MaTest.cc
devel/devel.ma/Main.cc
devel/devel.ma/NewPool.cc
devel/devel.ma/Parse.cc [deleted file]
devel/devel.ma/Printing.h
devel/devel.ma/Sat.cc
devel/devel.ma/Tools.h
devel/devel.ma/TransList.cc [deleted file]
devel/devel.ma/Xml.cc
devel/devel.ma/defstr.txt [deleted file]
devel/devel.ma/iorderbug.pool [deleted file]
devel/devel.ma/main.cc [deleted file]
devel/devel.ma/main.h
doc/autoinclude/ApplicationMetada.doc [new file with mode: 0644]
package/libzypp.changes
tests/zypp/CpeId_test.cc
tests/zypp/Dup_test.cc
tests/zypp/KeyRingTestReceiver.h
tests/zypp/PtrTypes_test.cc
tests/zypp/ResStatus_test.cc
tests/zypp/Selectable_test.cc
zypp/Arch.cc
zypp/AutoDispose.h
zypp/Bit.h
zypp/CMakeLists.txt
zypp/Callback.h
zypp/Capability.cc
zypp/CpeId.cc
zypp/CpeId.h
zypp/Date.h
zypp/ExternalProgram.cc
zypp/ExternalProgram.h
zypp/Filter.h
zypp/Glob.cc
zypp/Glob.h
zypp/MediaProducts.cc [deleted file]
zypp/MediaProducts.h
zypp/Patch.h
zypp/PathInfo.cc
zypp/PluginScript.cc
zypp/PoolItemBest.h
zypp/PoolQuery.cc
zypp/PoolQueryResult.h
zypp/Product.h
zypp/PublicKey.cc
zypp/Range.h
zypp/RelCompare.h
zypp/RepoInfo.h
zypp/RepoManager.cc
zypp/Repository.cc
zypp/Repository.h
zypp/ResFilters.h
zypp/ResObject.h
zypp/ResPool.h
zypp/ResPoolProxy.h
zypp/ResStatus.h
zypp/ResTraits.h
zypp/Resolvable.h
zypp/VendorAttr.h
zypp/ZConfig.cc
zypp/ZYppCallbacks.h
zypp/base/Algorithm.h
zypp/base/Collector.h
zypp/base/Counter.h
zypp/base/Debug.h
zypp/base/DefaultIntegral.h
zypp/base/DtorReset.h
zypp/base/EnumClass.h
zypp/base/Exception.h
zypp/base/Flags.h
zypp/base/Functional.h
zypp/base/Gettext.h
zypp/base/GzStream.h
zypp/base/Hash.h
zypp/base/Iterable.h
zypp/base/Iterator.h
zypp/base/LogControl.h
zypp/base/LogTools.h
zypp/base/Logger.h
zypp/base/Measure.cc
zypp/base/Measure.h
zypp/base/NamedValue.h
zypp/base/ProvideNumericId.h
zypp/base/PtrTypes.h
zypp/base/SetRelationMixin.cc
zypp/base/SetRelationMixin.h
zypp/base/SetTracker.h
zypp/base/StrMatcher.cc
zypp/base/StrMatcher.h
zypp/base/String.h
zypp/base/TypeTraits.h
zypp/base/ValueTransform.h
zypp/base/Xml.h
zypp/media/MediaHandler.cc
zypp/media/MediaHandler.h
zypp/media/ProxyInfo.cc
zypp/media/proxyinfo/ProxyInfos.h
zypp/parser/xml/Parse.h
zypp/parser/xml/ParseDefConsume.h
zypp/pool/PoolStats.h
zypp/pool/PoolTraits.h
zypp/sat/FileConflicts.h
zypp/sat/LookupAttr.cc
zypp/sat/LookupAttr.h
zypp/sat/LookupAttrTools.h
zypp/sat/Map.cc
zypp/sat/Map.h
zypp/sat/Pool.cc
zypp/sat/Pool.h
zypp/sat/Queue.cc
zypp/sat/Queue.h
zypp/sat/SolvIterMixin.h
zypp/sat/Solvable.cc
zypp/sat/Solvable.h
zypp/sat/SolvableSet.h
zypp/sat/SolvableType.h
zypp/sat/Transaction.h
zypp/sat/WhatObsoletes.h
zypp/sat/detail/PoolImpl.cc
zypp/sat/detail/PoolImpl.h
zypp/sat/detail/PoolMember.h
zypp/solver/detail/SATResolver.cc
zypp/solver/detail/SATResolver.h
zypp/solver/detail/SolverQueueItem.h
zypp/solver/detail/SolverQueueItemDelete.cc
zypp/solver/detail/SolverQueueItemDelete.h
zypp/solver/detail/SolverQueueItemInstall.cc
zypp/solver/detail/SolverQueueItemInstall.h
zypp/solver/detail/SolverQueueItemInstallOneOf.cc
zypp/solver/detail/SolverQueueItemInstallOneOf.h
zypp/solver/detail/SolverQueueItemLock.cc
zypp/solver/detail/SolverQueueItemLock.h
zypp/solver/detail/SolverQueueItemUpdate.cc
zypp/solver/detail/SolverQueueItemUpdate.h
zypp/target/CommitPackageCache.h
zypp/target/TargetImpl.commitFindFileConflicts.cc
zypp/target/rpm/RpmDb.cc
zypp/ui/Selectable.h
zypp/ui/SelectableImpl.cc
zypp/ui/SelectableImpl.h

index ff6dfdf..3377079 100644 (file)
@@ -190,7 +190,7 @@ ELSE( DISABLE_LIBPROXY )
     MESSAGE( STATUS "libproxy not found" )
   ELSE ( NOT LIBPROXY_FOUND )
     INCLUDE_DIRECTORIES( ${LIBPROXY_INCLUDE_DIR} )
-    ADD_DEFINITIONS(-D_WITH_LIBPROXY_SUPPORT_)
+    ADD_DEFINITIONS(-DWITH_LIBPROXY_SUPPORT)
   ENDIF( NOT LIBPROXY_FOUND )
 ENDIF( DISABLE_LIBPROXY )
 
index cdfd9b3..dd5aca6 100644 (file)
 #   See './mkChangelog -h' for help.
 #
 SET(LIBZYPP_MAJOR "15")
-SET(LIBZYPP_COMPATMINOR "14")
-SET(LIBZYPP_MINOR "18")
+SET(LIBZYPP_COMPATMINOR "19")
+SET(LIBZYPP_MINOR "19")
 SET(LIBZYPP_PATCH "0")
 #
-# LAST RELEASED: 15.18.0 (14)
+# LAST RELEASED: 15.19.0 (19)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff --git a/devel/devel.ma/AOUT.cc b/devel/devel.ma/AOUT.cc
deleted file mode 100644 (file)
index b56ad18..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <iostream>
-#include "zypp/base/Logger.h"
-#include "zypp/base/LogTools.h"
-#include "zypp/base/Function.h"
-#include "zypp/base/IOStream.h"
-#include "zypp/base/InputStream.h"
-#include "zypp/ProgressData.h"
-
-#include "zypp/base/Random.h"
-
-#include <boost/thread.hpp>
-
-using std::endl;
-using namespace zypp;
-
-
-void action( int i_r )
-{
-  unsigned sec = base::random( 3 );
-  sleep( sec );
-  MIL << "Action " << i_r << " (" << sec << ")" << endl;
-}
-
-
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-
-  for ( unsigned i = 0; i < 5; ++i )
-  {
-    new boost::thread( bind( action, i ) );
-  }
-
-  INT << "===[END]============================================" << endl << endl;
-  return ( 0 );
-}
diff --git a/devel/devel.ma/CleandepsOnRemove.cc b/devel/devel.ma/CleandepsOnRemove.cc
deleted file mode 100644 (file)
index 7a378e6..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/PoolQuery.h>
-#include <zypp/target/rpm/librpmDb.h>
-#include <zypp/parser/ProductFileReader.h>
-
-#include "zypp/sat/WhatObsoletes.h"
-#include "zypp/ExternalProgram.h"
-
-///////////////////////////////////////////////////////////////////
-
-//static const Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") : "/Local/ROOT" );
-//static const Pathname sysRoot( "/tmp/ToolScanRepos" );
-static const Pathname sysRoot( "/" );
-
-///////////////////////////////////////////////////////////////////
-
-bool solve()
-{
-  bool rres = false;
-  {
-    //zypp::base::LogControl::TmpLineWriter shutUp;
-    //getZYpp()->resolver()->setOnlyRequires( true );
-    rres = getZYpp()->resolver()->resolvePool();
-  }
-  if ( ! rres )
-  {
-    ERR << "resolve " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  MIL << "resolve " << rres << endl;
-  return true;
-}
-
-bool upgrade()
-{
-  bool rres = false;
-  {
-    //zypp::base::LogControl::TmpLineWriter shutUp;
-    Measure x( "Upgrade" );
-    rres = getZYpp()->resolver()->doUpgrade();
-  }
-  if ( ! rres )
-  {
-    Measure x( "Upgrade Error" );
-    ERR << "upgrade " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  MIL << "upgrade " << rres << endl;
-  return true;
-}
-
-namespace zypp
-{
-  namespace target
-  {
-    void writeUpgradeTestcase();
-  }
-}
-
-std::ostream & operator<<( std::ostream & str, const sat::Solvable::SplitIdent & obj )
-{
-  str << "{" << obj.ident() << "}{" << obj.kind() << "}{" << obj.name () << "}" << endl;
-  return str;
-}
-
-namespace zypp {
-std::ostream & dumpOn( std::ostream & str, const Url & obj )
-{
-  str << "{" << obj.getHost() << "}{" << obj.getPort() << "}";
-  return str;
-}
-}
-
-int main( int argc, char * argv[] )
-try {
-  --argc,++argv;
-  zypp::base::LogControl::instance().logToStdErr();
-  INT << "===[START]==========================================" << endl;
-  ///////////////////////////////////////////////////////////////////
-  if ( sysRoot == "/" )
-    ::unsetenv( "ZYPP_CONF" );
-  ResPool   pool( ResPool::instance() );
-  sat::Pool satpool( sat::Pool::instance() );
-  ///////////////////////////////////////////////////////////////////
-  dumpRange( WAR << "satpool.multiversion " , satpool.multiversionBegin(), satpool.multiversionEnd() ) << endl;
-  TestSetup::LoadSystemAt( sysRoot, Arch_i586 );
-  ///////////////////////////////////////////////////////////////////
-
-  char * fix[] = {
-      "test"
-  };
-  argv = fix;
-  argc = arraySize(fix);
-  for ( ; argc; --argc,++argv )
-  {
-    ui::Selectable::Ptr p( getSel<Package>( *argv ) );
-    if ( p )
-      USR << p->setToDelete() << endl;
-    else
-      ERR << p << endl;
-  }
-
-  std::set<PoolItem> todel;
-  {
-    getZYpp()->resolver()->setCleandepsOnRemove( false );
-    SEC << "=== Solve noclean:" << endl;
-    solve();
-    std::copy( make_filter_begin<resfilter::ByTransact>(pool),
-              make_filter_end<resfilter::ByTransact>(pool),
-              std::inserter( todel, todel.begin() ) );
-    WAR << todel << endl;
-  }
-  {
-    getZYpp()->resolver()->setCleandepsOnRemove( true );
-    SEC << "=== Solve clean:" << endl;
-    solve();
-    SEC << "========================================================" << endl;
-    for_( it, make_filter_begin<resfilter::ByTransact>(pool), make_filter_end<resfilter::ByTransact>(pool) )
-    {
-      ( todel.find( *it ) == todel.end() ? INT : USR ) << *it << endl;
-    }
-    SEC << "========================================================" << endl;
-  }
-
-
-
-  ///////////////////////////////////////////////////////////////////
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::instance().logNothing();
-  return 0;
-}
-catch ( const Exception & exp )
-{
-  INT << exp << endl << exp.historyAsString();
-}
-catch (...)
-{}
-
diff --git a/devel/devel.ma/CommitCb.cc b/devel/devel.ma/CommitCb.cc
deleted file mode 100644 (file)
index a0990ba..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-#include "Tools.h"
-#include <zypp/ResObjects.h>
-
-#include <zypp/sat/LookupAttr.h>
-#include <zypp/PoolQuery.h>
-#include <zypp/ZYppCallbacks.h>
-
-struct IRR : public zypp::callback::ReceiveReport<zypp::target::rpm::InstallResolvableReport>
-{
-  IRR()
-  { connect(); }
-#if 0
-  enum Action {
-    ABORT,  // abort and return error
-    RETRY,     // retry
-    IGNORE     // ignore the failure
-  };
-
-  enum Error {
-    NO_ERROR,
-    NOT_FOUND,         // the requested Url was not found
-    IO,                // IO error
-    INVALID            // th resolvable is invalid
-  };
-
-        // the level of RPM pushing
-  /** \deprecated We fortunately no longer do 3 attempts. */
-  enum RpmLevel {
-    RPM,
-    RPM_NODEPS,
-    RPM_NODEPS_FORCE
-  };
-#endif
-
-  virtual void reportbegin()
-  { SEC << endl; }
-  virtual void reportend()
-  { SEC << endl; }
-
-  virtual void start(Resolvable::constPtr /*resolvable*/)
-  { INT << endl; }
-
-  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
-  {
-    static int i = 4;
-    if ( --i <= 0 )
-    {
-      INT << "return abort" << endl;
-      return false;
-    }
-    return true;
-  }
-
-  virtual Action problem(Resolvable::constPtr /*resolvable*/, Error /*error*/, const std::string &/*description*/, RpmLevel /*level*/)
-  {
-    INT << "return abort" << endl;
-    return ABORT;
-  }
-
-  virtual void finish(Resolvable::constPtr /*resolvable*/, Error /*error*/, const std::string &/*reason*/, RpmLevel /*level*/)
-  { INT << endl; }
-};
-
-struct RRR : public zypp::callback::ReceiveReport<zypp::target::rpm::RemoveResolvableReport>
-{
-  RRR()
-  { connect(); }
-#if 0
-  enum Action {
-    ABORT,  // abort and return error
-    RETRY,     // retry
-    IGNORE     // ignore the failure
-  };
-
-  enum Error {
-    NO_ERROR,
-    NOT_FOUND,         // the requested Url was not found
-    IO,                // IO error
-    INVALID            // th resolvable is invalid
-  };
-#endif
-
-  virtual void reportbegin()
-  { SEC << endl; }
-  virtual void reportend()
-  { SEC << endl; }
-
-  virtual void start( Resolvable::constPtr /*resolvable*/ )
-  { INT << endl; }
-
-  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
-  { INT << endl; return true; }
-
-  virtual Action problem( Resolvable::constPtr /*resolvable*/ , Error /*error*/ , const std::string &/*description*/ )
-  { INT << endl; return ABORT; }
-
-  virtual void finish( Resolvable::constPtr /*resolvable*/ , Error /*error*/ , const std::string &/*reason*/ )
-  { INT << endl; }
-};
-
-bool solve()
-{
-  static unsigned run = 0;
-  USR << "Solve " << run++ << endl;
-  bool rres = false;
-  {
-    zypp::base::LogControl::TmpLineWriter shutUp;
-    rres = getZYpp()->resolver()->resolvePool();
-  }
-  if ( ! rres )
-  {
-    ERR << "resolve " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  return true;
-}
-
-bool install()
-{
-  ZYppCommitPolicy pol;
-//pol.dryRun(true);
-  pol.rpmInstFlags( pol.rpmInstFlags().setFlag( target::rpm::RPMINST_JUSTDB ) );
-  SEC << "START commit..." << endl;
-  SEC << getZYpp()->commit( pol ) << endl;
-  return true;
-}
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-  IRR _irr;
-  RRR _rrr;
-  Pathname mroot( "/tmp/ToolScanRepos" );
-  TestSetup test( mroot, Arch_i586 );
-  test.loadTarget();
-  test.loadRepos();
-
-  ResPool pool( test.pool() );
-  ui::Selectable::Ptr sel;
-
-  getSel<Package>( "rpm" )->setToInstall();
-  vdumpPoolStats( USR << "Selected:"<< endl,
-                  make_filter_begin<resfilter::ByTransact>(pool),
-                  make_filter_end<resfilter::ByTransact>(pool) ) << endl;
-
-  if ( solve() )
-  {
-    vdumpPoolStats( USR << "Solved:"<< endl,
-                    make_filter_begin<resfilter::ByTransact>(pool),
-                    make_filter_end<resfilter::ByTransact>(pool) ) << endl;
-
-    install();
-  }
-
-  INT << "===[END]============================================" << endl << endl;
-  return 0;
-}
-
diff --git a/devel/devel.ma/DumpSolv.cc b/devel/devel.ma/DumpSolv.cc
deleted file mode 100644 (file)
index ad93024..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/ResObjects.h>
-#include <zypp/sat/WhatObsoletes.h>
-
-
-static std::string appname( __FILE__ );
-static TestSetup test;
-
-///////////////////////////////////////////////////////////////////
-
-#define OUT   USR
-#define HEADL SEC << "===> "
-
-inline std::ostream & errmessage( const std::string & msg_r = std::string() )
-{
-  cerr << "*** ";
-  if ( ! msg_r.empty() )
-    cerr << msg_r << endl;
-  return cerr;
-}
-
-int usage( const std::string & msg_r = std::string(), int exit_r = 100 )
-{
-  if ( ! msg_r.empty() )
-  {
-    cerr << endl;
-    errmessage( msg_r );
-    cerr << endl;
-  }
-  cerr << "Usage: " << appname << " TESTCASE" << endl;
-  cerr << "  Load and process testcase." << endl;
-  return exit_r;
-}
-
-///////////////////////////////////////////////////////////////////
-
-bool upgrade()
-{
-  bool rres = false;
-  {
-    zypp::base::LogControl::TmpLineWriter shutUp;
-    rres = getZYpp()->resolver()->doUpgrade();
-  }
-  if ( ! rres )
-  {
-    ERR << "upgrade " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  MIL << "upgrade " << rres << endl;
-  return true;
-}
-
-bool solve()
-{
-  static unsigned run = 0;
-  USR << "Solve " << run++ << endl;
-  bool rres = false;
-  {
-    zypp::base::LogControl::TmpLineWriter shutUp;
-    rres = getZYpp()->resolver()->resolvePool();
-  }
-  if ( ! rres )
-  {
-    ERR << "resolve " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-
-  return true;
-}
-
-///////////////////////////////////////////////////////////////////
-
-/**
-*/
-struct ArgList
-{
-  typedef std::vector<std::string>::const_iterator const_iterator;
-
-  ArgList()
-  {}
-
-  ArgList( const std::string & line_r )
-  { str::splitEscaped( line_r, std::back_inserter(_argv) ); }
-
-  const_iterator begin() const { const_iterator ret =_argv.begin(); for ( unsigned i = _carg; i; --i ) ++ret; return ret; }
-  const_iterator end()   const { return _argv.end(); }
-
-  void     clear()       { _argv.clear(); _carg = 0; }
-  bool     empty() const { return _argv.size() == _carg; }
-  unsigned size()  const { return _argv.size() - _carg; }
-
-  std::string &       operator[]( int idx )       { return _argv[_carg+idx]; }
-  const std::string & operator[]( int idx ) const { return _argv[_carg+idx]; }
-
-  std::string at( int idx ) const { return _carg+idx < _argv.size() ? _argv[_carg+idx] : std::string(); }
-
-  unsigned carg() const { return _carg; }
-  void poparg( int cnt = 1 ) { _carg = arange( _carg + cnt ); }
-
-  public:
-    std::vector<std::string> &       get()       { return _argv; }
-    const std::vector<std::string> & get() const { return _argv; }
- private:
-   unsigned arange( int idx ) const { return idx < 0 ? 0 : std::min( unsigned(idx), _argv.size() ); }
- private:
-    DefaultIntegral<unsigned,0> _carg;
-    std::vector<std::string> _argv;
-};
-
-std::ostream & operator<<( std::ostream & str, const ArgList & obj )
-{
-  for_( it, 0U, obj.get().size() )
-  {
-    str << ( it == obj.carg() ? " | " : " " ) << obj.get()[it];
-  }
-  return str;
-}
-
-///////////////////////////////////////////////////////////////////
-#define DELGATE(N,F) if ( argv.at(0) == #N ) { argv.poparg(); F( argv ); return; }
-///////////////////////////////////////////////////////////////////
-
-void exitCmd( ArgList & argv )
-{
-  HEADL << argv << endl;
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::TmpLineWriter shutUp;
-  ::exit( 0 );
-}
-
-///////////////////////////////////////////////////////////////////
-
-void helpCmd( ArgList & argv )
-{
-  HEADL << argv << endl;
-  OUT << "list repos   - list repos in pool" << endl;
-  OUT << "list NAME... - list solvables named or providing NAME" << endl;
-  OUT << "help         - this" << endl;
-  OUT << "exit         - exit" << endl;
-}
-
-///////////////////////////////////////////////////////////////////
-
-void listReposCmd( ArgList & argv )
-{
-  HEADL << "list repos" << endl;
-
-  sat::Pool satpool( test.satpool() );
-  for_( it, satpool.reposBegin(), satpool.reposEnd() )
-  {
-    OUT << *it << endl;
-  }
-}
-
-void listIdent( IdString ident_r )
-{
-  HEADL << "list " << ident_r << endl;
-
-  ui::Selectable::Ptr sel( ui::Selectable::get( ident_r ) );
-  if ( sel )
-  {
-    OUT << sel->ident()
-        << " I" << sel->installedSize()
-        << " A" << sel->availableSize()
-        << " " << sel->status()
-        << endl;
-    for_( it, sel->installedBegin(), sel->installedEnd() )
-    {
-      OUT << "i " << *it << endl;
-    }
-    PoolItem cand( sel->candidateObj() );
-    for_( it, sel->availableBegin(), sel->availableEnd() )
-    {
-      OUT << (*it == cand ? "* " : "  ") << *it << endl;
-    }
-  }
-
-  {
-    sat::WhatProvides q( (Capability( ident_r.id() )) );
-    bool head = true;
-    for_( it, q.begin(), q.end() )
-    {
-      if ( it->ident() != ident_r )
-      {
-        if ( head )
-        {
-          OUT << "provided by:" << endl;
-          head = false;
-        }
-        OUT << "  " << PoolItem( *it ) << endl;
-      }
-    }
-  }
-}
-
-
-void listCmd( ArgList & argv )
-{
-  DELGATE( repos, listReposCmd );
-
-  for_( it, argv.begin(), argv.end() )
-  {
-    listIdent( IdString(*it) );
-  }
-}
-
-///////////////////////////////////////////////////////////////////
-
-void gocmd( ArgList & argv )
-{
-  if ( argv.empty() )
-  {
-    helpCmd( argv );
-    return;
-  }
-
-  switch ( argv[0][0] )
-  {
-    case 'e':
-      DELGATE( exit, exitCmd );
-      break;
-
-    case 'h':
-      DELGATE( help, helpCmd );
-      break;
-
-    case 'l':
-      DELGATE( list, listCmd );
-      break;
-  }
-  // no command fall back to list
-  listCmd( argv );
-}
-
-void goprompt()
-{
-  std::cin.tie( &std::cout );
-
-  do {
-    ArgList argv;
-    std::cout << "Hallo : ";
-    str::splitEscaped( iostr::getline( std::cin ), std::back_inserter(argv.get()) );
-    gocmd( argv );
-  } while ( true );
-
-}
-
-///////////////////////////////////////////////////////////////////
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-  appname = Pathname::basename( argv[0] );
-  --argc;
-  ++argv;
-  ///////////////////////////////////////////////////////////////////
-
-  if ( !argc )
-    return usage();
-
-  Pathname mtest( *argv );
-  --argc;
-  ++argv;
-
-  if ( ! PathInfo( mtest / "solver-test.xml" ).isFile() )
-  {
-    return usage( "No testcase at " + mtest.asString() );
-  }
-
-  ///////////////////////////////////////////////////////////////////
-
-  test.loadTestcaseRepos( mtest ); // <<< repos
-#define GOCMD(c) { ArgList argv( #c ); gocmd( argv ); }
-  GOCMD( tgt );
-  GOCMD( iscsitarget );
-  goprompt();
-
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::TmpLineWriter shutUp;
-  return 0;
-}
diff --git a/devel/devel.ma/Ex.cc b/devel/devel.ma/Ex.cc
deleted file mode 100644 (file)
index 915644c..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/base/PtrTypes.h>
-#include <zypp/base/Exception.h>
-#include <zypp/base/LogTools.h>
-#include <zypp/base/ProvideNumericId.h>
-#include <zypp/AutoDispose.h>
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/ResPoolProxy.h"
-
-#include "zypp/ZYppCallbacks.h"
-#include "zypp/NVRAD.h"
-#include "zypp/ResPool.h"
-#include "zypp/ResFilters.h"
-#include "zypp/Package.h"
-#include "zypp/Pattern.h"
-#include "zypp/Language.h"
-#include "zypp/Digest.h"
-#include "zypp/PackageKeyword.h"
-
-
-#include "zypp/parser/TagParser.h"
-#include "zypp/parser/susetags/PackagesFileReader.h"
-#include "zypp/parser/susetags/PackagesLangFileReader.h"
-#include "zypp/parser/susetags/PatternFileReader.h"
-#include "zypp/parser/susetags/ContentFileReader.h"
-#include "zypp/parser/susetags/RepoIndex.h"
-#include "zypp/parser/susetags/RepoParser.h"
-#include "zypp/cache/CacheStore.h"
-#include "zypp/RepoManager.h"
-#include "zypp/RepoInfo.h"
-
-#include "zypp/ui/PatchContents.h"
-#include "zypp/ResPoolProxy.h"
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::functor;
-using namespace zypp::ui;
-using zypp::parser::TagParser;
-
-///////////////////////////////////////////////////////////////////
-
-static const Pathname sysRoot( "/Local/GTEST" );
-
-///////////////////////////////////////////////////////////////////
-
-struct Xprint
-{
-  bool operator()( const PoolItem & obj_r )
-  {
-//     handle( asKind<Package>( obj_r ) );
-//     handle( asKind<Patch>( obj_r ) );
-//     handle( asKind<Pattern>( obj_r ) );
-//     handle( asKind<Product>( obj_r ) );
-    return true;
-  }
-
-  void handle( const Package_constPtr & p )
-  {
-    if ( !p )
-      return;
-  }
-
-  void handle( const Patch_constPtr & p )
-  {
-    if ( !p )
-      return;
-  }
-
-  void handle( const Pattern_constPtr & p )
-  {
-    if ( !p )
-      return;
-  }
-
-  void handle( const Product_constPtr & p )
-  {
-    if ( !p )
-      return;
-  }
-};
-
-///////////////////////////////////////////////////////////////////
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  //zypp::base::LogControl::instance().logfile( "log.restrict" );
-  INT << "===[START]==========================================" << endl;
-
-  setenv( "ZYPP_CONF", (sysRoot/"zypp.conf").c_str(), 1 );
-
-  RepoManager repoManager( makeRepoManager( sysRoot ) );
-  RepoInfoList repos = repoManager.knownRepositories();
-  SEC << "knownRepositories " << repos << endl;
-
-  if ( repos.empty() )
-  {
-    RepoInfo nrepo;
-    nrepo
-       .setAlias( "factorytest" )
-       .setName( "Test Repo for factory." )
-       .setEnabled( true )
-       .setAutorefresh( false )
-       .addBaseUrl( Url("http://dist.suse.de/install/stable-x86/") );
-
-    repoManager.addRepository( nrepo );
-    repos = repoManager.knownRepositories();
-  }
-
-  for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
-  {
-    RepoInfo & nrepo( *it );
-    if ( ! nrepo.enabled() )
-      continue;
-
-    SEC << "refreshMetadata" << endl;
-    repoManager.refreshMetadata( nrepo );
-
-    if ( ! repoManager.isCached( nrepo ) || 0 )
-    {
-      if ( repoManager.isCached( nrepo ) )
-      {
-       SEC << "cleanCache" << endl;
-       repoManager.cleanCache( nrepo );
-      }
-      SEC << "refreshMetadata" << endl;
-      repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
-      SEC << "buildCache" << endl;
-      repoManager.buildCache( nrepo );
-    }
-
-    SEC << nrepo << endl;
-    Repository nrep( repoManager.createFromCache( nrepo ) );
-    const zypp::ResStore & store( nrep.resolvables() );
-    dumpPoolStats( SEC << "Store: " << endl,
-                  store.begin(), store.end() ) << endl;
-    getZYpp()->addResolvables( store );
-  }
-
-  ResPool pool( getZYpp()->pool() );
-  vdumpPoolStats( USR << "Initial pool:" << endl,
-                 pool.begin(),
-                 pool.end() ) << endl;
-
-  if ( 0 )
-  {
-    {
-      //zypp::base::LogControl::TmpLineWriter shutUp;
-      getZYpp()->initTarget( sysRoot );
-    }
-    MIL << "Added target: " << pool << endl;
-  }
-
-  std::for_each( pool.begin(), pool.end(), Xprint() );
-
- ///////////////////////////////////////////////////////////////////
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::instance().logNothing();
-  return 0;
-}
diff --git a/devel/devel.ma/ExPure.cc b/devel/devel.ma/ExPure.cc
deleted file mode 100644 (file)
index 6b353a8..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-#include <libxml/xmlreader.h>
-
-#include <iostream>
-
-#include <zypp/base/LogControl.h>
-#include <zypp/base/LogTools.h>
-#include <zypp/base/Function.h>
-#include <zypp/base/GzStream.h>
-#include <zypp/parser/yum/YUMParser.h>
-#include <zypp/Pathname.h>
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::parser::yum;
-
-#include "zypp/parser/yum/YUMParser.h"
-
-///////////////////////////////////////////////////////////////////
-
-template<class _Cl>
-  void ti( const _Cl & c )
-  {
-    SEC << __PRETTY_FUNCTION__ << endl;
-  }
-///////////////////////////////////////////////////////////////////
-
-template<class _Parser>
-  bool consume( const typename _Parser::value_type & node_r )
-  {
-    //DBG << node_r << endl;
-    return true;
-  }
-
-template<class _Parser>
-  void parseXmlFile( const Pathname & file_r,
-                     function<bool(const typename _Parser::value_type &)> consume_r
-                     = consume<_Parser> )
-  {
-    Measure x( "    zparse "+file_r.asString() );
-    ifgzstream istr( file_r.asString().c_str() );
-    if ( ! istr )
-      {
-        ZYPP_THROW( Exception( "Bad stream" ) );
-      }
-
-    for( _Parser parser( istr, "" ); ! parser.atEnd(); ++parser )
-      {
-        if ( consume_r && ! consume_r( *parser ) )
-          {
-            DBG << "abort parseXmlFile " << file_r << endl;
-            return;
-          }
-      }
-  }
-
-bool consumeRepomd( const YUMRepomdParser::value_type & node_r )
-{
-  DBG << node_r << endl;
-  return true;
-}
-
-void zparse( const Pathname & repodata_r )
-{
-  Measure x( "ZPARSE" );
-  parseXmlFile<YUMRepomdParser>  ( repodata_r / "repomd.xml", consumeRepomd );
-  parseXmlFile<YUMPrimaryParser> ( repodata_r / "primary.xml" );
-  parseXmlFile<YUMOtherParser>   ( repodata_r / "other.xml" );
-  parseXmlFile<YUMFileListParser>( repodata_r / "filelists.xml" );
-  //parseXmlFile<YUMPatchesParser> ( repodata_r / "patches.xml" );
-}
-
-///////////////////////////////////////////////////////////////////
-
-/**
- * processNode:
- * @reader: the xmlReader
- *
- * Dump information about the current node
- */
-template<class _ParserValueType>
-static void
-processNode(xmlTextReaderPtr reader, const _ParserValueType & stp ) {
-    const xmlChar *name, *value;
-
-    name = xmlTextReaderConstName(reader);
-    if (name == NULL)
-       name = BAD_CAST "--";
-
-    value = xmlTextReaderConstValue(reader);
-    string t;
-    if ( value )
-      {
-        t = (const char *)value;
-      }
-    return;
-    printf("%d %d %s %d %d",
-           xmlTextReaderDepth(reader),
-           xmlTextReaderNodeType(reader),
-           name,
-           xmlTextReaderIsEmptyElement(reader),
-           xmlTextReaderHasValue(reader));
-    if (value == NULL)
-       printf("\n");
-    else {
-        if (xmlStrlen(value) > 40)
-            printf(" %.40s...\n", value);
-        else
-           printf(" %s\n", value);
-    }
-}
-
-
-/**
- * streamFile:
- * @filename: the file name to parse
- *
- * Parse and print information about an XML file.
- */
-template<class _Parser>
-static void
-streamFile(const char *filename) {
-    Measure x( string("    lparse ")+filename );
-    xmlTextReaderPtr reader;
-    int ret;
-
-    typename _Parser::value_type stp;
-
-    reader = xmlReaderForFile(filename, NULL, 0);
-    if (reader != NULL) {
-        ret = xmlTextReaderRead(reader);
-        while (ret == 1) {
-            stp = new typename _Parser::value_type::element_type;
-            processNode(reader, stp);
-            ret = xmlTextReaderRead(reader);
-        }
-        xmlFreeTextReader(reader);
-        if (ret != 0) {
-          ZYPP_THROW( Exception( string("Failed to parse ") + filename ) );
-        }
-    } else {
-      ZYPP_THROW( Exception( string("Unable to open ") + filename ) );
-    }
-}
-
-void lparse( const Pathname & repodata_r )
-{
-  Measure x( "LPARSE" );
-    /*
-     * this initialize the library and check potential ABI mismatches
-     * between the version it was compiled for and the actual shared
-     * library used.
-     */
-    LIBXML_TEST_VERSION
-
-    streamFile<YUMRepomdParser>  ( (repodata_r / "repomd.xml").asString().c_str() );
-    streamFile<YUMPrimaryParser> ( (repodata_r / "primary.xml").asString().c_str() );
-    streamFile<YUMOtherParser>   ( (repodata_r / "other.xml").asString().c_str() );
-    streamFile<YUMFileListParser>( (repodata_r / "filelists.xml").asString().c_str() );
-    //streamFile<YUMPatchesParser> ( (repodata_r / "patches.xml").asString().c_str() );
-
-    /*
-     * Cleanup function for the XML library.
-     */
-    xmlCleanupParser();
-
-    /*
-     * this is to debug memory for regression tests
-     */
-    xmlMemoryDump();
-}
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-
-  Pathname repodata( "/Local/PATCHES/repodata" );
-  repodata = "/Local/FACTORY/repodata";
-  lparse( repodata );
-  zparse( repodata );
-
-  INT << "===[END]============================================" << endl << endl;
-  return 0;
-}
-
index 4265f36..7471492 100644 (file)
@@ -23,7 +23,7 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //    CLASS NAME : ExplicitMap<_Key, _Tp>
+  //    CLASS NAME : ExplicitMap<TKey, Tp>
   //
   /** A simple lookup map using default value for not existing entries.
    *
@@ -33,17 +33,17 @@ namespace zypp
    * \ref TmpUnset and \ref TmpSetDefault are provided to temporarily
    * change and automaticlly restore values.
    */
-  template<class _Key, class _Tp>
+  template<class TKey, class Tp>
     class ExplicitMap
     {
     public:
-      typedef typename boost::call_traits<_Tp>::value_type       value_type;
-      typedef typename boost::call_traits<_Tp>::reference        reference;
-      typedef typename boost::call_traits<_Tp>::const_reference  const_reference;
-      typedef typename boost::call_traits<_Tp>::param_type       param_type;
+      typedef typename boost::call_traits<Tp>::value_type       value_type;
+      typedef typename boost::call_traits<Tp>::reference        reference;
+      typedef typename boost::call_traits<Tp>::const_reference  const_reference;
+      typedef typename boost::call_traits<Tp>::param_type       param_type;
 
     private:
-      typedef typename std::map<_Key,value_type> map_type;
+      typedef typename std::map<TKey,value_type> map_type;
       typedef typename map_type::iterator        iterator;
 
     public:
@@ -60,13 +60,13 @@ namespace zypp
       : _mapDefault( mapDefault_r )
       {}
 
-      template <class _InputIterator>
-        ExplicitMap( _InputIterator first_r, _InputIterator last_r )
+      template <class TInputIterator>
+        ExplicitMap( TInputIterator first_r, TInputIterator last_r )
         : _map( first_r, last_r )
         {}
 
-      template <class _InputIterator>
-        ExplicitMap( _InputIterator first_r, _InputIterator last_r,
+      template <class TInputIterator>
+        ExplicitMap( TInputIterator first_r, TInputIterator last_r,
                      param_type mapDefault_r )
         : _map( first_r, last_r )
         , _mapDefault( mapDefault_r )
@@ -110,8 +110,8 @@ namespace zypp
       void set( const key_type & key_r, param_type value_r )
       { _map[key_r] = value_r; }
 
-      template <typename _InputIterator>
-        void set( _InputIterator first_r, _InputIterator last_r )
+      template <typename TInputIterator>
+        void set( TInputIterator first_r, TInputIterator last_r )
         { _map.insert( first_r, last_r ); }
 
       void unset( const key_type & key_r )
@@ -133,11 +133,11 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //    CLASS NAME : ExplicitMap<_Key, _Tp>::TmpSet
+  //    CLASS NAME : ExplicitMap<TKey, Tp>::TmpSet
   //
   /** Temporarily set a value. */
-  template<class _Key, class _Tp>
-    class ExplicitMap<_Key, _Tp>::TmpSet
+  template<class TKey, class Tp>
+    class ExplicitMap<TKey, Tp>::TmpSet
     {
     public:
       TmpSet( ExplicitMap & map_r, const key_type & key_r, param_type value_r )
@@ -179,11 +179,11 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //    CLASS NAME : ExplicitMap<_Key, _Tp>::TmpUnset
+  //    CLASS NAME : ExplicitMap<TKey, Tp>::TmpUnset
   //
   /** Temporarily unset a value. */
-  template<class _Key, class _Tp>
-    class ExplicitMap<_Key, _Tp>::TmpUnset
+  template<class TKey, class Tp>
+    class ExplicitMap<TKey, Tp>::TmpUnset
     {
     public:
       TmpUnset( ExplicitMap & map_r, const key_type & key_r )
@@ -221,11 +221,11 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //    CLASS NAME : ExplicitMap<_Key, _Tp>::TmpSetDefault
+  //    CLASS NAME : ExplicitMap<TKey, Tp>::TmpSetDefault
   //
   /** Temporarily change the default value. */
-  template<class _Key, class _Tp>
-    class ExplicitMap<_Key, _Tp>::TmpSetDefault
+  template<class TKey, class Tp>
+    class ExplicitMap<TKey, Tp>::TmpSetDefault
     {
     public:
       TmpSetDefault( ExplicitMap & map_r, param_type value_r )
diff --git a/devel/devel.ma/FakePool.cc b/devel/devel.ma/FakePool.cc
deleted file mode 100644 (file)
index 3b0c10b..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#include "Tools.h"
-#include "Tools.h"
-
-#include <iostream>
-
-#include <zypp/base/LogControl.h>
-#include <zypp/base/LogTools.h>
-#include <zypp/base/String.h>
-#include <zypp/base/SerialNumber.h>
-#include <zypp/PathInfo.h>
-#include <zypp/TmpPath.h>
-#include "zypp/ResPoolProxy.h"
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::ui;
-
-bool chst( Selectable::Ptr & sel, Status status )
-{
-  DBG << "+++ " << sel << endl;
-  Status ostatus( sel->status() );
-  bool res = sel->set_status( status );
-  (res?MIL:WAR) << ostatus << " -> " << status << " ==>(" << res << ") " << sel->status() << endl;
-  DBG << "--- " << sel << endl;
-  return res;
-}
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-
-  const char *const lines[] = {
-    "@ package",
-    "@ installed",
-    "- foo 1 1 i686",
-    "@ available",
-    "- foo 2 1 i686",
-    "@ fin"
-  };
-
-  debug::addPool( lines, lines+(sizeof(lines)/sizeof(const char *const)) );
-
-  ResPool      pool( getZYpp()->pool() );
-  ResPoolProxy uipool( getZYpp()->poolProxy() );
-
-  USR << pool << endl;
-  USR << uipool << endl;
-
-  //for_each( pool.begin(), pool.end(), Print() );
-
-  Selectable::Ptr sel( *uipool.byKindBegin<Package>() );
-
-/*    enum Status
-    {
-      S_Protected,           // Keep this unmodified ( have installedObj && S_Protected )
-      S_Taboo,               // Keep this unmodified ( have no installedObj && S_Taboo)
-      // requested by user:
-      S_Del,                 // delete  installedObj ( clears S_Protected if set )
-      S_Update,              // install candidateObj ( have installedObj, clears S_Protected if set )
-      S_Install,             // install candidateObj ( have no installedObj, clears S_Taboo if set )
-      // not requested by user:
-      S_AutoDel,             // delete  installedObj
-      S_AutoUpdate,          // install candidateObj ( have installedObj )
-      S_AutoInstall,         // install candidateObj ( have no installedObj )
-      // no modification:
-      S_KeepInstalled,       // no modification      ( have installedObj && !S_Protected, clears S_Protected if set )
-      S_NoInst,              // no modification      ( have no installedObj && !S_Taboo, clears S_Taboo if set )
-    };
-*/
-  MIL << sel << endl;
-  chst( sel, ui::S_Update );
-  chst( sel, ui::S_Install );
-  chst( sel, ui::S_Protected );
-  chst( sel, ui::S_KeepInstalled );
-
-  INT << "===[END]============================================" << endl
-      << endl;
-  return 0;
-}
diff --git a/devel/devel.ma/FakePool.h b/devel/devel.ma/FakePool.h
deleted file mode 100644 (file)
index 30c2c57..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-#if 0
-#define FakePool_h
-
-#include <iostream>
-#include <vector>
-#include <string>
-
-#include "zypp/base/LogTools.h"
-#include "zypp/base/PtrTypes.h"
-#include "zypp/base/Algorithm.h"
-#include "zypp/base/Function.h"
-#include "zypp/base/Functional.h"
-#include "zypp/base/IOStream.h"
-#include "zypp/base/String.h"
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/ResPool.h"
-#include "zypp/ResPoolProxy.h"
-#include "zypp/CapFactory.h"
-
-#include "zypp/Atom.h"
-#include "zypp/Package.h"
-#include "zypp/SrcPackage.h"
-#include "zypp/Selection.h"
-#include "zypp/Pattern.h"
-#include "zypp/Product.h"
-#include "zypp/Patch.h"
-#include "zypp/Script.h"
-#include "zypp/Message.h"
-#include "zypp/Language.h"
-#include "zypp/VendorAttr.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace debug
-  { /////////////////////////////////////////////////////////////////
-
-    /**
-     * \code
-     * const char * data[] = {
-     * "@ product"
-     * ,"@ installed"
-     * ,"- prodold 1 1 x86_64"
-     * ,"@ available"
-     * ,"- prodnew 1 1 x86_64"
-     * ,"@ obsoletes"
-     * ,"prodold"
-     * ,"@ fin"
-     * };
-     * DataCollect dataCollect;
-     * for_each( data, data + ( sizeof(data) / sizeof(const char *) ),
-     * function<void(const string &)>( ref( dataCollect ) ) );
-     * \endcode
-    */
-    class DataCollect
-    {
-    public:
-      DataCollect( bool verbose_r = true )
-      : _definst( false )
-      , _defkind( ResKind::package )
-      , _defdep( Dep::PROVIDES )
-      , _defdepref( _defkind )
-      , _verbose( verbose_r )
-      {
-       VendorAttr::disableAutoProtect();
-      }
-
-      bool operator()( const std::string & line_r )
-      {
-       parseLine( str::trim( line_r ) );
-       return true;
-      }
-
-      const ResStore & installed() const
-      { return _installed; }
-
-      const ResStore & available() const
-      { return _available; }
-
-      template<class _Iterator>
-        void collect( _Iterator begin_r, _Iterator end_r )
-        {
-          for_each( begin_r, end_r,
-                    function<void(const std::string &)>( ref(*this) ) );
-        }
-
-    private:
-      struct Data
-      {
-        Data( bool inst_r, Resolvable::Kind kind_r, const std::vector<std::string> & words_r )
-        : _inst( inst_r )
-        , _kind( kind_r )
-        , _data( words_r[1], Edition( words_r[2], words_r[3] ), Arch( words_r[4] ) )
-        {}
-
-        bool             _inst;
-        Resolvable::Kind _kind;
-        NVRAD            _data;
-      };
-
-    private:
-      void parseLine( const std::string & line_r )
-      {
-       if ( line_r.empty() || line_r[0] == '#' )
-         return;
-
-       std::vector<std::string> words;
-        str::split( line_r, std::back_inserter( words ) );
-        if ( words.empty() )
-          return;
-
-        if ( words[0] == "@" )
-          {
-            if ( words.size() < 2 )
-              throw line_r;
-            if ( words[1] == "installed" )
-              _definst = true;
-            else if ( words[1] == "available" )
-              _definst = false;
-            else if ( words[1] == "fin" )
-              finalize();
-            else
-              {
-                try
-                  {
-                    _defdep = Dep( words[1] );
-                    if ( words.size() > 2 )
-                      _defdepref = Resolvable::Kind( words[2] );
-                  }
-                catch ( ... )
-                  {
-                    _defkind = _defdepref = Resolvable::Kind( words[1] );
-                  }
-                return;
-              }
-          }
-        else if ( words[0] == "-" )
-          {
-            if ( words.size() == 5 )
-              {
-                finalize();
-                _d.reset( new Data( _definst, _defkind, words ) );
-              }
-            else
-              {
-                throw words;
-              }
-          }
-        else
-          {
-            _d->_data[_defdep].insert( CapFactory().parse( _defdepref, line_r ) );
-          }
-      }
-
-      void finalize()
-      {
-        if ( _d )
-          {
-            ResObject::Ptr p;
-            if ( _d->_kind == ResKind::package )
-              p = make<Package>();
-            else if ( _d->_kind == ResKind::srcpackage )
-              p = make<SrcPackage>();
-            else if ( _d->_kind == ResTraits<Selection>::kind )
-              p = make<Selection>();
-            else if ( _d->_kind == ResKind::pattern )
-              p = make<Pattern>();
-            else if ( _d->_kind == ResKind::product )
-              p = make<Product>();
-            else if ( _d->_kind == ResKind::patch )
-              p = make<Patch>();
-            else if ( _d->_kind == ResTraits<Script>::kind )
-              p = make<Script>();
-            else if ( _d->_kind == ResTraits<Message>::kind )
-              p = make<Message>();
-            else if ( _d->_kind == ResTraits<Language>::kind )
-              p = make<Language>();
-            else if ( _d->_kind == ResTraits<Atom>::kind )
-              p = make<Atom>();
-            else
-              throw _d->_kind;
-
-            if ( _verbose )
-              {
-                _MIL("FakePool") << (_d->_inst?"i":"a") << " " << p << std::endl;
-                _DBG("FakePool") << p->deps() << std::endl;
-              }
-
-            (_d->_inst?_installed:_available).insert( p );
-            _d.reset();
-          }
-      }
-
-      template<class _Res>
-        ResObject::Ptr make()
-        {
-          typename detail::ResImplTraits<typename _Res::Impl>::Ptr impl;
-          return zypp::detail::makeResolvableAndImpl( _d->_data, impl );
-        }
-
-    private:
-      bool             _definst;
-      Resolvable::Kind _defkind;
-      Dep              _defdep;
-      Resolvable::Kind _defdepref;
-
-      bool             _verbose;
-
-      shared_ptr<Data> _d;
-
-      ResStore         _installed;
-      ResStore         _available;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /** \relates DataCollect Stream output. */
-    inline std::ostream & operator<<( std::ostream & str, const DataCollect & obj )
-    {
-      dumpRange( str << "Installed" << endl,
-                 obj.installed().begin(),
-                 obj.installed().end() ) << endl;
-      dumpRange( str << "Available:" << endl,
-                 obj.available().begin(),
-                 obj.available().end() ) << endl;
-      return str;
-    }
-
-    ///////////////////////////////////////////////////////////////////
-
-    template<class _Iterator>
-       inline void addPool( _Iterator begin_r, _Iterator end_r )
-    {
-      DataCollect dataCollect;
-      dataCollect.collect( begin_r, end_r );
-      getZYpp()->addResolvables( dataCollect.installed(), true );
-      getZYpp()->addResolvables( dataCollect.available() );
-    }
-
-    inline void addPool( const Pathname & file_r )
-    {
-      std::ifstream in( file_r.c_str() );
-      DataCollect dataCollect;
-      function<bool(const std::string &)> fnc( ref(dataCollect) );
-      iostr::forEachLine( in, fnc );
-      getZYpp()->addResolvables( dataCollect.installed(), true );
-      getZYpp()->addResolvables( dataCollect.available() );
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace debug
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // FakePool_h
diff --git a/devel/devel.ma/FilelistTransform.cc b/devel/devel.ma/FilelistTransform.cc
deleted file mode 100644 (file)
index 3a9ec5c..0000000
+++ /dev/null
@@ -1,780 +0,0 @@
-#include "Tools.h"
-#include <boost/call_traits.hpp>
-
-#include <iostream>
-#include <fstream>
-#include <map>
-
-#include <zypp/base/LogControl.h>
-#include <zypp/base/LogTools.h>
-
-#include "zypp/parser/xml/Reader.h"
-
-using namespace std;
-using namespace zypp;
-
-#include "zypp/base/Exception.h"
-#include "zypp/base/InputStream.h"
-#include "zypp/base/DefaultIntegral.h"
-#include <zypp/base/Function.h>
-#include <zypp/base/Iterator.h>
-#include <zypp/Pathname.h>
-#include <zypp/ExplicitMap.h>
-#include <zypp/Depository.h>
-#include <zypp/Edition.h>
-#include <zypp/CheckSum.h>
-#include <zypp/Date.h>
-
-///////////////////////////////////////////////////////////////////
-
-template<class _Cl>
-  void ti( const _Cl & c )
-  {
-    SEC << __PRETTY_FUNCTION__ << endl;
-  }
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{
-  namespace parser
-  {
-    namespace yum
-    {
-      ///////////////////////////////////////////////////////////////////
-
-      ///////////////////////////////////////////////////////////////////
-    }
-  }
-}
-///////////////////////////////////////////////////////////////////
-
-bool nopNode( xml::Reader & reader_r )
-{
-  return true;
-}
-
-bool accNode( xml::Reader & reader_r )
-{
-  int i;
-  xml::XmlString s;
-#define X(m) reader_r->m()
-      i=X(readState);
-      i=X(lineNumber);
-      i=X(columnNumber);
-      i=X(depth);
-      i=X(nodeType);
-      s=X(name);
-      s=X(prefix);
-      s=X(localName);
-      i=X(hasAttributes);
-      i=X(attributeCount);
-      i=X(hasValue);
-      s=X(value);
-#undef X
-      return true;
-}
-
-bool dumpNode( xml::Reader & reader_r )
-{
-  switch ( reader_r->nodeType() )
-    {
-    case XML_READER_TYPE_ATTRIBUTE:
-       DBG << *reader_r << endl;
-       break;
-    case XML_READER_TYPE_ELEMENT:
-       MIL << *reader_r << endl;
-       break;
-    default:
-       WAR << *reader_r << endl;
-       break;
-    }
-  return true;
-}
-
-bool dumpNode2( xml::Reader & reader_r )
-{
-  dumpNode( reader_r );
-  return reader_r.foreachNodeAttribute( dumpNode );
-}
-
-bool dumpEd( xml::Reader & reader_r )
-{
-  static int num = 5;
-  if ( reader_r->nodeType() == XML_READER_TYPE_ELEMENT
-       && reader_r->name() == "version" )
-    {
-      MIL << *reader_r << endl;
-      DBG << reader_r->getAttribute( "rel" ) << endl;
-      ERR << *reader_r << endl;
-      DBG << reader_r->getAttribute( "ver" ) << endl;
-      ERR << *reader_r << endl;
-      DBG << reader_r->getAttribute( "epoch" ) << endl;
-      ERR << *reader_r << endl;
-      WAR << Edition( reader_r->getAttribute( "ver" ).asString(),
-                      reader_r->getAttribute( "rel" ).asString(),
-                      reader_r->getAttribute( "epoch" ).asString() ) << endl;
-      --num;
-    }
-  return num;
-}
-
-
-///////////////////////////////////////////////////////////////////
-
-namespace parser
-{
-  namespace consume
-  {
-    struct Repomd
-    {
-      struct Data
-      {
-        Depository<std::string> _type;
-        Depository<CheckSum>    _checksum;
-        Depository<Date>        _timestamp;
-        Depository<CheckSum>    _openChecksum;
-      };
-
-      Depository<Data> _data;
-    };
-  }
-
-
-
-}
-
-namespace data
-{
-  struct Repomd
-  {
-    struct Data
-    {
-      std::string _type;
-      CheckSum    _checksum;
-      Date        _timestamp;
-      CheckSum    _openChecksum;
-    };
-
-    std::map<std::string, Data> _data;
-  };
-}
-
-///////////////////////////////////////////////////////////////////
-
-
-
-struct Element;
-std::ostream & operator<<( std::ostream & str, const Element & obj );
-
-struct Element : private base::NonCopyable
-{
-  Element( xml::Reader & reader_r )
-  : _reader( reader_r )
-  , _name( _reader->name().asString() )
-  , _depth( _reader->depth() )
-  {
-    MIL << *this << endl;
-    //return;
-    while( nextElement() )
-      {
-        Element el( _reader );
-      }
-  }
-
-  ~Element()
-  {
-    while( nextElement() )
-      { ; }
-    DBG << *this << endl;
-  }
-
-  bool atBegin() const
-  {
-    return ( _reader->depth() == _depth
-             && _reader->nodeType() == XML_READER_TYPE_ELEMENT
-             && _reader->name().c_str() == _name );
-  }
-
-  bool atEnd() const
-  {
-    return ( _reader->depth() == _depth
-             && ( _reader->nodeType() == XML_READER_TYPE_END_ELEMENT
-                  || ( _reader->nodeType() == XML_READER_TYPE_ELEMENT
-                       && _reader->isEmptyElement() ) )
-             && _reader->name().c_str() == _name );
-  }
-
-  bool nextElement()
-  {
-    while ( ! atEnd() )
-      {
-        if ( ! _reader.nextNode() )
-          return false;
-        if ( _reader->nodeType() == XML_READER_TYPE_ELEMENT )
-          return true;
-        WAR << *_reader << endl;
-      }
-    return false;
-  }
-
-
-  xml::Reader & _reader;
-  std::string   _name;
-  int           _depth;
-};
-
-std::ostream & operator<<( std::ostream & str, const Element & obj )
-{
-  str << ( obj.atBegin() ? 'B' : '_' )
-      << ( obj.atEnd() ? 'E' : '_' )
-      << obj._depth << ":" <<  std::string( obj._depth, ' ') << obj._name
-      << " {" << *obj._reader << '}';
-  return str;
-}
-
-bool dumpEl( xml::Reader & reader_r )
-{
-  Element el( reader_r );
-  return true;
-}
-
-void parse2( const InputStream & file_r )
-{
-  Measure x( file_r.name() );
-  try
-    {
-      MIL << file_r << endl;
-      xml::Reader r( file_r );
-      MIL << *r << endl;
-      Element el( r );
-      MIL << *r << endl;
-    }
-  catch ( const Exception & )
-    {
-    }
-}
-///////////////////////////////////////////////////////////////////
-class BasicParser
-{
-  public:
-    typedef function<void( xml::Reader & )>   Consumer;
-    typedef ExplicitMap<std::string,Consumer> ConsumerMap;
-
-    BasicParser( const InputStream & file_r )
-    : _reader( file_r )
-    , _cmap( nop )
-    {}
-
-  public:
-    xml::Reader & reader()
-    { return _reader; }
-
-    const xml::Reader & reader() const
-    { return _reader; }
-
-    ConsumerMap & cmap()
-    { return _cmap; }
-
-    const ConsumerMap & cmap() const
-    { return _cmap; }
-
-  public:
-
-    bool parse( xml::Reader & reader_r )
-    {
-      switch ( reader_r->nodeType() )
-        {
-        case XML_READER_TYPE_ELEMENT:
-        case XML_READER_TYPE_TEXT:
-        case XML_READER_TYPE_CDATA:
-        case XML_READER_TYPE_END_ELEMENT:
-          consume( reader_r );
-        default:
-          ;
-        }
-      return true;
-    }
-
-  public:
-    void consume( xml::Reader & reader_r, const std::string & key_r )
-    { _cmap[key_r]( reader_r ); }
-
-    void consume( xml::Reader & reader_r )
-    { consume( reader_r, reader_r->name().asString() ); }
-
-    void consume()
-    { consume( _reader ); }
-
-  public:
-    static void nop( xml::Reader & reader_r )
-    { ; }
-
-    static void log( xml::Reader & reader_r )
-    { DBG << "NOP " << *reader_r << endl; }
-
-
-  protected:
-    xml::Reader _reader;
-    ConsumerMap _cmap;
-};
-
-///////////////////////////////////////////////////////////////////
-
-struct RepomdParser : private BasicParser
-{
-  RepomdParser( const InputStream & file_r )
-  : BasicParser( file_r )
-  {
-    reader().foreachNode( ref(*this) );
-  }
-
-  bool operator()( xml::Reader & reader_r )
-  {
-    return parse( reader_r );
-  }
-
-  // READER goes here!
-};
-
-///////////////////////////////////////////////////////////////////
-struct Consume
-{
-  struct Entry
-  {
-    Pathname _location;
-    CheckSum _checksum;
-    //unused: Date     _timestamp;
-    //unused: CheckSum _openChecksum;
-  };
-
-  typedef void (Consume::*Consumer)( xml::Reader & reader_r );
-
-  Consume( const InputStream & file_r )
-  : _reader( file_r )
-  , _consume( &Consume::nop )
-  , _centry( NULL )
-  {
-    _consume.set( "data", &Consume::data );
-    _reader.foreachNode( ref(*this) );
-  }
-
-  bool operator()( xml::Reader & reader_r )
-  {
-    switch ( reader_r->nodeType() )
-      {
-      case XML_READER_TYPE_ELEMENT:
-        (this->*_consume[reader_r->name().asString()])( reader_r );
-        //data( reader_r );
-        break;
-      default:
-        WAR << *_reader << endl;
-        break;
-      }
-    return true;
-  }
-
-  void nop( xml::Reader & reader_r )
-  { ; }
-
-  void log( xml::Reader & reader_r )
-  { DBG << "NOP " << *_reader << endl; }
-
-  void data( xml::Reader & reader_r )
-  {
-    MIL << *_reader << endl;
-    _result[reader_r->name().asString()] = Entry();
-  }
-
-
-
-  xml::Reader _reader;
-  ExplicitMap<std::string,Consumer> _consume;
-  std::map<std::string,Entry> _result;
-  Entry * _centry;
-};
-
-std::ostream & operator<<( std::ostream & str, const Consume & obj )
-{
-  return str;
-}
-
-std::ostream & operator<<( std::ostream & str, const Consume::Entry & obj )
-{
-  return str << "Entry";
-}
-
-void parse( const InputStream & file_r )
-{
-  Measure x( file_r.name() );
-  try
-    {
-      MIL << file_r << endl;
-      RepomdParser a( file_r );
-      //WAR << a._result << endl;
-    }
-  catch ( const Exception & )
-    {
-    }
-}
-
-struct Test
-{
-  struct Mix
-  {
-    Mix()
-    : a( 0 )
-    {}
-
-    void seta( int v )
-    { a = v; }
-
-    void setb( const string & v )
-    { b = v; }
-
-    int    a;
-    string b;
-   };
-
-  Test()
-  : a( 0 )
-  {}
-
-  int    a;
-  string b;
-  Mix    c;
-};
-
-std::ostream & operator<<( std::ostream & str, const Test & obj )
-{
-  return str << "Test(" << obj.a << '|' << obj.b
-             << '|' << obj.c.a << '|' << obj.c.b << ')';
-}
-
-struct Transform
-{
-  Transform()
-  : outfile( "susedu.xml", std::ios_base::out )
-  {}
-
-  static const bool indented = !false;
-  static const bool shorttags = !true;
-  std::fstream outfile;
-
-  bool operator()( xml::Reader & reader_r )
-  {
-    switch ( reader_r->nodeType() )
-      {
-      case XML_READER_TYPE_ELEMENT:
-        process( reader_r, true );
-        break;
-      case XML_READER_TYPE_END_ELEMENT:
-        process( reader_r, false );
-        break;
-      default:
-        //WAR << *reader_r << endl;
-        break;
-      }
-    return true;
-  }
-
-  struct File
-  {
-    std::string name;
-    std::string type;
-
-    bool operator<( const File & rhs ) const
-    { return( name < rhs.name ); }
-  };
-
-  struct Package
-  {
-    std::string    pkgid;
-    std::string    name;
-    std::string    epoch;
-    std::string    ver;
-    std::string    rel;
-    std::string    arch;
-    std::set<File> files;
-  };
-
-  shared_ptr<Package> pkg;
-
-  void process( xml::Reader & reader_r, bool open_r )
-  {
-    if ( reader_r->name() == "file" )
-      {
-        if ( open_r )
-          addFile( reader_r );
-      }
-    else if ( reader_r->name() == "version" )
-      {
-        if ( open_r )
-          addVersion( reader_r );
-      }
-    else if ( reader_r->name() == "package" )
-      {
-        if ( open_r )
-          startPackage( reader_r );
-        else
-          endPackage();
-      }
-    else if ( reader_r->name() == "filelists" )
-      {
-        DBG << *reader_r << endl;
-        if ( open_r )
-          {
-            DBG << outfile << endl;
-            outfile << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
-            outfile << "<susedu>" << endl;
-          }
-        else
-          {
-            outfile << "</susedu>" << endl;
-            outfile.close();
-          }
-      }
-    else
-      {
-        throw;
-      }
-  }
-
-  void startPackage( xml::Reader & reader_r )
-  {
-    endPackage();
-    pkg.reset( new Package );
-    pkg->pkgid = reader_r->getAttribute( "pkgid" ).asString();
-    pkg->name = reader_r->getAttribute( "name" ).asString();
-    pkg->arch = reader_r->getAttribute( "arch" ).asString();
-  }
-
-  void addVersion( xml::Reader & reader_r )
-  {
-    pkg->epoch = reader_r->getAttribute( "epoch" ).asString();
-    pkg->ver = reader_r->getAttribute( "ver" ).asString();
-    pkg->rel = reader_r->getAttribute( "rel" ).asString();
-  }
-
-  void addFile( xml::Reader & reader_r )
-  {
-    File f;
-    f.type = reader_r->getAttribute( "type" ).asString();
-    for( reader_r.nextNode();
-         reader_r->nodeType() != XML_READER_TYPE_END_ELEMENT;
-         reader_r.nextNode() )
-      {
-        if ( reader_r->nodeType() == XML_READER_TYPE_TEXT )
-          {
-            f.name = reader_r->value().asString();
-          }
-      }
-    pkg->files.insert( f );
-  }
-
-  void endPackage()
-  {
-    if ( pkg )
-      {
-        writePackage( outfile );
-        pkg.reset();
-      }
-  }
-
-  static std::ostream & putAttr( std::ostream & stream_r,
-                                 const std::string & tag_r,
-                                 const std::string & value_r )
-  {
-    if ( value_r.empty() || tag_r.empty() )
-      return stream_r;
-    return stream_r
-           << str::form( " %s=\"%s\"", tag_r.c_str(), value_r.c_str() );
-  }
-
-  void writePackage( std::ostream & stream_r )
-  {
-    stream_r << " <package";
-    putAttr( stream_r, "pkgid", pkg->pkgid );
-    putAttr( stream_r, "name", pkg->name );
-    putAttr( stream_r, "arch", pkg->arch );
-    stream_r << ">\n";
-
-    stream_r << "  <version";
-    putAttr( stream_r, "epoch", pkg->epoch );
-    putAttr( stream_r, "ver", pkg->ver );
-    putAttr( stream_r, "rel", pkg->rel );
-    stream_r << "/>\n";
-
-    writePackageFiles2( stream_r );
-
-    stream_r << " </package>\n";
-  }
-
-  void writePackageFiles( std::ostream & stream_r )
-  {
-    for ( std::set<File>::const_iterator it = pkg->files.begin();
-          it != pkg->files.end(); ++it )
-      {
-        stream_r << "   <file";
-        putAttr( stream_r, "type", it->type );
-        stream_r << ">" << it->name << "</file>\n";
-      }
-  }
-
-  struct Fnode
-  {
-    Fnode( const std::string & name_r )
-    : name( name_r )
-    , entry( NULL )
-    {}
-
-    std::string             name;
-    mutable const File *    entry;
-    mutable std::set<Fnode> children;
-
-    const Fnode * add( const std::string & sub_r ) const
-    {
-      std::set<Fnode>::iterator i = children.find( sub_r );
-      if ( i != children.end() )
-        return &(*i);
-      return &(*(children.insert( Fnode( sub_r ) ).first));
-    }
-
-    void dump( std::ostream & stream_r, const std::string & pname, unsigned level ) const
-    {
-      std::string tname;
-      if ( pname.empty() )
-        {
-          tname = name;
-        }
-      else if ( pname == "/" )
-        {
-          tname = pname+name;
-        }
-      else
-        {
-          tname = pname+"/"+name;
-        }
-
-      if ( children.size() == 1 )
-        {
-          children.begin()->dump( stream_r, tname, (indented?level:0) );
-          return;
-        }
-
-      std::string tag;
-      stream_r << std::string( level, ' ' );
-
-      if ( entry )
-        {
-          tag = (shorttags ? "f" : "file");
-          stream_r << "<" << tag;
-          putAttr( stream_r, (shorttags ? "t" : "type"), entry->type );
-          putAttr( stream_r, (shorttags ? "n" : "name"), tname );
-        }
-      else
-        {
-          tag = (shorttags ? "b" : "base");
-          stream_r << "<" << tag;
-          putAttr( stream_r, (shorttags ? "n" : "name"), tname );
-        }
-
-      if ( children.empty() )
-        {
-          stream_r << "/>" << (indented?"\n":"");
-        }
-      else
-        {
-          stream_r << ">" << (indented?"\n":"");
-          for ( std::set<Fnode>::const_iterator it = children.begin();
-                it != children.end(); ++it )
-            {
-              it->dump( stream_r, "", (indented?level+1:0) );
-            }
-          stream_r << std::string( level, ' ' ) << "</" << tag << ">" << (indented?"\n":"");
-        }
-    }
-
-    bool operator<( const Fnode & rhs ) const
-    { return( name < rhs.name ); }
-  };
-
-  void writePackageFiles2( std::ostream & stream_r )
-  {
-    Fnode root( "" );
-    for ( std::set<File>::const_iterator it = pkg->files.begin();
-          it != pkg->files.end(); ++it )
-      {
-        std::list<std::string> words;
-        str::split( it->name, std::back_inserter(words), "/" );
-
-        const Fnode * c = &root;
-        for ( std::list<std::string>::const_iterator w = words.begin();
-              w != words.end(); ++w )
-          {
-            c = c->add( *w );
-          }
-        c->entry = &(*it);
-      }
-    root.dump( stream_r, "/", (indented?3:0) );
-  }
-
-};
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  INT << "===[START]==========================================" << endl;
-  {
-    Measure x;
-    Pathname repodata( "/Local/PATCHES/repodata" );
-    //repodata = "/Local/FACTORY/repodata";
-    xml::Reader reader( repodata/"filelists.xml" );
-    Transform t;
-    reader.foreachNode( ref(t) );
-  }
-  INT << "===[END]============================================" << endl << endl;
-  return 0;
-  int s;
-
-  Pathname repodata( "/Local/PATCHES/repodata" );
-  //repodata = "/Local/FACTORY/repodata";
-  InputStream x ( "/Local/PATCHES/repodata" );
-  parse2( repodata/"repomd.xml" );
-  //parse2( repodata/"primary.xml" );
-
-  INT << "===[END]============================================" << endl << endl;
-  return 0;
-  {
-    Measure x;
-    for ( int i = 1; i; --i )
-      {
-        parse( repodata/"repomd.xml" );
-        parse( repodata/"primary.xml" );
-        parse( repodata/"filelists.xml" );
-        parse( repodata/"other.xml" );
-      }
-  }
-  ERR << "done..." << endl;
-  cin >> s;
-  return 0;
-  {
-    Measure x;
-    for ( int i = 20; i; --i )
-      {
-        parse( (repodata/"repomd.xml").asString() );
-        parse( repodata/"primary.xml" );
-        parse( repodata/"filelists.xml" );
-        parse( repodata/"other.xml" );
-      }
-  }
-  ERR << "done..." << endl;
-  cin >> s;
-
-  INT << "===[END]============================================" << endl << endl;
-  return 0;
-}
-
index c1adcbf..7477184 100644 (file)
@@ -33,8 +33,8 @@ namespace zypp
    * runTasks( tasks, 10 );
    * \endcode
    */
-  template <class _Function>
-  void runTasks( const std::vector<_Function>& tasks, size_t threadCount = 1 )
+  template <class TFunction>
+  void runTasks( const std::vector<TFunction>& tasks, size_t threadCount = 1 )
   {
     if ( threadCount )
     {
index 24bd198..24629a6 100644 (file)
@@ -102,15 +102,15 @@ ManagedFile repoProvidePackage( const PoolItem & pi )
 
 namespace zypp
 {
-  template <class _LIterator, class _RIterator, class _Function>
-      inline int invokeOnEach( _LIterator lbegin_r, _LIterator lend_r,
-                               _RIterator rbegin_r, _RIterator rend_r,
-                               _Function fnc_r )
+  template <class TLIterator, class TRIterator, class TFunction>
+      inline int invokeOnEach( TLIterator lbegin_r, TLIterator lend_r,
+                               TRIterator rbegin_r, TRIterator rend_r,
+                               TFunction fnc_r )
       {
         int cnt = 0;
-        for ( _LIterator lit = lbegin_r; lit != lend_r; ++lit )
+        for ( TLIterator lit = lbegin_r; lit != lend_r; ++lit )
         {
-          for ( _RIterator rit = rbegin_r; rit != rend_r; ++rit )
+          for ( TRIterator rit = rbegin_r; rit != rend_r; ++rit )
           {
             ++cnt;
             if ( ! fnc_r( *lit, *rit ) )
@@ -121,23 +121,6 @@ namespace zypp
       }
 }
 
-
-void dbgDu( Selectable::Ptr sel )
-{
-  if ( sel->installedObj() )
-  {
-    DBG << "i: " << sel->installedObj() << endl
-        << sel->installedObj()->diskusage() << endl;
-  }
-  if ( sel->candidateObj() )
-  {
-    DBG << "c: " << sel->candidateObj() << endl
-        << sel->candidateObj()->diskusage() << endl;
-  }
-  INT << sel << endl
-      << getZYpp()->diskUsage() << endl;
-}
-
 ///////////////////////////////////////////////////////////////////
 
 std::ostream & testDump( std::ostream & str, const PoolItem & pi )
@@ -323,8 +306,8 @@ struct MediaChangeReceive : public callback::ReceiveReport<media::MediaChangeRep
 
 namespace container
 {
-  template<class _Tp>
-    bool isIn( const std::set<_Tp> & cont, const typename std::set<_Tp>::value_type & val )
+  template<class Tp>
+    bool isIn( const std::set<Tp> & cont, const typename std::set<Tp>::value_type & val )
     { return cont.find( val ) != cont.end(); }
 }
 ///////////////////////////////////////////////////////////////////
@@ -356,38 +339,38 @@ namespace zypp
 {
 namespace filter
 {
-  template <class _MemFun, class _Value>
+  template <class TMemFun, class TValue>
   class HasValue
   {
     public:
-      HasValue( _MemFun fun_r, _Value val_r )
+      HasValue( TMemFun fun_r, TValue val_r )
       : _fun( fun_r ), _val( val_r )
       {}
-      template <class _Tp>
-      bool operator()( const _Tp & obj_r ) const
+      template <class Tp>
+      bool operator()( const Tp & obj_r ) const
       { return( _fun && (obj_r.*_fun)() == _val ); }
     private:
-      _MemFun _fun;
-      _Value  _val;
+      TMemFun _fun;
+      TValue  _val;
   };
 
-  template <class _MemFun, class _Value>
-  HasValue<_MemFun, _Value> byValue( _MemFun fun_r, _Value val_r )
-  { return HasValue<_MemFun, _Value>( fun_r, val_r ); }
+  template <class TMemFun, class TValue>
+  HasValue<TMemFun, TValue> byValue( TMemFun fun_r, TValue val_r )
+  { return HasValue<TMemFun, TValue>( fun_r, val_r ); }
 }
 
 }
 
 template <class L>
-struct _TestO { _TestO( const L & lhs ) : _lhs( lhs ) {} const L & _lhs; };
+struct TestO { TestO( const L & lhs ) : _lhs( lhs ) {} const L & _lhs; };
 
 template <class L>
-std::ostream & operator<<( std::ostream & str, const _TestO<L> & obj )
+std::ostream & operator<<( std::ostream & str, const TestO<L> & obj )
 { const L & lhs( obj._lhs); return str << (lhs?'_':'*') << (lhs.empty()?'e':'_') << "'" << lhs << "'"; }
 
 template <class L>
-_TestO<L> testO( const L & lhs )
-{ return _TestO<L>( lhs ); }
+TestO<L> testO( const L & lhs )
+{ return TestO<L>( lhs ); }
 
 template <class L, class R>
 void testCMP( const L & lhs, const R & rhs )
@@ -408,7 +391,7 @@ void testCMP( const L & lhs, const R & rhs )
 
 inline bool useRepo( RepoInfo & repo )
 {
-  return repo.alias()  == "matest";
+  //return repo.alias()  == "matest";
   return repo.enabled();
 }
 
index 8644aa7..56ec913 100644 (file)
@@ -86,7 +86,7 @@ try {
   ResPool   pool( ResPool::instance() );
   sat::Pool satpool( sat::Pool::instance() );
   ///////////////////////////////////////////////////////////////////
-  dumpRange( WAR << "satpool.multiversion " , satpool.multiversionBegin(), satpool.multiversionEnd() ) << endl;
+  dumpRange( WAR << "satpool.multiversion " , satpool.multiversion().begin(), satpool.multiversion().end() ) << endl;
   TestSetup::LoadSystemAt( sysRoot, Arch_i586 );
   ///////////////////////////////////////////////////////////////////
 
index a8cf123..76b13ff 100644 (file)
@@ -12,6 +12,7 @@
 #include <zypp/base/InputStream.h>
 #include <zypp/base/ProvideNumericId.h>
 #include <zypp/base/Flags.h>
+#include <zypp/base/StrMatcher.h>
 #include <zypp/AutoDispose.h>
 
 #include "zypp/ResPoolProxy.h"
@@ -38,7 +39,6 @@
 #include "zypp/sat/Pool.h"
 #include "zypp/sat/LocaleSupport.h"
 #include "zypp/sat/LookupAttr.h"
-#include "zypp/sat/AttrMatcher.h"
 #include "zypp/sat/SolvableSet.h"
 #include "zypp/sat/SolvIterMixin.h"
 #include "zypp/sat/detail/PoolImpl.h"
@@ -109,15 +109,15 @@ ManagedFile repoProvidePackage( const PoolItem & pi )
 
 namespace zypp
 {
-  template <class _LIterator, class _RIterator, class _Function>
-      inline int invokeOnEach( _LIterator lbegin_r, _LIterator lend_r,
-                               _RIterator rbegin_r, _RIterator rend_r,
-                               _Function fnc_r )
+  template <class TLIterator, class TRIterator, class TFunction>
+      inline int invokeOnEach( TLIterator lbegin_r, TLIterator lend_r,
+                               TRIterator rbegin_r, TRIterator rend_r,
+                               TFunction fnc_r )
       {
         int cnt = 0;
-        for ( _LIterator lit = lbegin_r; lit != lend_r; ++lit )
+        for ( TLIterator lit = lbegin_r; lit != lend_r; ++lit )
         {
-          for ( _RIterator rit = rbegin_r; rit != rend_r; ++rit )
+          for ( TRIterator rit = rbegin_r; rit != rend_r; ++rit )
           {
             ++cnt;
             if ( ! fnc_r( *lit, *rit ) )
@@ -129,22 +129,6 @@ namespace zypp
 }
 
 
-void dbgDu( Selectable::Ptr sel )
-{
-  if ( sel->installedObj() )
-  {
-    DBG << "i: " << sel->installedObj() << endl
-        << sel->installedObj()->diskusage() << endl;
-  }
-  if ( sel->candidateObj() )
-  {
-    DBG << "c: " << sel->candidateObj() << endl
-        << sel->candidateObj()->diskusage() << endl;
-  }
-  INT << sel << endl
-      << getZYpp()->diskUsage() << endl;
-}
-
 ///////////////////////////////////////////////////////////////////
 
 std::ostream & testDump( std::ostream & str, const PoolItem & pi )
@@ -329,8 +313,8 @@ struct MediaChangeReceive : public callback::ReceiveReport<media::MediaChangeRep
 
 namespace container
 {
-  template<class _Tp>
-    bool isIn( const std::set<_Tp> & cont, const typename std::set<_Tp>::value_type & val )
+  template<class Tp>
+    bool isIn( const std::set<Tp> & cont, const typename std::set<Tp>::value_type & val )
     { return cont.find( val ) != cont.end(); }
 }
 ///////////////////////////////////////////////////////////////////
@@ -362,38 +346,38 @@ namespace zypp
 {
 namespace filter
 {
-  template <class _MemFun, class _Value>
+  template <class TMemFun, class TValue>
   class HasValue
   {
     public:
-      HasValue( _MemFun fun_r, _Value val_r )
+      HasValue( TMemFun fun_r, TValue val_r )
       : _fun( fun_r ), _val( val_r )
       {}
-      template <class _Tp>
-      bool operator()( const _Tp & obj_r ) const
+      template <class Tp>
+      bool operator()( const Tp & obj_r ) const
       { return( _fun && (obj_r.*_fun)() == _val ); }
     private:
-      _MemFun _fun;
-      _Value  _val;
+      TMemFun _fun;
+      TValue  _val;
   };
 
-  template <class _MemFun, class _Value>
-  HasValue<_MemFun, _Value> byValue( _MemFun fun_r, _Value val_r )
-  { return HasValue<_MemFun, _Value>( fun_r, val_r ); }
+  template <class TMemFun, class TValue>
+  HasValue<TMemFun, TValue> byValue( TMemFun fun_r, TValue val_r )
+  { return HasValue<TMemFun, TValue>( fun_r, val_r ); }
 }
 
 }
 
 template <class L>
-struct _TestO { _TestO( const L & lhs ) : _lhs( lhs ) {} const L & _lhs; };
+struct TestO { TestO( const L & lhs ) : _lhs( lhs ) {} const L & _lhs; };
 
 template <class L>
-std::ostream & operator<<( std::ostream & str, const _TestO<L> & obj )
+std::ostream & operator<<( std::ostream & str, const TestO<L> & obj )
 { const L & lhs( obj._lhs); return str << (lhs?'_':'*') << (lhs.empty()?'e':'_') << "'" << lhs << "'"; }
 
 template <class L>
-_TestO<L> testO( const L & lhs )
-{ return _TestO<L>( lhs ); }
+TestO<L> testO( const L & lhs )
+{ return TestO<L>( lhs ); }
 
 template <class L, class R>
 void testCMP( const L & lhs, const R & rhs )
@@ -459,7 +443,7 @@ void cut( const Capability & cap )
   }
   else
   {
-    MIL << "---???---" << endl;
+    MIL << "--- ??? ---" << endl;
   }
 }
 
diff --git a/devel/devel.ma/Parse.cc b/devel/devel.ma/Parse.cc
deleted file mode 100644 (file)
index c9e1a49..0000000
+++ /dev/null
@@ -1,483 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/base/PtrTypes.h>
-#include <zypp/base/Exception.h>
-#include <zypp/base/LogTools.h>
-#include <zypp/base/ProvideNumericId.h>
-#include <zypp/AutoDispose.h>
-
-#include "zypp/ZYppFactory.h"
-#include "zypp/ResPoolProxy.h"
-
-#include "zypp/ZYppCallbacks.h"
-#include "zypp/NVRAD.h"
-#include "zypp/ResPool.h"
-#include "zypp/ResFilters.h"
-#include "zypp/Package.h"
-#include "zypp/Pattern.h"
-#include "zypp/Language.h"
-#include "zypp/Digest.h"
-#include "zypp/PackageKeyword.h"
-#include "zypp/ManagedFile.h"
-
-
-#include "zypp/parser/TagParser.h"
-#include "zypp/parser/susetags/PackagesFileReader.h"
-#include "zypp/parser/susetags/PackagesLangFileReader.h"
-#include "zypp/parser/susetags/PatternFileReader.h"
-#include "zypp/parser/susetags/ContentFileReader.h"
-#include "zypp/parser/susetags/RepoIndex.h"
-#include "zypp/parser/susetags/RepoParser.h"
-#include "zypp/cache/CacheStore.h"
-#include "zypp/RepoManager.h"
-#include "zypp/RepoInfo.h"
-
-#include "zypp/repo/DeltaCandidates.h"
-#include "zypp/repo/PackageProvider.h"
-#include "zypp/repo/SrcPackageProvider.h"
-
-#include "zypp/ui/PatchContents.h"
-#include "zypp/ResPoolProxy.h"
-
-using namespace std;
-using namespace zypp;
-using namespace zypp::functor;
-using namespace zypp::ui;
-using zypp::parser::TagParser;
-
-///////////////////////////////////////////////////////////////////
-
-static const Pathname sysRoot( "/Local/ROOT" );
-
-///////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-bool queryInstalledEditionHelper( const std::string & name_r,
-                                  const Edition &     ed_r,
-                                  const Arch &        arch_r )
-{
-  if ( ed_r == Edition::noedition )
-    return true;
-  if ( name_r == "kernel-default" && ed_r == Edition("2.6.22.5-10") )
-    return true;
-  if ( name_r == "update-test-affects-package-manager" && ed_r == Edition("1.1-6") )
-    return true;
-
-  return false;
-}
-
-
-ManagedFile repoProvidePackage( const PoolItem & pi )
-{
-  ResPool _pool( getZYpp()->pool() );
-  repo::RepoMediaAccess _access;
-
-  // Redirect PackageProvider queries for installed editions
-  // (in case of patch/delta rpm processing) to rpmDb.
-  repo::PackageProviderPolicy packageProviderPolicy;
-  packageProviderPolicy.queryInstalledCB( queryInstalledEditionHelper );
-
-  Package::constPtr p = asKind<Package>(pi.resolvable());
-
-  // Build a repository list for repos
-  // contributing to the pool
-  repo::DeltaCandidates deltas( repo::makeDeltaCandidates( _pool.knownRepositoriesBegin(),
-                                                           _pool.knownRepositoriesEnd() ) );
-  repo::PackageProvider pkgProvider( _access, p, deltas, packageProviderPolicy );
-  return pkgProvider.providePackage();
-}
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-
-void dbgDu( Selectable::Ptr sel )
-{
-  if ( sel->installedPoolItem() )
-  {
-    DBG << "i: " << sel->installedPoolItem() << endl
-        << sel->installedPoolItem()->diskusage() << endl;
-  }
-  if ( sel->candidatePoolItem() )
-  {
-    DBG << "c: " << sel->candidatePoolItem() << endl
-        << sel->candidatePoolItem()->diskusage() << endl;
-  }
-  INT << sel << endl
-      << getZYpp()->diskUsage() << endl;
-}
-
-///////////////////////////////////////////////////////////////////
-
-struct Xprint
-{
-  bool operator()( const PoolItem & obj_r )
-  {
-    if ( obj_r.status().isLocked() )
-      SEC << obj_r << endl;
-
-//     handle( asKind<Package>( obj_r ) );
-//     handle( asKind<Patch>( obj_r ) );
-//     handle( asKind<Pattern>( obj_r ) );
-//     handle( asKind<Product>( obj_r ) );
-    return true;
-  }
-
-  void handle( const Package_constPtr & p )
-  {
-    if ( !p )
-      return;
-
-    WAR << p->size() << endl;
-    MIL << p->diskusage() << endl;
-  }
-
-  void handle( const Patch_constPtr & p )
-  {
-    if ( !p )
-      return;
-  }
-
-  void handle( const Pattern_constPtr & p )
-  {
-    if ( !p )
-      return;
-
-    if ( p->vendor().empty() )
-      ERR << p << endl;
-    else if ( p->vendor() == "SUSE (assumed)" )
-      SEC << p << endl;
-  }
-
-  void handle( const Product_constPtr & p )
-  {
-    if ( !p )
-      return;
-
-    USR << p << endl;
-    USR << p->vendor() << endl;
-    USR << p->type() << endl;
-  }
-
-  template<class _C>
-  bool operator()( const _C & obj_r )
-  {
-    return true;
-  }
-};
-
-///////////////////////////////////////////////////////////////////
-struct SetTransactValue
-{
-  SetTransactValue( ResStatus::TransactValue newVal_r, ResStatus::TransactByValue causer_r )
-  : _newVal( newVal_r )
-  , _causer( causer_r )
-  {}
-
-  ResStatus::TransactValue   _newVal;
-  ResStatus::TransactByValue _causer;
-
-  bool operator()( const PoolItem & pi ) const
-  {
-    bool ret = pi.status().setTransactValue( _newVal, _causer );
-    if ( ! ret )
-      ERR << _newVal <<  _causer << " " << pi << endl;
-    return ret;
-  }
-};
-
-struct StatusReset : public SetTransactValue
-{
-  StatusReset()
-  : SetTransactValue( ResStatus::KEEP_STATE, ResStatus::USER )
-  {}
-};
-
-struct StatusInstall : public SetTransactValue
-{
-  StatusInstall()
-  : SetTransactValue( ResStatus::TRANSACT, ResStatus::USER )
-  {}
-};
-
-///////////////////////////////////////////////////////////////////
-
-bool solve( bool establish = false )
-{
-  if ( establish )
-  {
-    bool eres = false;
-    {
-      zypp::base::LogControl::TmpLineWriter shutUp;
-      eres = getZYpp()->resolver()->establishPool();
-    }
-    if ( ! eres )
-    {
-      ERR << "establish " << eres << endl;
-      return false;
-    }
-    MIL << "establish " << eres << endl;
-  }
-
-  bool rres = false;
-  {
-    zypp::base::LogControl::TmpLineWriter shutUp;
-    rres = getZYpp()->resolver()->resolvePool();
-  }
-  if ( ! rres )
-  {
-    ERR << "resolve " << rres << endl;
-    return false;
-  }
-  MIL << "resolve " << rres << endl;
-  return true;
-}
-
-bool install()
-{
-  SEC << getZYpp()->commit( ZYppCommitPolicy() ) << endl;
-  return true;
-}
-
-///////////////////////////////////////////////////////////////////
-
-struct ConvertDbReceive : public callback::ReceiveReport<target::ScriptResolvableReport>
-{
-  virtual void start( const Resolvable::constPtr & script_r,
-                      const Pathname & path_r,
-                      Task task_r )
-  {
-    SEC << __FUNCTION__ << endl
-    << "  " << script_r << endl
-    << "  " << path_r   << endl
-    << "  " << task_r   << endl;
-  }
-
-  virtual bool progress( Notify notify_r, const std::string & text_r )
-  {
-    SEC << __FUNCTION__ << endl
-    << "  " << notify_r << endl
-    << "  " << text_r   << endl;
-    return true;
-  }
-
-  virtual void problem( const std::string & description_r )
-  {
-    SEC << __FUNCTION__ << endl
-    << "  " << description_r << endl;
-  }
-
-  virtual void finish()
-  {
-    SEC << __FUNCTION__ << endl;
-  }
-
-};
-///////////////////////////////////////////////////////////////////
-
-struct DigestReceive : public callback::ReceiveReport<DigestReport>
-{
-  DigestReceive()
-  {
-    connect();
-  }
-
-  virtual bool askUserToAcceptNoDigest( const zypp::Pathname &file )
-  {
-    USR << endl;
-    return false;
-  }
-  virtual bool askUserToAccepUnknownDigest( const Pathname &file, const std::string &name )
-  {
-    USR << endl;
-    return false;
-  }
-  virtual bool askUserToAcceptWrongDigest( const Pathname &file, const std::string &requested, const std::string &found )
-  {
-    USR << "fle " << PathInfo(file) << endl;
-    USR << "req " << requested << endl;
-    USR << "fnd " << found << endl;
-
-    waitForInput();
-
-    return false;
-  }
-};
-
-struct KeyRingSignalsReceive : public callback::ReceiveReport<KeyRingSignals>
-{
-  KeyRingSignalsReceive()
-  {
-    connect();
-  }
-  virtual void trustedKeyAdded( const PublicKey &/*key*/ )
-  {
-    USR << endl;
-  }
-  virtual void trustedKeyRemoved( const PublicKey &/*key*/ )
-  {
-    USR << endl;
-  }
-};
-
-///////////////////////////////////////////////////////////////////
-
-struct MediaChangeReceive : public callback::ReceiveReport<media::MediaChangeReport>
-{
-  virtual Action requestMedia( Url & source
-                               , unsigned mediumNr
-                               , Error error
-                               , const std::string & description )
-  {
-    SEC << __FUNCTION__ << endl
-    << "  " << source << endl
-    << "  " << mediumNr << endl
-    << "  " << error << endl
-    << "  " << description << endl;
-    return IGNORE;
-  }
-};
-
-///////////////////////////////////////////////////////////////////
-
-namespace container
-{
-  template<class _Tp>
-    bool isIn( const std::set<_Tp> & cont, const typename std::set<_Tp>::value_type & val )
-    { return cont.find( val ) != cont.end(); }
-}
-
-///////////////////////////////////////////////////////////////////
-
-struct AddResolvables
-{
-  bool operator()( const Repository & src ) const
-  {
-    getZYpp()->addResolvables( src.resolvables() );
-    return true;
-  }
-};
-
-///////////////////////////////////////////////////////////////////
-
-
-std::ostream & operator<<( std::ostream & str, const iostr::EachLine & obj )
-{
-  str << "(" << obj.valid() << ")[" << obj.lineNo() << "|" << obj.lineStart() << "]{" << *obj << "}";
-  return str;
-
-}
-
-///////////////////////////////////////////////////////////////////
-
-#define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG; IT != END; ++IT )
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-
-  void Vtst( const std::string & lhs, const std::string & rhs )
-  {
-    (VendorAttr::instance().equivalent( lhs, rhs )?MIL:ERR) << lhs << " <==> "<< rhs << endl;
-
-  }
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-
-using namespace zypp;
-
-void tt( std::string dd )
-{
-  unsigned level = 3;
-  std::string::size_type pos = dd.find( "/" );
-  while ( --level && pos != std::string::npos )
-  {
-    pos = dd.find( "/", pos+1 );
-  }
-  if ( pos != std::string::npos )
-    dd.erase( pos+1 );
-  DBG << dd << "\t" << level << " " << pos << endl;
-}
-
-/******************************************************************
-**
-**      FUNCTION NAME : main
-**      FUNCTION TYPE : int
-*/
-int main( int argc, char * argv[] )
-{
-  //zypp::base::LogControl::instance().logfile( "log.restrict" );
-  INT << "===[START]==========================================" << endl;
-  setenv( "ZYPP_CONF", "/Local/ROOT/zypp.conf", 1 );
-
-  DigestReceive foo;
-  KeyRingSignalsReceive baa;
-
-  RepoManager repoManager( makeRepoManager( "/Local/ROOT" ) );
-
-  RepoInfoList repos = repoManager.knownRepositories();
-  SEC << "/Local/ROOT " << repos << endl;
-
-  for ( RepoInfoList::iterator it = repos.begin(); it != repos.end(); ++it )
-  {
-    RepoInfo & nrepo( *it );
-    if ( ! nrepo.enabled() )
-      continue;
-
-    if ( ! repoManager.isCached( nrepo ) || 0 )
-    {
-      if ( repoManager.isCached( nrepo ) )
-      {
-       SEC << "cleanCache" << endl;
-       repoManager.cleanCache( nrepo );
-      }
-      SEC << "refreshMetadata" << endl;
-      //repoManager.refreshMetadata( nrepo, RepoManager::RefreshForced );
-      repoManager.refreshMetadata( nrepo );
-      SEC << "buildCache" << endl;
-      repoManager.buildCache( nrepo );
-    }
-
-    SEC << nrepo << endl;
-    Repository nrep( repoManager.createFromCache( nrepo ) );
-    const zypp::ResStore & store( nrep.resolvables() );
-
-    dumpPoolStats( SEC << "Store: " << endl,
-                  store.begin(), store.end() ) << endl;
-    getZYpp()->addResolvables( store );
-  }
-
-  ResPool pool( getZYpp()->pool() );
-  USR << "pool: " << pool << endl;
-  SEC << pool.knownRepositoriesSize() << endl;
-
-  if ( 0 )
-  {
-    {
-      zypp::base::LogControl::TmpLineWriter shutUp;
-      //getZYpp()->initTarget( sysRoot );
-      getZYpp()->initTarget( "/" );
-    }
-    MIL << "Added target: " << pool << endl;
-  }
-
-
-  //std::for_each( pool.begin(), pool.end(), Xprint() );
-
-  PoolItem pi = getPi<Patch>( "fetchmsttfonts.sh" );
-  USR << pi << endl;
-
-  //pi.status().setTransact( true, ResStatus::USER );
-  //install();
-
- ///////////////////////////////////////////////////////////////////
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::instance().logNothing();
-  return 0;
-}
-
index e15e7f1..4e42a55 100644 (file)
@@ -18,17 +18,17 @@ using std::endl;
 
 struct Print
 {
-  template<class _Tp>
-    bool operator()( const _Tp & val_r ) const
+  template<class Tp>
+    bool operator()( const Tp & val_r ) const
     { USR << val_r << endl; return true; }
 };
 
 ///////////////////////////////////////////////////////////////////
 
-template<class _Tp>
-  struct PrintOn : public std::unary_function<_Tp, bool>
+template<class Tp>
+  struct PrintOn : public std::unary_function<Tp, bool>
   {
-    bool operator()( const _Tp & obj ) const
+    bool operator()( const Tp & obj ) const
     {
       if ( _leadNL )
         _str << std::endl << _prfx << obj;
index 1012ba0..759e448 100644 (file)
@@ -20,7 +20,7 @@ using std::endl;
 using namespace zypp;
 
 #undef MIL
-#define MIL MilSync( _BASEFILE, __FUNCTION__, __LINE__ )._str
+#define MIL MilSync( L_BASEFILE, __FUNCTION__, __LINE__ )._str
 
 #ifdef _REENTRANT
 #warning _REENTRANT
index f67a8a4..10e5122 100644 (file)
@@ -8,9 +8,6 @@
 #include <map>
 #include <set>
 
-#include "Printing.h"
-#include "FakePool.h"
-
 #define INCLUDE_TESTSETUP_WITHOUT_BOOST
 #include "zypp/../tests/lib/TestSetup.h"
 #undef  INCLUDE_TESTSETUP_WITHOUT_BOOST
@@ -77,27 +74,27 @@ void mksrc( const std::string & url, const std::string & alias, RepoManager & re
 
 ///////////////////////////////////////////////////////////////////
 //
-template<class _Condition>
+template<class TCondition>
   struct SetTrue
   {
-    SetTrue( _Condition cond_r )
+    SetTrue( TCondition cond_r )
     : _cond( cond_r )
     {}
 
-    template<class _Tp>
-      bool operator()( _Tp t ) const
+    template<class Tp>
+      bool operator()( Tp t ) const
       {
         _cond( t );
         return true;
       }
 
-    _Condition _cond;
+    TCondition _cond;
   };
 
-template<class _Condition>
-  inline SetTrue<_Condition> setTrue_c( _Condition cond_r )
+template<class TCondition>
+  inline SetTrue<TCondition> setTrue_c( TCondition cond_r )
   {
-    return SetTrue<_Condition>( cond_r );
+    return SetTrue<TCondition>( cond_r );
   }
 
 struct PrintPoolItem
@@ -106,9 +103,9 @@ struct PrintPoolItem
   { USR << pi << endl; }
 };
 
-template <class _Iterator>
+template <class TIterator>
   std::ostream & vdumpPoolStats( std::ostream & str,
-                                 _Iterator begin_r, _Iterator end_r )
+                                 TIterator begin_r, TIterator end_r )
   {
     pool::PoolStats stats;
     std::for_each( begin_r, end_r,
@@ -125,8 +122,8 @@ template <class _Iterator>
 
 typedef zypp::pool::PoolStats Rstats;
 
-template<class _Iterator>
-  void rstats( _Iterator begin, _Iterator end )
+template<class TIterator>
+  void rstats( TIterator begin, TIterator end )
   {
     DBG << __PRETTY_FUNCTION__ << endl;
     Rstats stats;
@@ -134,8 +131,8 @@ template<class _Iterator>
     MIL << stats << endl;
   }
 
-template<class _Container>
-  void rstats( const _Container & c )
+template<class TContainer>
+  void rstats( const TContainer & c )
   {
     rstats( c.begin(), c.end() );
   }
@@ -150,11 +147,11 @@ inline RepoManager makeRepoManager( const Pathname & mgrdir_r )
 
 ///////////////////////////////////////////////////////////////////
 
-template<class _Res>
+template<class TRes>
 ui::Selectable::Ptr getSel( const std::string & name_r )
 {
   ResPoolProxy uipool( getZYpp()->poolProxy() );
-  for_(it, uipool.byKindBegin<_Res>(), uipool.byKindEnd<_Res>() )
+  for_(it, uipool.byKindBegin<TRes>(), uipool.byKindEnd<TRes>() )
   {
     if ( (*it)->name() == name_r )
       return (*it);
@@ -164,12 +161,12 @@ ui::Selectable::Ptr getSel( const std::string & name_r )
 
 
 
-template<class _Res>
+template<class TRes>
 PoolItem getPi( const std::string & alias_r, const std::string & name_r, const Edition & ed_r, const Arch & arch_r )
 {
   PoolItem ret;
   ResPool pool( getZYpp()->pool() );
-  for_(it, pool.byIdentBegin<_Res>(name_r), pool.byIdentEnd<_Res>(name_r) )
+  for_(it, pool.byIdentBegin<TRes>(name_r), pool.byIdentEnd<TRes>(name_r) )
   {
     if (    ( ed_r.empty()    || ed_r.match((*it)->edition()) == 0 )
          && ( arch_r.empty()  || arch_r == (*it)->arch()  )
@@ -192,25 +189,25 @@ PoolItem getPi( const std::string & alias_r, const std::string & name_r, const E
   }
   return ret;
 }
-template<class _Res>
+template<class TRes>
 PoolItem getPi( const std::string & name_r, const Edition & ed_r, const Arch & arch_r )
 {
-  return getPi<_Res>( "", name_r, ed_r, arch_r );
+  return getPi<TRes>( "", name_r, ed_r, arch_r );
 }
-template<class _Res>
+template<class TRes>
 PoolItem getPi( const std::string & name_r )
 {
-  return getPi<_Res>( name_r, Edition(), Arch_empty );
+  return getPi<TRes>( name_r, Edition(), Arch_empty );
 }
-template<class _Res>
+template<class TRes>
 PoolItem getPi( const std::string & name_r, const Edition & ed_r )
 {
-  return getPi<_Res>( name_r, ed_r, Arch_empty );
+  return getPi<TRes>( name_r, ed_r, Arch_empty );
 }
-template<class _Res>
+template<class TRes>
 PoolItem getPi( const std::string & name_r, const Arch & arch_r )
 {
-  return getPi<_Res>( name_r, Edition(), arch_r );
+  return getPi<TRes>( name_r, Edition(), arch_r );
 }
 
 ///////////////////////////////////////////////////////////////////
diff --git a/devel/devel.ma/TransList.cc b/devel/devel.ma/TransList.cc
deleted file mode 100644 (file)
index e644a34..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/PoolQuery.h>
-#include <zypp/target/rpm/librpmDb.h>
-#include <zypp/parser/ProductFileReader.h>
-
-#include "zypp/sat/WhatObsoletes.h"
-#include "zypp/ExternalProgram.h"
-#include <zypp/ZYppCallbacks.h>
-
-#include "zypp/sat/Transaction.h"
-
-///////////////////////////////////////////////////////////////////
-
-//static const Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") : "/Local/ROOT" );
-//static const Pathname sysRoot( "/tmp/ToolScanRepos" );
-// static const Pathname sysRoot( "/tmp/updateTestcase" );
-static const Pathname sysRoot( "/tmp/ToolScanRepos" );
-
-///////////////////////////////////////////////////////////////////
-struct IRR : public zypp::callback::ReceiveReport<zypp::target::rpm::InstallResolvableReport>
-{
-  IRR()
-  { connect(); }
-#if 0
-  enum Action {
-    ABORT,  // abort and return error
-    RETRY,     // retry
-    IGNORE     // ignore the failure
-  };
-
-  enum Error {
-    NO_ERROR,
-    NOT_FOUND,         // the requested Url was not found
-    IO,                // IO error
-    INVALID            // th resolvable is invalid
-  };
-
-        // the level of RPM pushing
-  /** \deprecated We fortunately no longer do 3 attempts. */
-  enum RpmLevel {
-    RPM,
-    RPM_NODEPS,
-    RPM_NODEPS_FORCE
-  };
-#endif
-
-  virtual void reportbegin()
-  { /*SEC << endl;*/ }
-  virtual void reportend()
-  { /*SEC << endl;*/ }
-
-  virtual void start(Resolvable::constPtr /*resolvable*/)
-  { INT << endl; }
-
-  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
-  {
-    static int i = 4;
-    if ( --i <= 0 )
-    {
-      INT << "return abort" << endl;
-      return false;
-    }
-    return true;
-  }
-
-  virtual Action problem(Resolvable::constPtr /*resolvable*/, Error /*error*/, const std::string &/*description*/, RpmLevel /*level*/)
-  {
-    INT << "return abort" << endl;
-    return ABORT;
-  }
-
-  virtual void finish(Resolvable::constPtr /*resolvable*/, Error /*error*/, const std::string &/*reason*/, RpmLevel /*level*/)
-  { INT << endl; }
-};
-
-struct RRR : public zypp::callback::ReceiveReport<zypp::target::rpm::RemoveResolvableReport>
-{
-  RRR()
-  { connect(); }
-#if 0
-  enum Action {
-    ABORT,  // abort and return error
-    RETRY,     // retry
-    IGNORE     // ignore the failure
-  };
-
-  enum Error {
-    NO_ERROR,
-    NOT_FOUND,         // the requested Url was not found
-    IO,                // IO error
-    INVALID            // th resolvable is invalid
-  };
-#endif
-
-  virtual void reportbegin()
-  { /*SEC << endl;*/ }
-  virtual void reportend()
-  { /*SEC << endl;*/ }
-
-  virtual void start( Resolvable::constPtr /*resolvable*/ )
-  { INT << endl; }
-
-  virtual bool progress(int /*value*/, Resolvable::constPtr /*resolvable*/)
-  { INT << endl; return true; }
-
-  virtual Action problem( Resolvable::constPtr /*resolvable*/ , Error /*error*/ , const std::string &/*description*/ )
-  { INT << endl; return ABORT; }
-
-  virtual void finish( Resolvable::constPtr /*resolvable*/ , Error /*error*/ , const std::string &/*reason*/ )
-  { INT << endl; }
-};
-
-
-bool solve()
-{
-  bool rres = false;
-  {
-    //zypp::base::LogControl::TmpLineWriter shutUp;
-    //getZYpp()->resolver()->setOnlyRequires( true );
-    rres = getZYpp()->resolver()->resolvePool();
-  }
-  if ( ! rres )
-  {
-    ERR << "resolve " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  MIL << "resolve " << rres << endl;
-  return true;
-}
-
-bool upgrade()
-{
-  bool rres = false;
-  {
-    zypp::base::LogControl::TmpLineWriter shutUp;
-    Measure x( "Upgrade" );
-    rres = getZYpp()->resolver()->doUpgrade();
-  }
-  if ( ! rres )
-  {
-    Measure x( "Upgrade Error" );
-    ERR << "upgrade " << rres << endl;
-    getZYpp()->resolver()->problems();
-    return false;
-  }
-  MIL << "upgrade " << rres << endl;
-  return true;
-}
-
-bool install()
-{
-  ZYppCommitPolicy pol;
-  //pol.dryRun( true );
-  pol.downloadMode( DownloadAsNeeded );
-  pol.rpmInstFlags( pol.rpmInstFlags().setFlag( target::rpm::RPMINST_JUSTDB ) );
-  ZYppCommitResult res( getZYpp()->commit( pol ) );
-  SEC << res << endl;
-  MIL << res.transactionStepList() << endl;
-  return true;
-}
-
-///////////////////////////////////////////////////////////////////
-
-template <class _Iter>
-unsigned count( _Iter begin, _Iter end )
-{
-  unsigned cnt = 0;
-  for_( it, begin, end )
-    ++cnt;
-  return cnt;
-}
-
-///////////////////////////////////////////////////////////////////
-int main( int argc, char * argv[] )
-try {
-  --argc;
-  ++argv;
-  zypp::base::LogControl::instance().logToStdErr();
-  INT << "===[START]==========================================" << endl;
-  ///////////////////////////////////////////////////////////////////
-  IRR _irr;
-  RRR _rrr;
-  if ( sysRoot == "/" )
-    ::unsetenv( "ZYPP_CONF" );
-
-  sat::Transaction();
-  const sat::Transaction a;
-  sat::Transaction b;
-  sat::Transaction c( a );
-  b = a;
-
-  ResPool   pool( ResPool::instance() );
-  sat::Pool satpool( sat::Pool::instance() );
-  ///////////////////////////////////////////////////////////////////
-  dumpRange( WAR << "satpool.multiversion " , satpool.multiversionBegin(), satpool.multiversionEnd() ) << endl;
-  TestSetup::LoadSystemAt( sysRoot, Arch_i586 );
-  getZYpp()->initializeTarget( sysRoot );
-
-  ///////////////////////////////////////////////////////////////////
-
-  if ( 1 )
-  {
-    getPi<Product>( "openSUSE-CD-retail" ).status().setToBeInstalled( ResStatus::USER );
-    getPi<Pattern>( "devel_qt4" ).status().setToBeInstalled( ResStatus::USER );
-//     getPi<Pattern>( "devel_qt4" ).status().setToBeInstalled( ResStatus::USER );
-    solve();
-    sat::Transaction trans( pool.resolver().getTransaction() );
-    trans.order();
-
-    USR << count( trans.actionBegin(), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(sat::Transaction::STEP_TODO), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(sat::Transaction::STEP_DONE), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(sat::Transaction::STEP_ERROR), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(sat::Transaction::STEP_TODO|sat::Transaction::STEP_ERROR), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(~sat::Transaction::STEP_ERROR), trans.actionEnd() ) << endl;
-    USR << count( trans.actionBegin(~sat::Transaction::STEP_TODO), trans.actionEnd() ) << endl;
-
-    //install();
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //  ResPoolProxy selpool( pool.proxy() );
-  if ( 0 )
-  {
-    upgrade();
-    install();
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::instance().logNothing();
-  return 0;
-}
-catch ( const Exception & exp )
-{
-  INT << exp << endl << exp.historyAsString();
-}
-catch (...)
-{}
-
index 07d06ef..eab52b6 100644 (file)
@@ -20,7 +20,7 @@ using zypp::debug::Measure;
 ///////////////////////////////////////////////////////////////////
 
 /** Helper to detect an objects type. */
-template<class _Cl> void ti( const _Cl & c )
+template<class TCl> void ti( const TCl & c )
 {
   SEC << __PRETTY_FUNCTION__ << endl;
 }
diff --git a/devel/devel.ma/defstr.txt b/devel/devel.ma/defstr.txt
deleted file mode 100644 (file)
index 1e98f8b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-0      <NULL>
-1      
-2      solvable:name
-3      solvable:arch
-4      solvable:evr
-5      solvable:vendor
-6      solvable:provides
-7      solvable:obsoletes
-8      solvable:conflicts
-9      solvable:requires
-10     solvable:recommends
-11     solvable:suggests
-12     solvable:supplements
-13     solvable:enhances
-14     solvable:freshens
-15     rpm:dbid
-16     solvable:prereqmarker
-17     solvable:filemarker
-18     namespace:installed
-19     namespace:modalias
-20     system:system
-21     src
-22     nosrc
-23     noarch
-24     <NULL>
-25     <NULL>
-26     <NULL>
-27     <NULL>
-28     <NULL>
-29     <NULL>
-
diff --git a/devel/devel.ma/iorderbug.pool b/devel/devel.ma/iorderbug.pool
deleted file mode 100644 (file)
index 8ea0574..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-@ package
-@ installed
-
-- readline 1 1 i686
-
-- bash 1 1 i686
-@ requires
-readline = 1
-
-- fontcfg 1 1 i686
-@ prerequires
-bash
-
-@ available
-
-- readline 2 1 i686
-
-- bash 2 1 i686
-@ requires
-readline = 2
-
-- fontcfg 2 1 i686
-#@ prerequires
-#bash
-filesystem()
-filesystem(sdfa)
-
-@ fin
diff --git a/devel/devel.ma/main.cc b/devel/devel.ma/main.cc
deleted file mode 100644 (file)
index 948d73f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "Tools.h"
-
-#include <zypp/ResPool.h>
-#include <zypp/ResObjects.h>
-#include <zypp/PoolQuery.h>
-
-#include <zypp/misc/CheckAccessDeleted.h>
-
-///////////////////////////////////////////////////////////////////
-
-Pathname sysRoot( getenv("SYSROOT") ? getenv("SYSROOT") : "/Local/ROOT" );
-
-///////////////////////////////////////////////////////////////////
-
-int main( int argc, char * argv[] )
-try {
-  --argc;
-  ++argv;
-  zypp::base::LogControl::instance().logToStdErr();
-  INT << "===[START]==========================================" << endl;
-  if ( argc )
-  {
-    unsetenv("SYSROOT");
-    sysRoot = Pathname(*argv);
-    setenv( "ZYPP_CONF", (sysRoot/"etc/zypp.conf").c_str(), true );
-  }
-  ZConfig::instance();
-  //TestSetup::LoadSystemAt( sysRoot );
-  ///////////////////////////////////////////////////////////////////
-  ResPool   pool( ResPool::instance() );
-  sat::Pool satpool( sat::Pool::instance() );
-  ///////////////////////////////////////////////////////////////////
-  dumpRange( USR, satpool.reposBegin(), satpool.reposEnd() ) << endl;
-  USR << "pool: " << pool << endl;
-  ///////////////////////////////////////////////////////////////////
-
-  {
-    Measure x("x");
-    CheckAccessDeleted checker;
-    USR << checker << endl;
-  }
-  SEC << CheckAccessDeleted::findService( "syslog" ) << endl;
-  SEC << CheckAccessDeleted::findService( "syslogd" ) << endl;
-  SEC << CheckAccessDeleted::findService( "ssh" ) << endl;
-  SEC << CheckAccessDeleted::findService( "sshd" ) << endl;
-  SEC << CheckAccessDeleted::findService( 3844 ) << endl;
-  ///////////////////////////////////////////////////////////////////
-  INT << "===[END]============================================" << endl << endl;
-  zypp::base::LogControl::instance().logNothing();
-  return 0;
-}
-catch ( const Exception & exp )
-{
-  INT << exp << endl << exp.historyAsString();
-}
-catch (...)
-{}
-
index cd7ed67..9ededb5 100644 (file)
@@ -41,12 +41,12 @@ inline std::ostream & operator<<( std::ostream & str, const Resolvable & res )
 ///////////////////////////////////////////////////////////////////
 
 // connect resolvables interface and implementation.
-template<class _Res>
-  struct ResImplConnect : public _Res
+template<class TRes>
+  struct ResImplConnect : public TRes
   {
   public:
     typedef ResImplConnect               Self;
-    typedef typename _Res::Impl          Impl;
+    typedef typename TRes::Impl          Impl;
     typedef zypp::base::shared_ptr<Impl> ImplPtr;
     typedef zypp::base::intrusive_ptr<Self>       Ptr;
     typedef zypp::base::intrusive_ptr<const Self> constPtr;
@@ -62,12 +62,12 @@ template<class _Res>
   };
 
 
-template<class _Impl>
-  typename _Impl::ResType::Ptr
-  makeResolvable( /*NVRA*/ zypp::base::shared_ptr<_Impl> & impl_r )
+template<class TImpl>
+  typename TImpl::ResType::Ptr
+  makeResolvable( /*NVRA*/ zypp::base::shared_ptr<TImpl> & impl_r )
   {
-    impl_r.reset( new _Impl );
-    return new ResImplConnect<typename _Impl::ResType>( /*NVRA*/ impl_r );
+    impl_r.reset( new TImpl );
+    return new ResImplConnect<typename TImpl::ResType>( /*NVRA*/ impl_r );
   }
 
 ///////////////////////////////////////////////////////////////////
@@ -90,7 +90,7 @@ struct ObjectImpl
   virtual ~ObjectImpl() {};
 
   private:
-    template<class _Res>
+    template<class TRes>
       friend class ResImpl;
     Resolvable * _backRef;
 };
diff --git a/doc/autoinclude/ApplicationMetada.doc b/doc/autoinclude/ApplicationMetada.doc
new file mode 100644 (file)
index 0000000..871365e
--- /dev/null
@@ -0,0 +1,88 @@
+/**
+
+\page zypp--appdata Code 12 Application Metadata
+
+\author Michael Andres <ma@suse.de>
+
+<HR><!-- ====================================================================== -->
+
+\section zypp-appdata_intro Intro
+
+Since Code12 we support \c application as new kind of resolvable object (see e.g. http://worldofgnome.org/gnome-software-on-opensuse). This is short abstract about how a \c package and it's associated \c application are connected metadata wise.
+
+\code
+# zypper download virt-manager
+...
+Retrieving package virt-manager-1.2.1-8.1.noarch            (1/1), 354.8 KiB (  2.6 MiB unpacked)
+(1/1) /var/cache/zypp/packages/server/suse/noarch/virt-manager-1.2.1-8.1.noarch.rpm .......[done]
+\endcode
+\code
+# rpm -qplv /var/cache/zypp/packages/server/suse/noarch/virt-manager-1.2.1-8.1.noarch.rpm | grep /usr/share/appdata
+-rw-r--r--   1 root root   1119 Sep 18 09:47 /usr/share/appdata/virt-manager.appdata.xml
+\endcode
+
+The <tt>package:virt-manager</tt> provides \c application metadata in its file <tt>/usr/share/appdata/virt-manager.appdata.xml</tt>. After installation the presence of <tt>/usr/share/appdata/virt-manager.appdata.xml</tt> indicates the installed <tt>application:'Virtual Machine Manager'</tt>. The connection is provided by the <tt>package:virt-manager</tt> \c appdata provides...
+
+\code
+# zypp-NameReqPrv -D virt-manager
+...
+(976)virt-manager-1.2.1-8.1.noarch(@System)
+ PROVIDES (5){
+  application()
+  appdata()
+  appdata(virt-manager.appdata.xml)
+          ^^^^^^^^^^^^
+\endcode
+
+...matching the content of \c /usr/share/appdata/virt-manager.appdata.xml:
+
+\code
+# less /usr/share/appdata/virt-manager.appdata.xml
+<application>
+ <id type="desktop">virt-manager.desktop</id>
+  ^^                ^^^^^^^^^^^^
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <name>Virtual Machine Manager</name>
+\endcode
+
+To establish this connection for uninstalled \c package/application pairs, the repository metadata must provide the \c appdata.xml files for the included packages. This is done in for \c susetags repos in \c suse/setup/descr/appdata.xml.gz, for \c rpmmd in <tt>repodata/CHCKSUM-appdata.xml.gz</tt>.
+
+
+\section zypp-appdata_wrong_appdata Missing or wrong appdata
+
+\code
+# zypper se -s -t application 'Virtual Machine Manager'
+...
+S | Name                    | Type        | Version | Arch   | Repository
+--+-------------------------+-------------+---------+--------+------------------
+i | Virtual Machine Manager | application |         | noarch | (System Packages)
+\endcode
+\code
+# zypper se -s virt-manager
+...
+S | Name                | Type       | Version   | Arch   | Repository
+--+---------------------+------------+-----------+--------+------------------
+i | virt-manager        | package    | 1.2.1-8.1 | noarch | SLE-12-SP1-Server
+\endcode
+
+\note While the <tt>package:virt-manager</tt> is installed and also available in the SLE-12-SP1-Server repository, <tt>(System Packages)</tt> indicates that the \c application is installed, but not provided by any repository. This usually happens if the repository provides wrong appdata, or no appdata at all.
+
+\code
+# zypper in -f virt-manager
+...
+Forcing installation of 'virt-manager-1.2.1-8.1.noarch' from repository 'SLE-12-SP1-Server'.
+Resolving package dependencies...
+
+The following application is going to be REMOVED:
+  "Virtual Machine Manager"
+
+The following package is going to be reinstalled:
+  virt-manager
+\endcode
+
+\c Zypper can not 'see' that the new package also transports a new application. Due to this \c zypper must assume the installed application gets deleted, when the package is reinstalled or updated.
+
+\code
+\endcode
+*/
index f8d0826..504f90e 100644 (file)
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Mon Oct  5 12:27:49 CEST 2015 - ma@suse.de
+
+- fix reserved identifier violation (fixes #51)
+- solver: speed up collecting pool data to build the job queue
+- doc: short abstract about 'Code 12 Application Metadata'
+- version 15.19.0 (19)
+
+-------------------------------------------------------------------
 Tue Sep 29 17:51:48 CEST 2015 - ma@suse.de
 
 - solver verify: multiversion property needs to be assigned to
index 2322b49..d628ea5 100644 (file)
@@ -310,26 +310,26 @@ BOOST_AUTO_TEST_CASE(cpeid_compare)
 
   BOOST_CHECK( compare( wildcardfree,  Value::ANY,     SetCompare::properSubset        ) );
   BOOST_CHECK( compare( wildcardfree,  Value::NA,      SetCompare::disjoint            ) );
-  //BOOST_CHECK( compare( wildcardfree,        wildcardfree,   _NeedsCloserLook,       // equal or disjoint
+  //BOOST_CHECK( compare( wildcardfree,        wildcardfree,   kNeedsCloserLook,       // equal or disjoint
   BOOST_CHECK( compare( wildcardfree,  wildcardfree,   SetCompare::equal               ) );
   BOOST_CHECK( compare( wildcardfree,  wildcardfree2,  SetCompare::disjoint            ) );
 #if WFN_STRICT_SPEC
   BOOST_CHECK( compare( wildcardfree,  wildcarded,     SetCompare::uncomparable        ) );
 #else
-  //BOOST_CHECK( compare( wildcardfree,        wildcarded,     _NeedsCloserLook,       // subset or disjoint
+  //BOOST_CHECK( compare( wildcardfree,        wildcarded,     kNeedsCloserLook,       // subset or disjoint
   BOOST_CHECK( compare( wildcardfree,  wildcarded,     SetCompare::properSubset        ) );
   BOOST_CHECK( compare( wildcardfree,  wildcarded2,    SetCompare::disjoint            ) );
 #endif
 
   BOOST_CHECK( compare( wildcarded,    Value::ANY,     SetCompare::properSubset        ) );
   BOOST_CHECK( compare( wildcarded,    Value::NA,      SetCompare::disjoint            ) );
-  //BOOST_CHECK( compare( wildcarded,  wildcardfree,   _NeedsCloserLook,       // superset or disjoint
+  //BOOST_CHECK( compare( wildcarded,  wildcardfree,   kNeedsCloserLook,       // superset or disjoint
   BOOST_CHECK( compare( wildcarded,    wildcardfree,   SetCompare::properSuperset      ) );
   BOOST_CHECK( compare( wildcarded,    wildcardfree2,  SetCompare::disjoint            ) );
 #if WFN_STRICT_SPEC
   BOOST_CHECK( compare( wildcarded,    wildcarded,     SetCompare::uncomparable        ) );
 #else
-  //BOOST_CHECK( compare( wildcarded,  wildcarded,     _NeedsCloserLook,       // equal or uncomparable
+  //BOOST_CHECK( compare( wildcarded,  wildcarded,     kNeedsCloserLook,       // equal or uncomparable
   BOOST_CHECK( compare( wildcarded,    wildcarded,     SetCompare::equal               ) );
   BOOST_CHECK( compare( wildcarded,    wildcarded2,    SetCompare::uncomparable        ) );
 #endif
index 248a03d..d063bcd 100644 (file)
@@ -10,8 +10,8 @@
 
 static TestSetup test;
 
-template <class _Iterator>
-std::ostream & vdumpPoolStats( std::ostream & str, _Iterator begin_r, _Iterator end_r )
+template <class TIterator>
+std::ostream & vdumpPoolStats( std::ostream & str, TIterator begin_r, TIterator end_r )
 {
   pool::PoolStats stats;
   for_( it, begin_r, end_r )
index 3595bdc..bbf9927 100644 (file)
@@ -1,6 +1,6 @@
 
-#ifndef _ZYPP_KEYRING_TEST_RECEIVER_H
-#define _ZYPP_KEYRING_TEST_RECEIVER_H
+#ifndef ZYPP_KEYRING_TEST_RECEIVER_H
+#define ZYPP_KEYRING_TEST_RECEIVER_H
 
 #include "zypp/Callback.h"
 #include "zypp/KeyRing.h"
index c2a93f6..1e0eb7c 100644 (file)
@@ -17,8 +17,8 @@ using namespace zypp::base;
 #define TRACE_TAG DBG << this->numericId() << " " << __PRETTY_FUNCTION__ << endl
 
 /** Logs Ctor, CopyCtor, Assign and Dtor. */
-template<class _Trace>
-  struct Trace : public ProvideNumericId<_Trace,unsigned>
+template<class TTrace>
+  struct Trace : public ProvideNumericId<TTrace,unsigned>
   {
     Trace()                            { TRACE_TAG; }
     Trace( const Trace & )             { TRACE_TAG; }
@@ -62,28 +62,28 @@ namespace zypp
 #define T_EQ(a,b)   assert( a == b ); assert( a == b.cgetPtr() ); assert( a.cgetPtr() == b ); assert( a.cgetPtr() == b.cgetPtr() );
 #define T_NE(a,b)   assert( a != b ); assert( a != b.cgetPtr() ); assert( a.cgetPtr() != b ); assert( a.cgetPtr() != b.cgetPtr() );
 
-template<class _RW>
+template<class RW>
   void test()
   {
     MIL << __PRETTY_FUNCTION__ << std::endl;
     // typedefs that should be provided:
-    typedef typename _RW::_Ptr               _Ptr;
-    typedef typename _RW::_constPtr          _constPtr;
-    typedef typename _Ptr::element_type      _Ptr_element_type;
-    typedef typename _constPtr::element_type _constPtr_element_type;
+    typedef typename RW::PtrType            Ptr;
+    typedef typename RW::constPtrType       constPtr;
+    typedef typename Ptr::element_type      Ptr_element_type;
+    typedef typename constPtr::element_type constPtr_element_type;
     // initial NULL
-    _RW ptr;
+    RW ptr;
     T_NULL;
     T_UNIQUE;
     T_EQ(ptr,ptr);
     // assign
-    ptr = _RW( new _Ptr_element_type );
+    ptr = RW( new Ptr_element_type );
     T_NOT_NULL;
     T_UNIQUE;
     T_EQ(ptr,ptr);
     {
       // share
-      _RW ptr2( ptr );
+      RW ptr2( ptr );
       T_NOT_NULL;
       T_NOT_UNIQUE;
       T_EQ(ptr,ptr2);
@@ -93,7 +93,7 @@ template<class _RW>
       T_UNIQUE;
       T_NE(ptr,ptr2);
       // different impl
-      ptr2.reset( new _Ptr_element_type );
+      ptr2.reset( new Ptr_element_type );
       T_NE(ptr,ptr2);
    }
     // assign
@@ -107,24 +107,24 @@ template<class _RW>
     ptr = nullptr;
     T_NULL;
     T_UNIQUE;
-    ptr = _RW( nullptr );
+    ptr = RW( nullptr );
     T_NULL;
     T_UNIQUE;
 
 
   }
 
-template<class _RW>
+template<class RW>
   void cowt()
   {
-    test<_RW>();
+    test<RW>();
     MIL << __PRETTY_FUNCTION__ << std::endl;
-    typedef typename _RW::_Ptr::element_type _Ptr_element_type;
+    typedef typename RW::PtrType::element_type Ptr_element_type;
     // create
-    _RW ptr( new _Ptr_element_type );
+    RW ptr( new Ptr_element_type );
     unsigned long ptrid = ptr->numericId();
     // share
-    _RW ptr2( ptr );
+    RW ptr2( ptr );
     // clone aon access
     unsigned long ptrid2 = ptr2->numericId();
     assert( ptrid != ptrid2 );
index 5b975e0..4cb27df 100644 (file)
@@ -24,15 +24,15 @@ BOOST_AUTO_TEST_CASE(Default)
 ////////////////////////////////////////////////////////////////////////////////
 // tools
 ////////////////////////////////////////////////////////////////////////////////
-template<class _Tp>
-inline const _Tp & max( const _Tp & lhs, const _Tp & rhs )
+template<class Tp>
+inline const Tp & max( const Tp & lhs, const Tp & rhs )
 { return lhs < rhs ? rhs : lhs; }
 
-template<class _Tp, int N>
-inline _Tp * begin( _Tp (& _array)[N] ) { return _array; }
+template<class Tp, int N>
+inline Tp * begin( Tp (& _array)[N] ) { return _array; }
 
-template<class _Tp, int N>
-inline _Tp * end( _Tp (& _array)[N] ) { return _array + (sizeof(_array)/sizeof(_Tp)); }
+template<class Tp, int N>
+inline Tp * end( Tp (& _array)[N] ) { return _array + (sizeof(_array)/sizeof(Tp)); }
 
 ResStatus::TransactByValue transactByValues[] = {
   ResStatus::USER, ResStatus::APPL_HIGH, ResStatus::APPL_LOW, ResStatus::SOLVER
index 3f4e350..1e02bb6 100644 (file)
@@ -109,8 +109,8 @@ inline bool initStatus( ResStatus::TransactValue fromState, ResStatus::TransactB
 //         TRANSACT   = bit::RangeValue<TransactField,2>::value  // transact according to state
 //       };
 
-template <class _Iter>
-inline bool _all( _Iter begin_r, _Iter end_r, ResStatus::TransactValue val_r )
+template <class TIter>
+inline bool _all( TIter begin_r, TIter end_r, ResStatus::TransactValue val_r )
 {
   for_( it, begin_r, end_r )
   {
@@ -120,8 +120,8 @@ inline bool _all( _Iter begin_r, _Iter end_r, ResStatus::TransactValue val_r )
   return true;
 }
 
-template <class _Iter>
-inline bool _none( _Iter begin_r, _Iter end_r, ResStatus::TransactValue val_r )
+template <class TIter>
+inline bool _none( TIter begin_r, TIter end_r, ResStatus::TransactValue val_r )
 {
   for_( it, begin_r, end_r )
   {
@@ -131,8 +131,8 @@ inline bool _none( _Iter begin_r, _Iter end_r, ResStatus::TransactValue val_r )
   return true;
 }
 
-template <class _Iter>
-inline bool _atLeastOne( _Iter begin_r, _Iter end_r, ResStatus::TransactValue val_r )
+template <class TIter>
+inline bool _atLeastOne( TIter begin_r, TIter end_r, ResStatus::TransactValue val_r )
 { return ! _none( begin_r, end_r, val_r ); }
 
 inline bool _allBySolver( ui::Selectable::Ptr sel )
index dfb6704..16d53a8 100644 (file)
@@ -403,10 +403,10 @@ namespace zypp
       {
         const CompatEntry & target( assertCompatSetEntry( targetArch_r ) );
         target.addCompatBit( assertCompatSetEntry( arch0_r )._idBit );
-#define _SETARG(N) if ( arch##N##_r.empty() ) return; target.addCompatBit( assertCompatSetEntry( arch##N##_r )._idBit )
-        _SETARG(1); _SETARG(2); _SETARG(3); _SETARG(4);
-        _SETARG(5); _SETARG(6); _SETARG(7); _SETARG(8); _SETARG(9);
-#undef _SETARG
+#define SETARG(N) if ( arch##N##_r.empty() ) return; target.addCompatBit( assertCompatSetEntry( arch##N##_r )._idBit )
+        SETARG(1); SETARG(2); SETARG(3); SETARG(4);
+        SETARG(5); SETARG(6); SETARG(7); SETARG(8); SETARG(9);
+#undef SETARG
       }
 
     private:
index 49a8276..727d3da 100644 (file)
@@ -25,15 +25,15 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //   CLASS NAME : AutoDispose<_Tp>
+  //   CLASS NAME : AutoDispose<Tp>
   //
-  /** Reference counted access to a \c _Tp object calling a custom
+  /** Reference counted access to a \c Tp object calling a custom
    *  \c Dispose function when the last AutoDispose handle to it is
    *  destroyed or reset.
    *
    * \note As with pointers, constness of an \c AutoDispose object does
-   * \b not apply to the stored \c _Tp object. If the stored \c _Tp object
-   * should be immutable, you should use <tt>AutoDispose\<const _Tp\></tt>.
+   * \b not apply to the stored \c Tp object. If the stored \c Tp object
+   * should be immutable, you should use <tt>AutoDispose\<const Tp\></tt>.
    *
    * Pass a filename to the application and provide the appropriate
    * code to be executed when the file is no longer needed:
@@ -88,15 +88,15 @@ namespace zypp
    * }
    * \endcode
   */
-  template<class _Tp>
+  template<class Tp>
     class AutoDispose
     {
     public:
-      typedef typename boost::call_traits<_Tp>::param_type       param_type;
-      typedef typename boost::call_traits<_Tp>::reference        reference;
-      typedef typename boost::call_traits<_Tp>::const_reference  const_reference;
-      typedef _Tp                                                value_type;
-      typedef typename boost::call_traits<_Tp>::value_type       result_type;
+      typedef typename boost::call_traits<Tp>::param_type       param_type;
+      typedef typename boost::call_traits<Tp>::reference        reference;
+      typedef typename boost::call_traits<Tp>::const_reference  const_reference;
+      typedef Tp                                                value_type;
+      typedef typename boost::call_traits<Tp>::value_type       result_type;
 
     public:
       /** Dispose function signatue. */
@@ -125,19 +125,19 @@ namespace zypp
 
     public:
 
-      /** Provide implicit conversion to \c _Tp\&. */
+      /** Provide implicit conversion to \c Tp\&. */
       operator reference() const
       { return _pimpl->_value; }
 
-      /** Reference to the \c _Tp object. */
+      /** Reference to the \c Tp object. */
       reference value() const
       { return _pimpl->_value; }
 
-      /** Reference to the \c _Tp object. */
+      /** Reference to the \c Tp object. */
       reference operator*() const
       { return _pimpl->_value; }
 
-      /** Pointer to the \c _Tp object (asserted to be <tt>!= NULL</tt>). */
+      /** Pointer to the \c Tp object (asserted to be <tt>!= NULL</tt>). */
       value_type * operator->() const
       { return & _pimpl->_value; }
 
@@ -189,9 +189,9 @@ namespace zypp
     };
   ///////////////////////////////////////////////////////////////////
 
-  /** \relates AutoDispose Stream output of the \c _Tp object. */
-  template<class _Tp>
-    inline std::ostream & operator<<( std::ostream & str, const AutoDispose<_Tp> & obj )
+  /** \relates AutoDispose Stream output of the \c Tp object. */
+  template<class Tp>
+    inline std::ostream & operator<<( std::ostream & str, const AutoDispose<Tp> & obj )
     { return str << obj.value(); }
 
   /////////////////////////////////////////////////////////////////
index a08a2b1..dc54f07 100644 (file)
@@ -21,7 +21,7 @@ namespace zypp
 ///////////////////////////////////////////////////////////////////
   /**
    * \todo Use boost::mpl library to assert constraints
-   * at compiletime! There various like (_IntT is an integral type)
+   * at compiletime! There various like (TInt is an integral type)
    * (begin+size < maxbits) or ( field dependent
    * constants must be within the range defined by size ).
   */
@@ -31,36 +31,36 @@ namespace zypp
     namespace bit_detail
     {
       /** Generate constants with \a _size trailing '1'-bits */
-      template<class _IntT, unsigned _size>
+      template<class TInt, unsigned _size>
         struct Gen1Bits
         {
-          static const _IntT value = (Gen1Bits<_IntT,_size-1>::value << 1)+1;
+          static const TInt value = (Gen1Bits<TInt,_size-1>::value << 1)+1;
         };
       /** Specialization for \a _length 0 */
-      template<class _IntT>
-        struct Gen1Bits<_IntT, 0>
+      template<class TInt>
+        struct Gen1Bits<TInt, 0>
         {
-          static const _IntT value = 0;
+          static const TInt value = 0;
         };
     }
 
-    /** Number of bits available in \a _IntT. */
-    template<class _IntT>
+    /** Number of bits available in \a TInt. */
+    template<class TInt>
       struct MaxBits
       {
-        typedef _IntT IntT;
+        typedef TInt IntT;
         static const unsigned value = (sizeof(IntT)*8);
       };
 
     /** For printing bits. */
-    template<class _IntT>
-      inline std::string asString( _IntT val, char zero = '0', char one = '1' )
+    template<class TInt>
+      inline std::string asString( TInt val, char zero = '0', char one = '1' )
       {
-        std::string s( MaxBits<_IntT>::value, zero );
-        for( unsigned i = MaxBits<_IntT>::value; i; )
+        std::string s( MaxBits<TInt>::value, zero );
+        for( unsigned i = MaxBits<TInt>::value; i; )
           {
             --i;
-            if ( val & (_IntT)1 )
+            if ( val & (TInt)1 )
               s[i] = one;
             val = val >> 1;
           };
@@ -68,19 +68,19 @@ namespace zypp
       }
 
     /** A bitmaks of \a _size 1-bits starting at bit \a _begin. */
-    template<class _IntT, unsigned _begin, unsigned _size>
+    template<class TInt, unsigned _begin, unsigned _size>
       struct Mask
       {
-        typedef _IntT IntT;
+        typedef TInt IntT;
         static const IntT value    = bit_detail::Gen1Bits<IntT,_size>::value << _begin;
         static const IntT inverted = ~value;
       };
 
     /** Range of bits starting at bit \a _begin with length \a _size. */
-    template<class _IntT, unsigned _begin, unsigned _size>
+    template<class TInt, unsigned _begin, unsigned _size>
       struct Range
       {
-        typedef _IntT IntT;
+        typedef TInt IntT;
         typedef zypp::bit::MaxBits<IntT>           MaxBits;
         typedef zypp::bit::Mask<IntT,_begin,_size> Mask;
 
@@ -92,8 +92,8 @@ namespace zypp
      * Force error at compiletime. Currently because types
      * and values are undefined
     */
-    template<class _IntT, unsigned _begin>
-      struct Range<_IntT, _begin, 0>
+    template<class TInt, unsigned _begin>
+      struct Range<TInt, _begin, 0>
       {};
 
     /** A value with in a Range.
@@ -106,11 +106,11 @@ namespace zypp
      * RangeValue<SubField,3>::value;    // 00001100
      * \endcode
     */
-    template<class _Range, typename _Range::IntT _value>
+    template<class TRange, typename TRange::IntT _value>
       struct RangeValue
       {
-        typedef _Range                RangeT;
-        typedef typename _Range::IntT IntT;
+        typedef TRange                RangeT;
+        typedef typename TRange::IntT IntT;
 
         static const IntT value = _value << RangeT::begin;
       };
@@ -124,11 +124,11 @@ namespace zypp
      * RangeBit<SubField,2>::value;      // 00010000
      * \endcode
     */
-    template<class _Range, unsigned _pos>
+    template<class TRange, unsigned _pos>
       struct RangeBit
       {
-        typedef _Range                RangeT;
-        typedef typename _Range::IntT IntT;
+        typedef TRange                RangeT;
+        typedef typename TRange::IntT IntT;
 
         static const IntT value = IntT(1) << (RangeT::begin + _pos);
       };
@@ -155,41 +155,41 @@ namespace zypp
      * bf<SubField>.assign( 0 );         // 11100011
      * \endcode
     */
-    template<class _IntT>
-      class BitField  : public Range<_IntT, 0, MaxBits<_IntT>::value>
+    template<class TInt>
+      class BitField  : public Range<TInt, 0, MaxBits<TInt>::value>
       {
       public:
         /** Default ctor: zero. */
         BitField()
-        : _value( (_IntT)0 )
+        : _value( (TInt)0 )
         {}
-        /** Ctor taking an \a _IntT. */
-        BitField( const _IntT & value_r )
+        /** Ctor taking an \a TInt. */
+        BitField( const TInt & value_r )
         : _value( value_r )
         {}
 
       public:
         /** Validate in a boolean context. */
         explicit operator bool() const
-        { return _value != (_IntT)0; }
+        { return _value != (TInt)0; }
 
       public:
         /** Return the value. */
-        template<class _Range>
-          _IntT value() const
+        template<class TRange>
+          TInt value() const
           {
-            return _value & _Range::Mask::value;
+            return _value & TRange::Mask::value;
           }
-        _IntT value() const
+        TInt value() const
         {
           return _value;
         }
 
         /** Value as bit string. */
-        template<class _Range>
+        template<class TRange>
           std::string asString() const
           {
-            return bit::asString( _value & _Range::Mask::value, '_' );
+            return bit::asString( _value & TRange::Mask::value, '_' );
           }
         std::string asString() const
         {
@@ -197,27 +197,27 @@ namespace zypp
         }
 
         /** Assign Range in \a rhs to \c this. */
-        template<class _Range>
-          BitField & assign( _IntT rhs )
+        template<class TRange>
+          BitField & assign( TInt rhs )
           {
-            _value = (_value & _Range::Mask::inverted)
-                   | (rhs & _Range::Mask::value);
+            _value = (_value & TRange::Mask::inverted)
+                   | (rhs & TRange::Mask::value);
             return *this;
           }
-        BitField & assign( _IntT rhs )
+        BitField & assign( TInt rhs )
         {
           _value = rhs;
           return *this;
         }
 
         /** Test for equal value within a Range. */
-        template<class _Range>
-          bool isEqual( _IntT rhs ) const
+        template<class TRange>
+          bool isEqual( TInt rhs ) const
           {
-            return (_value & _Range::Mask::value)
-                == (rhs & _Range::Mask::value);
+            return (_value & TRange::Mask::value)
+                == (rhs & TRange::Mask::value);
           }
-        bool isEqual( _IntT rhs ) const
+        bool isEqual( TInt rhs ) const
         {
           return _value == rhs;
         }
@@ -225,43 +225,43 @@ namespace zypp
        public:
 
          /** Set or unset bits of \a rhs. */
-        template<class _Range>
-            BitField & set( _IntT rhs, bool doset_r )
-            { return set( (rhs & _Range::Mask::value), doset_r ); }
+        template<class TRange>
+            BitField & set( TInt rhs, bool doset_r )
+            { return set( (rhs & TRange::Mask::value), doset_r ); }
 
-        BitField & set( _IntT rhs, bool doset_r )
+        BitField & set( TInt rhs, bool doset_r )
         { return doset_r ? set( rhs ) : unset( rhs ); }
 
         /** Set bits of \a rhs. */
-        template<class _Range>
-            BitField & set( _IntT rhs )
-            { return set( rhs & _Range::Mask::value ); }
+        template<class TRange>
+            BitField & set( TInt rhs )
+            { return set( rhs & TRange::Mask::value ); }
 
-        BitField & set( _IntT rhs )
+        BitField & set( TInt rhs )
         { _value |= rhs; return *this; }
 
         /** Unset bits of \a rhs. */
-        template<class _Range>
-            BitField & unset( _IntT rhs )
-            { return unset( rhs & _Range::Mask::value ); }
+        template<class TRange>
+            BitField & unset( TInt rhs )
+            { return unset( rhs & TRange::Mask::value ); }
 
-        BitField & unset( _IntT rhs )
+        BitField & unset( TInt rhs )
         { _value &= ~rhs; return *this; }
 
         /** Test whether \b all bits of \a rhs are set. */
-        template<class _Range>
-            bool test( _IntT rhs )
-            { return test( rhs & _Range::Mask::value ); }
+        template<class TRange>
+            bool test( TInt rhs )
+            { return test( rhs & TRange::Mask::value ); }
 
-        bool test( _IntT rhs ) const
+        bool test( TInt rhs ) const
         { return (_value & rhs) == rhs; }
 
         /** Test whether \b at \b least \b one bit of \a rhs is set. */
-        template<class _Range>
-            bool testAnyOf( _IntT rhs )
-            { return testAnyOf( rhs & _Range::Mask::value ); }
+        template<class TRange>
+            bool testAnyOf( TInt rhs )
+            { return testAnyOf( rhs & TRange::Mask::value ); }
 
-        bool testAnyOf( _IntT rhs ) const
+        bool testAnyOf( TInt rhs ) const
         { return (_value & rhs); }
 
       public:
@@ -288,52 +288,52 @@ namespace zypp
         { return ~_value; }
 
       private:
-        _IntT _value;
+        TInt _value;
       };
     ///////////////////////////////////////////////////////////////////
 
     /** \relates BitField Stream output */
-    template<class _IntT>
-      std::ostream & operator<<( std::ostream & str, const BitField<_IntT> & obj )
+    template<class TInt>
+      std::ostream & operator<<( std::ostream & str, const BitField<TInt> & obj )
       {
         return str << obj.asString();
       }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline bool operator==( const BitField<_IntT> & lhs, const BitField<_IntT> & rhs )
+    template<class TInt>
+      inline bool operator==( const BitField<TInt> & lhs, const BitField<TInt> & rhs )
       { return lhs.value() == rhs.value(); }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline bool operator!=( const BitField<_IntT> & lhs, const BitField<_IntT> & rhs )
+    template<class TInt>
+      inline bool operator!=( const BitField<TInt> & lhs, const BitField<TInt> & rhs )
       { return ! (lhs == rhs); }
 
 
     /** \relates BitField */
-    template<class _IntT>
-      inline BitField<_IntT> operator&( const BitField<_IntT> & lhs, const BitField<_IntT> & rhs )
-      { return BitField<_IntT>(lhs) &= rhs; }
+    template<class TInt>
+      inline BitField<TInt> operator&( const BitField<TInt> & lhs, const BitField<TInt> & rhs )
+      { return BitField<TInt>(lhs) &= rhs; }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline BitField<_IntT> operator|( const BitField<_IntT> & lhs, const BitField<_IntT> & rhs )
-      { return BitField<_IntT>(lhs) |= rhs; }
+    template<class TInt>
+      inline BitField<TInt> operator|( const BitField<TInt> & lhs, const BitField<TInt> & rhs )
+      { return BitField<TInt>(lhs) |= rhs; }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline BitField<_IntT> operator^( const BitField<_IntT> & lhs, const BitField<_IntT> & rhs )
-      { return BitField<_IntT>(lhs) ^= rhs; }
+    template<class TInt>
+      inline BitField<TInt> operator^( const BitField<TInt> & lhs, const BitField<TInt> & rhs )
+      { return BitField<TInt>(lhs) ^= rhs; }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline BitField<_IntT> operator<<( const BitField<_IntT> & lhs, unsigned num )
-      { return BitField<_IntT>(lhs) <<= num; }
+    template<class TInt>
+      inline BitField<TInt> operator<<( const BitField<TInt> & lhs, unsigned num )
+      { return BitField<TInt>(lhs) <<= num; }
 
     /** \relates BitField */
-    template<class _IntT>
-      inline BitField<_IntT> operator>>( const BitField<_IntT> & lhs, unsigned num )
-      { return BitField<_IntT>(lhs) >>= num; }
+    template<class TInt>
+      inline BitField<TInt> operator>>( const BitField<TInt> & lhs, unsigned num )
+      { return BitField<TInt>(lhs) >>= num; }
 
     /////////////////////////////////////////////////////////////////
   } // namespace bit
index 533675e..d5c0a5c 100644 (file)
@@ -36,7 +36,6 @@ SET( zypp_SRCS
   InstanceId.cc
   KeyRing.cc
   Locks.cc
-  MediaProducts.cc
   MediaSetAccess.cc
   OnMediaLocation.cc
   Package.cc
index e61bfd8..3baf8c0 100644 (file)
@@ -58,7 +58,7 @@ namespace zypp
    *
    * \par Sending a Task report (SENDER SIDE).
    *
-   * Simply create a callback::SendReport<_Report>, where _Report
+   * Simply create a callback::SendReport<TReport>, where TReport
    * is your task report structure. Invoke the callback functions
    * as needed. That's it.
    *
@@ -135,11 +135,11 @@ namespace zypp
    * argument.
    *
    * Convenient sending can be achieved by installing non-virtual methods
-   * in the _Report class, which encode the arguments in UserData and send
+   * in the TReport class, which encode the arguments in UserData and send
    * them via ReportBase::report().
    *
    * Convenient receiving can be achieved by installing virtual methods in
-   * the _Report class, which can be simply overloaded by the receiver. Downside
+   * the TReport class, which can be simply overloaded by the receiver. Downside
    * of this is that adding virtual methods breaks binary compatibility.
    */
   namespace callback
@@ -160,16 +160,16 @@ namespace zypp
     };
 
     /**  */
-    template<class _Report>
+    template<class TReport>
       class DistributeReport;
 
     /**  */
-    template<class _Report>
-      struct ReceiveReport : public _Report
+    template<class TReport>
+      struct ReceiveReport : public TReport
       {
-       typedef _Report                   ReportType;
-       typedef ReceiveReport<_Report>    Receiver;
-        typedef DistributeReport<_Report> Distributor;
+       typedef TReport                   ReportType;
+       typedef ReceiveReport<TReport>    Receiver;
+        typedef DistributeReport<TReport> Distributor;
 
         virtual ~ReceiveReport()
         { disconnect(); }
@@ -193,13 +193,13 @@ namespace zypp
       };
 
     /**  */
-    template<class _Report>
+    template<class TReport>
       struct DistributeReport
       {
        public:
-       typedef _Report                   ReportType;
-       typedef ReceiveReport<_Report>    Receiver;
-       typedef DistributeReport<_Report> Distributor;
+       typedef TReport                   ReportType;
+       typedef ReceiveReport<TReport>    Receiver;
+       typedef DistributeReport<TReport> Distributor;
 
          static DistributeReport & instance()
          {
@@ -232,12 +232,12 @@ namespace zypp
       };
 
     /**  */
-    template<class _Report>
+    template<class TReport>
       struct SendReport : private zypp::base::NonCopyable
       {
-       typedef _Report                   ReportType;
-        typedef ReceiveReport<_Report>    Receiver;
-        typedef DistributeReport<_Report> Distributor;
+       typedef TReport                   ReportType;
+        typedef ReceiveReport<TReport>    Receiver;
+        typedef DistributeReport<TReport> Distributor;
 
         SendReport()
         { Distributor::instance()->reportbegin(); }
@@ -280,12 +280,12 @@ namespace zypp
      *  ...// r receiving the report
      * \endcode
     */
-    template<class _Report>
+    template<class TReport>
       struct TempConnect
       {
-       typedef _Report                   ReportType;
-        typedef ReceiveReport<_Report>    Receiver;
-        typedef DistributeReport<_Report> Distributor;
+       typedef TReport                   ReportType;
+        typedef ReceiveReport<TReport>    Receiver;
+        typedef DistributeReport<TReport> Distributor;
 
         TempConnect()
         : _oldRec( Distributor::instance().getReceiver() )
index 70b027c..c24d32d 100644 (file)
@@ -134,7 +134,7 @@ namespace zypp
 
     /** Build \ref Capability from data. No parsing required.
     */
-    sat::detail::IdType relFromStr( ::_Pool * pool_r,
+    sat::detail::IdType relFromStr( sat::detail::CPool * pool_r,
                                     const Arch & arch_r,
                                     const std::string & name_r,
                                     Rel op_r,
@@ -170,7 +170,7 @@ namespace zypp
    /** Build \ref Capability from data, just parsing name for '[.arch]' and detect
     * 'kind srcpackage' (will be mapped to arch \c src).
     */
-    sat::detail::IdType relFromStr( ::_Pool * pool_r,
+    sat::detail::IdType relFromStr( sat::detail::CPool * pool_r,
                                     const std::string & name_r, Rel op_r, const Edition & ed_r,
                                     const ResKind & kind_r )
     {
@@ -202,7 +202,7 @@ namespace zypp
 
     /** Full parse from string, unless Capability::PARSED.
     */
-    sat::detail::IdType relFromStr( ::_Pool * pool_r,
+    sat::detail::IdType relFromStr( sat::detail::CPool * pool_r,
                                     const Arch & arch_r, // parse from name if empty
                                     const std::string & str_r, const ResKind & kind_r,
                                     Capability::CtorFlag flag_r )
index 776b8c5..e8b3015 100644 (file)
@@ -415,7 +415,7 @@ namespace zypp
   //   class CpeId::WfnAttribute
   ///////////////////////////////////////////////////////////////////
 
-  const std::string & CpeId::_AttributeDef::asString( Enum val_r )
+  const std::string & CpeId::EAttributeDef::asString( Enum val_r )
   {
     static std::map<Enum,std::string> _table = {
 #define OUTS(N) { N, #N }
@@ -930,7 +930,7 @@ namespace zypp
 #if WFN_STRICT_SPEC
   //SetCompare CpeId::Value::setRelationMixinCompare( const CpeId::Value & trg ) const
   {
-    static const SetCompare _NeedsCloserLook( SetCompare::Enum(-1) );  // artificial Compare value
+    static const SetCompare kNeedsCloserLook( SetCompare::Enum(-1) );  // artificial Compare value
     static const SetCompare matchTabel[4][4] = {{
       /* ANY,          ANY             */ SetCompare::equal,
       /* ANY,          NA              */ SetCompare::properSuperset,
@@ -944,19 +944,19 @@ namespace zypp
     },{
       /* wildcardfree, ANY             */ SetCompare::properSubset,
       /* wildcardfree, NA              */ SetCompare::disjoint,
-      /* wildcardfree, wildcardfree    */ _NeedsCloserLook,    // equal or disjoint
+      /* wildcardfree, wildcardfree    */ kNeedsCloserLook,    // equal or disjoint
       /* wildcardfree, wildcarded      */ SetCompare::uncomparable,
     },{
       /* wildcarded,   ANY             */ SetCompare::properSubset,
       /* wildcarded,   NA              */ SetCompare::disjoint,
-      /* wildcarded,   wildcardfree    */ _NeedsCloserLook,    // superset or disjoint
+      /* wildcarded,   wildcardfree    */ kNeedsCloserLook,    // superset or disjoint
       /* wildcarded,   wildcarded      */ SetCompare::uncomparable,
     }};
 
     Type srcType = type();
     Type trgType = trg.type();
     SetCompare ret = matchTabel[srcType.asIntegral()][trgType.asIntegral()];
-    if ( ret == _NeedsCloserLook )
+    if ( ret == kNeedsCloserLook )
     {
       if ( srcType == Type::wildcardfree )     // trgType == Type::wildcardfree
       {
index a5204d1..c90bf9a 100644 (file)
@@ -36,7 +36,7 @@ namespace zypp
 
   public:
     /** WFN attributes (use like 'enum class \ref Attribute') */
-    struct _AttributeDef {
+    struct EAttributeDef {
       enum Enum {
        part,           //< attribute (2.2)
        vendor,         //< attribute (2.2)
@@ -53,7 +53,7 @@ namespace zypp
       static constexpr unsigned numAttributes = other+1;       ///< number of attributes
       static const std::string & asString( Enum val_r );       ///< string representantion
     };
-    typedef base::EnumClass<_AttributeDef> Attribute;  ///< 'enum class Attribute'
+    typedef base::EnumClass<EAttributeDef> Attribute;  ///< 'enum class Attribute'
 
   public:
     /** Indicator type for non-trowing ctor. */
@@ -204,7 +204,7 @@ namespace zypp
 
   public:
     /** Classification of \ref Value types mostly for \ref match (use like 'enum class \ref Type') */
-    struct _TypeDef {
+    struct ETypeDef {
       enum Enum {
        ANY,
        NA,
@@ -212,7 +212,7 @@ namespace zypp
        wildcarded,
       };
     };
-    typedef base::EnumClass<_TypeDef> Type;    ///< 'enum class Type'
+    typedef base::EnumClass<ETypeDef> Type;    ///< 'enum class Type'
 
     /** Return the \ref Type of this \ref Value. */
     Type type() const
index c15e693..2158d52 100644 (file)
@@ -130,7 +130,7 @@ namespace zypp
     /** \name Printing in various predefined formats */
     //@{
     /** Date formats for printing (use like 'enum class \ref DateFormat') */
-    struct _DateFormatDef { enum Enum {
+    struct EDateFormatDef { enum Enum {
       none,    ///< ""
       calendar,        ///< 2014-02-07
       month,   ///< 2014-02
@@ -139,24 +139,24 @@ namespace zypp
       weekday, ///< 2014-W06-5 (1 is Monday)
       ordinal, ///< 2014-038
     };};
-    typedef base::EnumClass<_DateFormatDef> DateFormat;        ///< 'enum class DateFormat'
+    typedef base::EnumClass<EDateFormatDef> DateFormat;        ///< 'enum class DateFormat'
 
     /** Time formats for printing (use like 'enum class \ref TimeFormat') */
-    struct _TimeFormatDef { enum Enum {
+    struct ETimeFormatDef { enum Enum {
       none,    ///< ""
       seconds, ///< 07:06:41
       minutes, ///< 07:06
       hours,   ///< 07
     };};
-    typedef base::EnumClass<_TimeFormatDef> TimeFormat;        ///< 'enum class TimeFormat'
+    typedef base::EnumClass<ETimeFormatDef> TimeFormat;        ///< 'enum class TimeFormat'
 
     /** Timezone indicator for printing (use like 'enum class \ref TimeZoneFormat') */
-    struct _TimeZoneFormatDef { enum Enum {
+    struct ETimeZoneFormatDef { enum Enum {
       none,    ///< ""
       name,    ///< UTC, CET, ...
       offset,  ///< +00[:00]
     };};
-    typedef base::EnumClass<_TimeZoneFormatDef> TimeZoneFormat;        ///< 'enum class TimeZoneFormat'
+    typedef base::EnumClass<ETimeZoneFormatDef> TimeZoneFormat;        ///< 'enum class TimeZoneFormat'
 
     /** Default format is <tt>'2014-02-07 07:06:41 CET'</tt>
      * The default is \ref DateFormat::calendar, \ref TimeFormat::seconds, \ref TimeZoneFormat::name and
index d415298..ee1821d 100644 (file)
@@ -598,7 +598,7 @@ namespace zypp {
     //
     //////////////////////////////////////////////////////////////////////
 
-    namespace _ExternalProgram
+    namespace externalprogram
     {
       EarlyPipe::EarlyPipe()
       {
@@ -619,7 +619,7 @@ namespace zypp {
        if ( _stderr )
          ::fclose( _stderr );
       }
-    }
+    } // namespace externalprogram
 
     bool ExternalProgramWithStderr::stderrGetUpTo( std::string & retval_r, const char delim_r, bool returnDelim_r )
     {
index bc62a4c..f3fc850 100644 (file)
@@ -233,7 +233,7 @@ namespace zypp {
     };
 
 
-  namespace _ExternalProgram
+  namespace externalprogram
   {
     /** Helper providing pipe FDs for \ref ExternalProgramWithStderr.
      * Moved to a basse class because the pipe needs to be initialized
@@ -251,12 +251,12 @@ namespace zypp {
        FILE * _stderr;
        int _fds[2];
     };
-  }
+  } // namespace externalprogram
 
   /** ExternalProgram extended to offer reading programs stderr.
    * \see \ref ExternalProgram
    */
-  class ExternalProgramWithStderr : private _ExternalProgram::EarlyPipe, public ExternalProgram
+  class ExternalProgramWithStderr : private externalprogram::EarlyPipe, public ExternalProgram
   {
     public:
       ExternalProgramWithStderr( const Arguments & argv_r )
@@ -269,7 +269,7 @@ namespace zypp {
 
     public:
       /** Return \c FILE* to read programms stderr (O_NONBLOCK set). */
-      using _ExternalProgram::EarlyPipe::stderr;
+      using externalprogram::EarlyPipe::stderr;
 
       /** Read data up to \c delim_r from stderr (nonblocking).
        * \note If \c delim_r is '\0', we read as much data as possible.
index 30459d6..22c2351 100644 (file)
@@ -87,8 +87,8 @@ namespace zypp
         { return _sel && _sel( solv_r ); }
 
         /** Filter fitting PoolItem/ResObject. */
-        template<class _Solv>
-        bool operator()( const _Solv & solv_r ) const
+        template<class TSolv>
+        bool operator()( const TSolv & solv_r ) const
         { return operator()( solv_r.satSolvable() ); }
 
       private:
@@ -118,8 +118,8 @@ namespace zypp
         { return solv_r.isKind( _kind ); }
 
         /** Filter fitting PoolItem/ResObject. */
-        template<class _Solv>
-        bool operator()( const _Solv & solv_r ) const
+        template<class TSolv>
+        bool operator()( const TSolv & solv_r ) const
         { return operator()( solv_r.satSolvable() ); }
 
       private:
@@ -127,9 +127,9 @@ namespace zypp
     };
 
     /** \relates ByKind templated convenience ctor. */
-    template<class _Res>
+    template<class TRes>
     inline ByKind byKind()
-    { return ByKind( ResTraits<_Res>::kind ); }
+    { return ByKind( ResTraits<TRes>::kind ); }
     ///////////////////////////////////////////////////////////////////
 
     ///////////////////////////////////////////////////////////////////
@@ -154,8 +154,8 @@ namespace zypp
         { return _pred && (pi_r.status().*_pred)(); }
 
         /** Filter fitting sat::Solvable/ResObject. */
-        template<class _Solv>
-        bool operator()( const _Solv & solv_r ) const
+        template<class TSolv>
+        bool operator()( const TSolv & solv_r ) const
         { return operator()( PoolItem(solv_r) ); }
 
       private:
@@ -180,8 +180,8 @@ namespace zypp
         {}
 
         /** Fitting PoolItem/ResObject. */
-        template<class _Solv>
-        SameItemAs( const _Solv & solv_r )
+        template<class TSolv>
+        SameItemAs( const TSolv & solv_r )
         : _item( solv_r.satSolvable() )
         {}
 
@@ -196,8 +196,8 @@ namespace zypp
         }
 
         /** Filter fitting PoolItem/ResObject. */
-        template<class _Solv>
-        bool operator()( const _Solv & solv_r ) const
+        template<class TSolv>
+        bool operator()( const TSolv & solv_r ) const
         { return operator()( solv_r.satSolvable() ); }
 
       private:
index a7281eb..0ff1eaf 100644 (file)
@@ -25,11 +25,11 @@ namespace zypp
 
     int Glob::add( const char * pattern_r, Flags flags_r )
     {
-      static Flags _APPEND( GLOB_APPEND ); // not published
+      static Flags kAppend( GLOB_APPEND ); // not published
       if ( ! flags_r )
         flags_r = _defaultFlags;
       if ( _result )
-        flags_r |= _APPEND;
+        flags_r |= kAppend;
       else
         _result.reset( new ::glob_t );
       return( _lastGlobReturn = ::glob( pattern_r, flags_r, NULL, &(*_result) ) );
index 0cc5670..a96d72c 100644 (file)
@@ -96,12 +96,12 @@ namespace zypp
           kErr         = GLOB_ERR,             //!< Return on read errors.
           kMark                = GLOB_MARK,            //!< Append a slash to each name.
           kNoSort      = GLOB_NOSORT,          //!< Don't sort the names.
-          // unsupported _DOOFFS = GLOB_DOOFFS,        //!< Insert PGLOB->gl_offs NULLs.
+          // unsupported kDoOffs = GLOB_DOOFFS,        //!< Insert PGLOB->gl_offs NULLs.
           kNoCheck     = GLOB_NOCHECK,         //!< If nothing matches, return the pattern.
-          // autoapplied _APPEND = GLOB_APPEND,        //!< Append to results of a previous call.
+          // autoapplied kAppend = GLOB_APPEND,        //!< Append to results of a previous call.
           kNoEscape    = GLOB_NOESCAPE,        //!< Backslashes don't quote metacharacters.
           kPeriod      = GLOB_PERIOD,          //!< Leading `.' can be matched by metachars.
-          // unsupported _MAGCHAR = GLOB_MAGCHAR,//!< Set in gl_flags if any metachars seen.
+          // unsupported kMagChar = GLOB_MAGCHAR,//!< Set in gl_flags if any metachars seen.
           kAltDirFunc  = GLOB_ALTDIRFUNC,      //!< Use gl_opendir et al functions.
           kBrace       = GLOB_BRACE,           //!< Expand "{a,b}" to "a" "b".
           kNoMagic     = GLOB_NOMAGIC,         //!< If no magic chars, return the pattern.
@@ -203,43 +203,43 @@ namespace zypp
 
       public:
 
-        /** \name Collecting Glob results to some _OutputIterator
+        /** \name Collecting Glob results to some TOutputIterator
          * \code
          * std::list<Pathname> p;
          * Glob::collect( "/bin/a*.dat}", std::back_inserter(p) );
-         * Glob::collect( "/bin/a*{.xml,.xml.gz}", Glob::_BRACE, std::back_inserter(p) );
+         * Glob::collect( "/bin/a*{.xml,.xml.gz}", Glob::kBrace, std::back_inserter(p) );
          * \endcode
          */
         //@{
         /** Write glob result to some \c OutputIterator. */
-        template<class _OutputIterator>
-        static int collect( const Pathname & pattern_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const Pathname & pattern_r, TOutputIterator result_r )
         { return collect( pattern_r.c_str(), Flags(), result_r ); }
         /** \overload */
-        template<class _OutputIterator>
-        static int collect( const std::string & pattern_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const std::string & pattern_r, TOutputIterator result_r )
         { return collect( pattern_r.c_str(), Flags(), result_r ); }
         /** \overload */
-        template<class _OutputIterator>
-        static int collect( const char * pattern_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const char * pattern_r, TOutputIterator result_r )
         { return collect( pattern_r, Flags(), result_r ); }
 
         /** \overload With \ref Flags */
-        template<class _OutputIterator>
-        static int collect( const Pathname & pattern_r, Flags flags_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const Pathname & pattern_r, Flags flags_r, TOutputIterator result_r )
         { return collect( pattern_r.c_str(), flags_r, result_r ); }
         /** \overload */
-        template<class _OutputIterator>
-        static int collect( const std::string & pattern_r, Flags flags_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const std::string & pattern_r, Flags flags_r, TOutputIterator result_r )
         { return collect( pattern_r.c_str(), flags_r, result_r ); }
         /** \overload */
-        template<class _OutputIterator>
-        static int collect( const char * pattern_r, Flags flags_r, _OutputIterator result_r )
+        template<class TOutputIterator>
+        static int collect( const char * pattern_r, Flags flags_r, TOutputIterator result_r )
         {
           Glob glob( pattern_r, flags_r );
           if ( glob.lastGlobReturn() == 0 )
             for_( it, glob.begin(), glob.end() )
-              (*result_r)++ = typename _OutputIterator::container_type::value_type(*it);
+              (*result_r)++ = typename TOutputIterator::container_type::value_type(*it);
           return glob.lastGlobReturn();
         }
         //@}
diff --git a/zypp/MediaProducts.cc b/zypp/MediaProducts.cc
deleted file mode 100644 (file)
index 29d9826..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-
-#undef ZYPP_BASE_LOGGER_LOGGROUP
-#define ZYPP_BASE_LOGGER_LOGGROUP "zypp"
-
-#include "zypp/MediaProducts.h"
-
-using namespace std;
-
-namespace zypp
-{
-
-// template<class _OutputIterator>
-// void productsInMedia( const Url & url_r, _OutputIterator result )
-
-
-} // ns zypp
-
-// vim: set ts=2 sts=2 sw=2 et ai:
index 2a6bd9b..f6128a1 100644 (file)
@@ -54,8 +54,8 @@ namespace zypp
   /**
    * FIXME: add a comment here...
    */
-  template <class _OutputIterator>
-  static void scanProductsFile( const Pathname & file_r, _OutputIterator result )
+  template <class TOutputIterator>
+  static void scanProductsFile( const Pathname & file_r, TOutputIterator result )
   {
     std::ifstream pfile( file_r.asString().c_str() );
     while ( pfile.good() ) {
@@ -84,8 +84,8 @@ namespace zypp
    * items will be inserted.
    * \throws MediaException If accessng the media fails
    */
-  template <class _OutputIterator>
-  void productsInMedia( const Url & url_r, _OutputIterator result )
+  template <class TOutputIterator>
+  void productsInMedia( const Url & url_r, TOutputIterator result )
   {
     media::MediaManager media_mgr;
     // open the media
index 3042e1c..b3d240b 100644 (file)
@@ -110,8 +110,8 @@ namespace zypp
       /** \overload taking container of category strings
        * 2nd template arg just to prevent instantiation for Category
        */
-      template <class _Container, typename = typename _Container::value_type>
-      bool isCategory( const _Container & categories_r ) const
+      template <class TContainer, typename = typename TContainer::value_type>
+      bool isCategory( const TContainer & categories_r ) const
       {
        for ( const std::string & el : categories_r )
        { if ( isCategory( el ) ) return true; }
@@ -146,8 +146,8 @@ namespace zypp
       /** \overload taking container of severity strings
        * 2nd template arg just to prevent instantiation for SeverityFlag
        */
-      template <class _Container, typename = typename _Container::value_type>
-      bool isSeverity( const _Container & severities_r ) const
+      template <class TContainer, typename = typename TContainer::value_type>
+      bool isSeverity( const TContainer & severities_r ) const
       {
        for ( const std::string & el : severities_r )
        { if ( isSeverity( el ) ) return true; }
index 22ad915..5cbc827 100644 (file)
@@ -282,25 +282,21 @@ namespace zypp
     //
     ///////////////////////////////////////////////////////////////////
 
-    /******************************************************************
-     **
-     **        FUNCTION NAME : _Log_Result
-     **        FUNCTION TYPE : int
-     **
-     **        DESCRIPTION : Helper function to log return values.
-    */
-#define _Log_Result MIL << endl, __Log_Result
-    inline int __Log_Result( const int res, const char * rclass = 0 /*errno*/ )
-    {
-      if ( res )
+#define logResult MIL << endl, doLogResult
+    namespace {
+      /**  Helper function to log return values. */
+      inline int doLogResult( const int res, const char * rclass = 0 /*errno*/ )
       {
-        if ( rclass )
-          WAR << " FAILED: " << rclass << " " << res << endl;
-        else
-          WAR << " FAILED: " << str::strerror( res ) << endl;
+       if ( res )
+       {
+         if ( rclass )
+           WAR << " FAILED: " << rclass << " " << res << endl;
+         else
+           WAR << " FAILED: " << str::strerror( res ) << endl;
+       }
+       return res;
       }
-      return res;
-    }
+    } // namespace
 
     ///////////////////////////////////////////////////////////////////
     //
@@ -311,9 +307,9 @@ namespace zypp
     {
       MIL << "mkdir " << path << ' ' << str::octstring( mode );
       if ( ::mkdir( path.asString().c_str(), mode ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -372,9 +368,9 @@ namespace zypp
     {
       MIL << "rmdir " << path;
       if ( ::rmdir( path.asString().c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -388,7 +384,7 @@ namespace zypp
       struct dirent * d;
 
       if ( ! (dp = opendir( dir.c_str() )) )
-        return _Log_Result( errno );
+        return logResult( errno );
 
       while ( (d = readdir(dp)) )
       {
@@ -420,14 +416,14 @@ namespace zypp
       PathInfo p( path );
 
       if ( !p.isExist() ) {
-        return _Log_Result( 0 );
+        return logResult( 0 );
       }
 
       if ( !p.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
-      return _Log_Result( recursive_rmdir_1( path ) );
+      return logResult( recursive_rmdir_1( path ) );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -441,14 +437,14 @@ namespace zypp
       PathInfo p( path );
 
       if ( !p.isExist() ) {
-        return _Log_Result( 0 );
+        return logResult( 0 );
       }
 
       if ( !p.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
-      return _Log_Result( recursive_rmdir_1( path, false/* don't remove path itself */ ) );
+      return logResult( recursive_rmdir_1( path, false/* don't remove path itself */ ) );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -462,17 +458,17 @@ namespace zypp
 
       PathInfo sp( srcpath );
       if ( !sp.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
       PathInfo dp( destpath );
       if ( !dp.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
       PathInfo tp( destpath + srcpath.basename() );
       if ( tp.isExist() ) {
-        return _Log_Result( EEXIST );
+        return logResult( EEXIST );
       }
 
 
@@ -489,7 +485,7 @@ namespace zypp
         MIL << "  " << output;
       }
       int ret = prog.close();
-      return _Log_Result( ret, "returned" );
+      return logResult( ret, "returned" );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -503,16 +499,16 @@ namespace zypp
 
       PathInfo sp( srcpath );
       if ( !sp.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
       PathInfo dp( destpath );
       if ( !dp.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
       if ( srcpath == destpath ) {
-        return _Log_Result( EEXIST );
+        return logResult( EEXIST );
       }
 
       std::string src( srcpath.asString());
@@ -530,7 +526,7 @@ namespace zypp
         MIL << "  " << output;
       }
       int ret = prog.close();
-      return _Log_Result( ret, "returned" );
+      return logResult( ret, "returned" );
     }
 
     ///////////////////////////////////////////////////////////////////////
@@ -553,7 +549,7 @@ namespace zypp
 
       MIL << "readdir " << dir_r << ' ';
       if ( ! dir )
-       return _Log_Result( errno );
+       return logResult( errno );
       MIL << endl; // close line before callbacks are invoked.
 
       int ret = 0;
@@ -658,9 +654,9 @@ namespace zypp
     {
       MIL << "unlink " << path;
       if ( ::unlink( path.asString().c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -672,9 +668,9 @@ namespace zypp
     {
       MIL << "rename " << oldpath << " -> " << newpath;
       if ( ::rename( oldpath.asString().c_str(), newpath.asString().c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -686,7 +682,7 @@ namespace zypp
     {
       MIL << "exchange " << lpath << " <-> " << rpath;
       if ( lpath.empty() || rpath.empty() )
-        return _Log_Result( EINVAL );
+        return logResult( EINVAL );
 
       PathInfo linfo( lpath );
       PathInfo rinfo( rpath );
@@ -694,16 +690,16 @@ namespace zypp
       if ( ! linfo.isExist() )
       {
         if ( ! rinfo.isExist() )
-          return _Log_Result( 0 ); // both don't exist.
+          return logResult( 0 ); // both don't exist.
 
         // just rename rpath -> lpath
         int ret = assert_dir( lpath.dirname() );
         if ( ret != 0 )
-          return _Log_Result( ret );
+          return logResult( ret );
         if ( ::rename( rpath.c_str(), lpath.c_str() ) == -1 ) {
-          return _Log_Result( errno );
+          return logResult( errno );
         }
-        return _Log_Result( 0 );
+        return logResult( 0 );
       }
 
       // HERE: lpath exists:
@@ -712,33 +708,33 @@ namespace zypp
         // just rename lpath -> rpath
         int ret = assert_dir( rpath.dirname() );
         if ( ret != 0 )
-          return _Log_Result( ret );
+          return logResult( ret );
         if ( ::rename( lpath.c_str(), rpath.c_str() ) == -1 ) {
-          return _Log_Result( errno );
+          return logResult( errno );
         }
-        return _Log_Result( 0 );
+        return logResult( 0 );
       }
 
       // HERE: both exist
       TmpFile tmpfile( TmpFile::makeSibling( rpath ) );
       if ( ! tmpfile )
-        return _Log_Result( errno );
+        return logResult( errno );
       Pathname tmp( tmpfile.path() );
       ::unlink( tmp.c_str() );
 
       if ( ::rename( lpath.c_str(), tmp.c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
       if ( ::rename( rpath.c_str(), lpath.c_str() ) == -1 ) {
         ::rename( tmp.c_str(), lpath.c_str() );
-        return _Log_Result( errno );
+        return logResult( errno );
       }
       if ( ::rename( tmp.c_str(), rpath.c_str() ) == -1 ) {
         ::rename( lpath.c_str(), rpath.c_str() );
         ::rename( tmp.c_str(), lpath.c_str() );
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -752,12 +748,12 @@ namespace zypp
 
       PathInfo sp( file );
       if ( !sp.isFile() ) {
-        return _Log_Result( EINVAL );
+        return logResult( EINVAL );
       }
 
       PathInfo dp( dest );
       if ( dp.isDir() ) {
-        return _Log_Result( EISDIR );
+        return logResult( EISDIR );
       }
 
       const char *const argv[] = {
@@ -773,7 +769,7 @@ namespace zypp
         MIL << "  " << output;
       }
       int ret = prog.close();
-      return _Log_Result( ret, "returned" );
+      return logResult( ret, "returned" );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -785,9 +781,9 @@ namespace zypp
     {
       MIL << "symlink " << newpath << " -> " << oldpath;
       if ( ::symlink( oldpath.asString().c_str(), newpath.asString().c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -799,9 +795,9 @@ namespace zypp
     {
       MIL << "hardlink " << newpath << " -> " << oldpath;
       if ( ::link( oldpath.asString().c_str(), newpath.asString().c_str() ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -825,7 +821,7 @@ namespace zypp
       {
        int res = unlink( newpath );
        if ( res != 0 )
-         return _Log_Result( res );
+         return logResult( res );
       }
 
       // Here: no symlink, no newpath
@@ -838,9 +834,9 @@ namespace zypp
             return copy( oldpath, newpath );
             break;
         }
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -857,7 +853,7 @@ namespace zypp
       {
         target_r = Pathname();
         MIL << "readlink " << symlink_r;
-        return _Log_Result( errno );
+        return logResult( errno );
       }
       buf[ret] = '\0';
       target_r = buf;
@@ -920,12 +916,12 @@ namespace zypp
 
       PathInfo sp( file );
       if ( !sp.isFile() ) {
-        return _Log_Result( EINVAL );
+        return logResult( EINVAL );
       }
 
       PathInfo dp( dest );
       if ( !dp.isDir() ) {
-        return _Log_Result( ENOTDIR );
+        return logResult( ENOTDIR );
       }
 
       const char *const argv[] = {
@@ -940,7 +936,7 @@ namespace zypp
         MIL << "  " << output;
       }
       int ret = prog.close();
-      return _Log_Result( ret, "returned" );
+      return logResult( ret, "returned" );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -1020,9 +1016,9 @@ namespace zypp
     {
       MIL << "chmod " << path << ' ' << str::octstring( mode );
       if ( ::chmod( path.asString().c_str(), mode ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     int addmod( const Pathname & path, mode_t mode )
@@ -1109,18 +1105,18 @@ namespace zypp
       int ret = assert_dir( path.dirname() );
       MIL << "assert_file " << str::octstring( mode ) << " " << path;
       if ( ret != 0 )
-        return _Log_Result( ret );
+        return logResult( ret );
 
       PathInfo pi( path );
       if ( pi.isExist() )
-        return _Log_Result( pi.isFile() ? 0 : EEXIST );
+        return logResult( pi.isFile() ? 0 : EEXIST );
 
       int fd = ::creat( path.c_str(), mode );
       if ( fd == -1 )
-        return _Log_Result( errno );
+        return logResult( errno );
 
       ::close( fd );
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     ///////////////////////////////////////////////////////////////////
@@ -1135,9 +1131,9 @@ namespace zypp
       times.actime = ::time( 0 );
       times.modtime = ::time( 0 );
       if ( ::utime( path.asString().c_str(), &times ) == -1 ) {
-        return _Log_Result( errno );
+        return logResult( errno );
       }
-      return _Log_Result( 0 );
+      return logResult( 0 );
     }
 
     /////////////////////////////////////////////////////////////////
index 4024bc7..4e00376 100644 (file)
@@ -50,12 +50,12 @@ namespace zypp
        {
          if ( _buffer.empty() )
          {
-           _DBG("PLUGIN") << "< (empty)" << endl;
+           L_DBG("PLUGIN") << "< (empty)" << endl;
          }
          else
          {
            std::istringstream datas( _buffer );
-           iostr::copyIndent( datas, _DBG("PLUGIN"), "< "  ) << endl;
+           iostr::copyIndent( datas, L_DBG("PLUGIN"), "< "  ) << endl;
          }
        }
       }
@@ -72,7 +72,7 @@ namespace zypp
       {
        std::string line;
        while ( _prog.stderrGetline( line ) )
-         _WAR("PLUGIN") << "! " << line << endl;
+         L_WAR("PLUGIN") << "! " << line << endl;
       }
       ExternalProgramWithStderr & _prog;
     };
@@ -274,7 +274,7 @@ namespace zypp
     if ( PLUGIN_DEBUG )
     {
       std::istringstream datas( data );
-      iostr::copyIndent( datas, _DBG("PLUGIN") ) << endl;
+      iostr::copyIndent( datas, L_DBG("PLUGIN") ) << endl;
     }
 
     // try writing the pipe....
index 943640e..40a6928 100644 (file)
@@ -83,8 +83,8 @@ namespace zypp
       { _ctor_init(); add( pi_r ); }
 
       /** Ctor feeding a range of  \ref sat::Solvable or \ref PoolItem. */
-      template<class _Iterator>
-      PoolItemBest( _Iterator begin_r, _Iterator end_r )
+      template<class TIterator>
+      PoolItemBest( TIterator begin_r, TIterator end_r )
       { _ctor_init(); add( begin_r, end_r ); }
 
     public:
@@ -96,8 +96,8 @@ namespace zypp
       void add( const PoolItem & pi_r );
 
       /** Feed a range of  \ref sat::Solvable or \ref PoolItem. */
-      template<class _Iterator>
-      void add( _Iterator begin_r, _Iterator end_r )
+      template<class TIterator>
+      void add( TIterator begin_r, TIterator end_r )
       {
         for_( it, begin_r, end_r )
           add( *it );
index 4e286b2..5fe838e 100644 (file)
@@ -209,8 +209,8 @@ namespace zypp
        * string representation instead. If you add new predicated, check the
        * deserialization code in \ref deserialize.
        */
-      template<class _Predicate>
-      void addPredicate( const _Predicate & predicate_r )
+      template<class TPredicate>
+      void addPredicate( const TPredicate & predicate_r )
       {
         predicate    = predicate_r;
         predicateStr = predicate_r.serialize();
index aa5e2d0..6c8237f 100644 (file)
@@ -97,8 +97,8 @@ namespace zypp
       { operator+=( query_r ); }
 
       /** Ctor adding a range of items for which \ref operator+= is defined. */
-      template<class _QueryResultIter>
-      PoolQueryResult( _QueryResultIter begin_r, _QueryResultIter end_r )
+      template<class TQueryResultIter>
+      PoolQueryResult( TQueryResultIter begin_r, TQueryResultIter end_r )
       {
         for_( it, begin_r, end_r )
         {
index 7c9bb3f..313b96c 100644 (file)
@@ -107,8 +107,8 @@ namespace zypp
     bool hasUpdateContentIdentifier( const Repository::ContentIdentifier & cident_r ) const;
 
     /** Whether one of the ContentIdentifier is listed as required update repository. */
-    template <class _Iterator>
-    bool hasUpdateContentIdentifier( _Iterator begin, _Iterator end ) const
+    template <class TIterator>
+    bool hasUpdateContentIdentifier( TIterator begin, TIterator end ) const
     {
       for_( it, begin, end )
        if ( hasUpdateContentIdentifier( *it ) )
index 4244de7..1cdb786 100644 (file)
@@ -130,7 +130,7 @@ namespace zypp
       }
       else
       { // translators: an annotation to a gpg keys expiry date
-       ret += str::form( _PL("(expires in %d day)", "(expires in %d days)", ttl ), ttl );
+       ret += str::form( PL_("(expires in %d day)", "(expires in %d days)", ttl ), ttl );
       }
     }
     return ret;
index 41878e3..3c9269e 100644 (file)
@@ -30,63 +30,59 @@ namespace zypp
   /**
    *
   */
-  template<class _Tp, class _Compare = Compare<_Tp> >
+  template<class Tp, class TCompare = Compare<Tp> >
     struct Range
     {
       /** */
       Rel op;
       /** */
-      _Tp value;
+      Tp value;
 
       /** Default ctor: \ref Rel::ANY. */
       Range()
       : op( Rel::ANY )
       {}
 
-      /** Ctor taking \a _Tp (\ref Rel::EQ). */
-      Range( const _Tp & value_r )
+      /** Ctor taking \a Tp (\ref Rel::EQ). */
+      Range( const Tp & value_r )
       : op( Rel::EQ )
       , value( value_r )
       {}
 
-      /** Ctor taking \ref Rel and \a _Tp. */
-      Range( Rel op_r, const _Tp & value_r )
+      /** Ctor taking \ref Rel and \a Tp. */
+      Range( Rel op_r, const Tp & value_r )
       : op( op_r )
       , value( value_r )
       {}
 
       /** Return whether two Ranges overlap. */
       bool overlaps( const Range & rhs ) const
-      {
-        return range_detail::overlaps( op, rhs.op,
-                                       _Compare()( value, rhs.value ) );
-      }
+      { return range_detail::overlaps( op, rhs.op, TCompare()( value, rhs.value ) ); }
     };
   ///////////////////////////////////////////////////////////////////
 
-  template<class _Tp, class _Compare>
-    inline bool overlaps( const Range<_Tp,_Compare> & lhs,
-                          const Range<_Tp,_Compare> & rhs )
+  template<class Tp, class TCompare>
+    inline bool overlaps( const Range<Tp,TCompare> & lhs,
+                          const Range<Tp,TCompare> & rhs )
     { return lhs.overlaps( rhs ); }
 
   ///////////////////////////////////////////////////////////////////
 
-  template<class _Tp, class _Compare>
-    inline bool operator==( const Range<_Tp,_Compare> & lhs,
-                            const Range<_Tp,_Compare> & rhs )
+  template<class Tp, class TCompare>
+    inline bool operator==( const Range<Tp,TCompare> & lhs,
+                            const Range<Tp,TCompare> & rhs )
     {
       return( lhs.op == rhs.op
               && (    lhs.op == Rel::ANY
                    || lhs.op == Rel::NONE
-                   || relCompare( Rel::EQ, lhs.value, rhs.value,
-                                  _Compare() )
+                   || relCompare( Rel::EQ, lhs.value, rhs.value, TCompare() )
                  )
             );
     }
 
-  template<class _Tp, class _Compare>
-    inline bool operator!=( const Range<_Tp,_Compare> & lhs,
-                            const Range<_Tp,_Compare> & rhs )
+  template<class Tp, class TCompare>
+    inline bool operator!=( const Range<Tp,TCompare> & lhs,
+                            const Range<Tp,TCompare> & rhs )
     { return ! ( lhs == rhs ); }
 
   /////////////////////////////////////////////////////////////////
index ac3dc1f..b644525 100644 (file)
@@ -36,10 +36,10 @@ namespace zypp
    * \code
    *     // Compare two elements returning -1, 0, 1
    *     //  if the elemants compare <,==,>.
-   *     static int compare( const _Tp & lhs, const _Tp & rhs );
+   *     static int compare( const Tp & lhs, const Tp & rhs );
    * \endcode
    *
-   * <tt>Compare\<_Tp\></tt> provides a functor wrapping \c compare.
+   * <tt>Compare\<Tp\></tt> provides a functor wrapping \c compare.
    * In case the general comparison method is named differently, the
    * class, or you, have to provide an approriate functor.
    *
@@ -54,7 +54,7 @@ namespace zypp
    *
    * Furthermore a bunch of functors using a certain opertator is
    * defined. All templated by type and general comparison
-   * method (defaults to Compare\<_Tp\>).
+   * method (defaults to Compare\<Tp\>).
    * \code
    * // Editions sets use lexicographical order per default:
    * std::set<Edition>
@@ -78,25 +78,25 @@ namespace zypp
   //@{
 
   /** General compare functor returning <tt>-1, 0, 1</tt>.
-   * Expects _Tp::compare to be a static comaprison method
+   * Expects Tp::compare to be a static comaprison method
    * returning <tt>-1, 0, 1</tt> if the elements compare
    * <tt>\<,==,\></tt>.
   */
-  template<class _Tp>
-    struct Compare : public std::binary_function<_Tp,_Tp,int>
+  template<class Tp>
+    struct Compare : public std::binary_function<Tp,Tp,int>
     {
-      int operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return _Tp::compare( lhs, rhs ); }
+      int operator()( const Tp & lhs, const Tp & rhs ) const
+      { return Tp::compare( lhs, rhs ); }
     };
 
   ///////////////////////////////////////////////////////////////////
 
   /** Comparison of two elements using relational operator \a op.
-   * Expects \a _Compare to be a binary operator returning
+   * Expects \a TCompare to be a binary operator returning
    * <tt>-1, 0, 1</tt> if the elemants compare <tt>\<,==,\></tt>.
    * \code
    *     // Signature of compare function or functor:
-   *     int compare( const _Tp & lhs, const _Tp & rhs );
+   *     int compare( const Tp & lhs, const Tp & rhs );
    * \endcode
    * \li If \a op is Rel::ANY, the expression is always \c true.
    * \li If \a op is Rel::NONE, the expression is always \c false.
@@ -104,9 +104,8 @@ namespace zypp
    *
    * \ingroup RelCompare
   */
-  template<class _Tp, class _Compare>
-    inline bool compareByRel( Rel op, const _Tp & lhs, const _Tp & rhs,
-                              _Compare compare )
+  template<class Tp, class TCompare>
+    inline bool compareByRel( Rel op, const Tp & lhs, const Tp & rhs, TCompare compare )
     {
       switch ( op.inSwitch() )
       {
@@ -138,90 +137,90 @@ namespace zypp
       return false;
     }
 
-  /** \ref compareByRel convenience using Compare<_Tp> as general compare
+  /** \ref compareByRel convenience using Compare<Tp> as general compare
    *  functor.
   */
-  template<class _Tp>
-    inline bool compareByRel( Rel op, const _Tp & lhs, const _Tp & rhs )
-    { return compareByRel( op, lhs, rhs, Compare<_Tp>() ); }
+  template<class Tp>
+    inline bool compareByRel( Rel op, const Tp & lhs, const Tp & rhs )
+    { return compareByRel( op, lhs, rhs, Compare<Tp>() ); }
 
   ///////////////////////////////////////////////////////////////////
 
   ///////////////////////////////////////////////////////////////////
 
   /** Functor to compare two elements by \ref Rel based on
-   * a general \a _Compare functor.
+   * a general \a TCompare functor.
    *
-   * Expects \a _Compare to be suitable for use in \ref compareByRel.
-   * Defaults to Compare\<_Tp\>.
+   * Expects \a TCompare to be suitable for use in \ref compareByRel.
+   * Defaults to Compare\<Tp\>.
   */
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareBy : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareBy : public std::binary_function<Tp,Tp,bool>
     {
       CompareBy( Rel op_r )
       : _op( op_r )
       {}
 
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( _op, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( _op, lhs, rhs, TCompare() ); }
 
       Rel _op;
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByEQ : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByEQ : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::EQ, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::EQ, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByNE : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByNE : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::NE, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::NE, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByLT : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByLT : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::LT, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::LT, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByLE : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByLE : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::LE, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::LE, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByGT : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByGT : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::GT, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::GT, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByGE : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByGE : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::GE, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::GE, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByANY : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByANY : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::ANY, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::ANY, lhs, rhs, TCompare() ); }
     };
 
-  template<class _Tp, class _Compare = Compare<_Tp> >
-    struct CompareByNONE : public std::binary_function<_Tp,_Tp,bool>
+  template<class Tp, class TCompare = Compare<Tp> >
+    struct CompareByNONE : public std::binary_function<Tp,Tp,bool>
     {
-      bool operator()( const _Tp & lhs, const _Tp & rhs ) const
-      { return compareByRel( Rel::NONE, lhs, rhs, _Compare() ); }
+      bool operator()( const Tp & lhs, const Tp & rhs ) const
+      { return compareByRel( Rel::NONE, lhs, rhs, TCompare() ); }
     };
 
   ///////////////////////////////////////////////////////////////////
index 6397759..7f38752 100644 (file)
@@ -346,12 +346,12 @@ namespace zypp
       /** Add content keywords */
       void addContent( const std::string & keyword_r );
       /** \overload add keywords from container */
-      template <class _Iterator>
-      void addContentFrom( _Iterator begin_r, _Iterator end_r )
+      template <class TIterator>
+      void addContentFrom( TIterator begin_r, TIterator end_r )
       { for_( it, begin_r, end_r ) addContent( *it ); }
       /** \overload  */
-      template <class _Container>
-      void addContentFrom( const _Container & container_r )
+      template <class TContainer>
+      void addContentFrom( const TContainer & container_r )
       { addContentFrom( container_r.begin(), container_r.end() ); }
 
       /** Check for content keywords.
@@ -361,20 +361,20 @@ namespace zypp
        */
       bool hasContent( const std::string & keyword_r = std::string() ) const;
       /** \overload check for \b all keywords being present */
-      template <class _Iterator>
-      bool hasContentAll( _Iterator begin_r, _Iterator end_r ) const
+      template <class TIterator>
+      bool hasContentAll( TIterator begin_r, TIterator end_r ) const
       { for_( it, begin_r, end_r ) if ( ! hasContent( *it ) ) return false; return true; }
       /** \overload  */
-      template <class _Container>
-      bool hasContentAll( const _Container & container_r ) const
+      template <class TContainer>
+      bool hasContentAll( const TContainer & container_r ) const
       { return hasContentAll( container_r.begin(), container_r.end() ); }
       /** \overload check for \b any keyword being present */
-      template <class _Iterator>
-      bool hasContentAny( _Iterator begin_r, _Iterator end_r ) const
+      template <class TIterator>
+      bool hasContentAny( TIterator begin_r, TIterator end_r ) const
       { for_( it, begin_r, end_r ) if ( hasContent( *it ) ) return true; return false; }
       /** \overload  */
-      template <class _Container>
-      bool hasContentAny( const _Container & container_r ) const
+      template <class TContainer>
+      bool hasContentAny( const TContainer & container_r ) const
       { return hasContentAny( container_r.begin(), container_r.end() ); }
 
     public:
index 2317a8d..416332b 100644 (file)
@@ -1009,7 +1009,7 @@ namespace zypp
     assert_urls(info);
 
     // we will throw this later if no URL checks out fine
-    RepoException rexception( info, _PL("Valid metadata not found at specified URL",
+    RepoException rexception( info, PL_("Valid metadata not found at specified URL",
                                        "Valid metadata not found at specified URLs",
                                        info.baseUrlsSize() ) );
 
index ae31925..40a633a 100644 (file)
@@ -39,15 +39,15 @@ namespace zypp
 
     /////////////////////////////////////////////////////////////////
 
-    ::_Repo * Repository::get() const
+    sat::detail::CRepo * Repository::get() const
     { return myPool().getRepo( _id ); }
 
 #define NO_REPOSITORY_RETURN( VAL ) \
-    ::_Repo * _repo( get() ); \
+    sat::detail::CRepo * _repo( get() ); \
     if ( ! _repo ) return VAL
 
 #define NO_REPOSITORY_THROW( VAL ) \
-    ::_Repo * _repo( get() ); \
+    sat::detail::CRepo * _repo( get() ); \
     if ( ! _repo ) ZYPP_THROW( VAL )
 
     bool Repository::isSystemRepo() const
@@ -396,7 +396,7 @@ namespace zypp
       {
        if ( base() )
        {
-         ::_Pool * satpool = sat::Pool::instance().get();
+         sat::detail::CPool * satpool = sat::Pool::instance().get();
          do {
            ++base_reference();
          } while ( base() < satpool->repos+satpool->nrepos && !*base() );
index 7e7c0f0..f3e26ba 100644 (file)
@@ -302,7 +302,7 @@ namespace zypp
 
     public:
         /** Expert backdoor. */
-        ::_Repo * get() const;
+        sat::detail::CRepo * get() const;
         /** Expert backdoor. */
         IdType id() const { return _id; }
         /** libsolv internal priorities.
@@ -444,7 +444,7 @@ namespace zypp
       /** */
       class RepositoryIterator : public boost::iterator_adaptor<
            RepositoryIterator                            // Derived
-                          , ::_Repo **                   // Base
+                          , sat::detail::CRepo **        // Base
                            , Repository                   // Value
                           , boost::forward_traversal_tag // CategoryOrTraversal
                           , Repository                   // Reference
@@ -455,7 +455,7 @@ namespace zypp
           : RepositoryIterator::iterator_adaptor_( 0 )
           {}
 
-          explicit RepositoryIterator( ::_Repo ** p )
+          explicit RepositoryIterator( sat::detail::CRepo ** p )
           : RepositoryIterator::iterator_adaptor_( p )
           {}
 
index e17c067..1b4ffd0 100644 (file)
@@ -152,9 +152,9 @@ namespace zypp
     typedef boost::function<bool ( ResObject::constPtr )> ResFilter;
 
     /** */
-    template<class _Res>
+    template<class TRes>
       inline filter::ByKind byKind()
-      { return filter::ByKind( ResTraits<_Res>::kind ); }
+      { return filter::ByKind( ResTraits<TRes>::kind ); }
 
     /** Select ResObject by name. */
     struct ByName : public ResObjectFilterFunctor
@@ -193,9 +193,9 @@ namespace zypp
       std::string _alias;
     };
 
-    /** Select ResObject by Edition using \a _Compare functor.
+    /** Select ResObject by Edition using \a TCompare functor.
      *
-     * Selects ResObject if <tt>_Compare( ResObject->edition(), _edition )</tt>
+     * Selects ResObject if <tt>TCompare( ResObject->edition(), _edition )</tt>
      * is \c true.
      * \code
      * // use the convenience funktions to create ByEdition:
@@ -205,11 +205,10 @@ namespace zypp
      * byEdition( someedition, CompareByGT<Edition>() ) //  edition >  someedition
      * \endcode
     */
-    template<class _Compare = CompareByEQ<Edition> >
+    template<class TCompare = CompareByEQ<Edition> >
       struct ByEdition : public ResObjectFilterFunctor
       {
-        ByEdition( const Edition & edition_r,
-                   _Compare cmp_r )
+        ByEdition( const Edition & edition_r, TCompare cmp_r )
         : _edition( edition_r )
         , _cmp( cmp_r )
         {}
@@ -220,23 +219,23 @@ namespace zypp
         }
 
         Edition  _edition;
-        _Compare _cmp;
+        TCompare _cmp;
       };
 
     /** */
-    template<class _Compare>
-      ByEdition<_Compare> byEdition( const Edition & edition_r, _Compare cmp_r )
-      { return ByEdition<_Compare>( edition_r, cmp_r ); }
+    template<class TCompare>
+      ByEdition<TCompare> byEdition( const Edition & edition_r, TCompare cmp_r )
+      { return ByEdition<TCompare>( edition_r, cmp_r ); }
 
     /** */
-    template<class _Compare>
-      ByEdition<_Compare> byEdition( const Edition & edition_r )
-      { return byEdition( edition_r, _Compare() ); }
+    template<class TCompare>
+      ByEdition<TCompare> byEdition( const Edition & edition_r )
+      { return byEdition( edition_r, TCompare() ); }
 
 
-    /** Select ResObject by Arch using \a _Compare functor.
+    /** Select ResObject by Arch using \a TCompare functor.
      *
-     * Selects ResObject if <tt>_Compare( ResObject->arch(), _arch )</tt>
+     * Selects ResObject if <tt>TCompare( ResObject->arch(), _arch )</tt>
      * is \c true.
      * \code
      * // use the convenience funktions to create ByArch:
@@ -246,11 +245,10 @@ namespace zypp
      * byArch( somearch, CompareByGT<Arch>() ) //  arch >  somearch
      * \endcode
     */
-    template<class _Compare = CompareByEQ<Arch> >
+    template<class TCompare = CompareByEQ<Arch> >
       struct ByArch : public ResObjectFilterFunctor
       {
-        ByArch( const Arch & arch_r,
-                   _Compare cmp_r )
+        ByArch( const Arch & arch_r, TCompare cmp_r )
         : _arch( arch_r )
         , _cmp( cmp_r )
         {}
@@ -261,18 +259,18 @@ namespace zypp
         }
 
         Arch  _arch;
-        _Compare _cmp;
+        TCompare _cmp;
       };
 
     /** */
-    template<class _Compare>
-      ByArch<_Compare> byArch( const Arch & arch_r, _Compare cmp_r )
-      { return ByArch<_Compare>( arch_r, cmp_r ); }
+    template<class TCompare>
+      ByArch<TCompare> byArch( const Arch & arch_r, TCompare cmp_r )
+      { return ByArch<TCompare>( arch_r, cmp_r ); }
 
     /** */
-    template<class _Compare>
-      ByArch<_Compare> byArch( const Arch & arch_r )
-      { return byArch( arch_r, _Compare() ); }
+    template<class TCompare>
+      ByArch<TCompare> byArch( const Arch & arch_r )
+      { return byArch( arch_r, TCompare() ); }
 
 
     ///////////////////////////////////////////////////////////////////
@@ -293,7 +291,6 @@ namespace zypp
       {
        return p.status().isInstalled();
       }
-
     };
 
     /** Select PoolItem by uninstalled. */
index a82499d..17afa2b 100644 (file)
@@ -56,11 +56,11 @@ namespace zypp
      *     DBG << pi->asKind<Package>()->keywords() << endl;
      * \endcode
      */
-    template<class _Res>
-    inline typename ResTraits<_Res>::constPtrType asKind() const;
+    template<class TRes>
+    inline typename ResTraits<TRes>::constPtrType asKind() const;
 
-    template<class _Res>
-    inline typename ResTraits<_Res>::PtrType asKind();
+    template<class TRes>
+    inline typename ResTraits<TRes>::PtrType asKind();
 
   public:
     /**
@@ -115,18 +115,18 @@ namespace zypp
    * \todo make<> was a poor choice (AFAIR because gcc had some trouble with
    * asKind<>(sat::Solvable)). Remove it in favour of asKind<>(sat::Solvable)
   */
-  template<class _Res>
-  inline typename ResTraits<_Res>::PtrType make( const sat::Solvable & solvable_r )
-  { return( isKind<_Res>( solvable_r ) ? new _Res( solvable_r ) : 0 ); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::PtrType make( const sat::Solvable & solvable_r )
+  { return( isKind<TRes>( solvable_r ) ? new TRes( solvable_r ) : 0 ); }
   /** \overload Specialisation for ResObject autodetecting the kind of resolvable. */
   template<>
   inline ResObject::Ptr make<ResObject>( const sat::Solvable & solvable_r )
   { return makeResObject( solvable_r ); }
 
   /** Directly create a certain kind of ResObject from \ref sat::Solvable. */
-  template<class _Res>
-  inline typename ResTraits<_Res>::PtrType asKind( const sat::Solvable & solvable_r )
-  { return make<_Res>( solvable_r ); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::PtrType asKind( const sat::Solvable & solvable_r )
+  { return make<TRes>( solvable_r ); }
 
   /** Convert ResObject::Ptr into Ptr of a certain Kind.
    * \return \c NULL iff \a p is \c NULL or points to a Resolvable
@@ -136,21 +136,21 @@ namespace zypp
    * asKind<Package>(resPtr);
    * \endcode
   */
-  template<class _Res>
-  inline typename ResTraits<_Res>::PtrType asKind( const ResObject::Ptr & p )
-  { return dynamic_pointer_cast<_Res>(p); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::PtrType asKind( const ResObject::Ptr & p )
+  { return dynamic_pointer_cast<TRes>(p); }
 
-  template<class _Res>
-  inline typename ResTraits<_Res>::constPtrType asKind( const ResObject::constPtr & p )
-  { return dynamic_pointer_cast<const _Res>(p); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::constPtrType asKind( const ResObject::constPtr & p )
+  { return dynamic_pointer_cast<const TRes>(p); }
 
-  template<class _Res>
-  inline typename ResTraits<_Res>::constPtrType ResObject::asKind() const
-  { return dynamic_cast<const _Res *>( this ); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::constPtrType ResObject::asKind() const
+  { return dynamic_cast<const TRes *>( this ); }
 
-  template<class _Res>
-  inline typename ResTraits<_Res>::PtrType ResObject::asKind()
-  { return dynamic_cast<_Res *>( this ); }
+  template<class TRes>
+  inline typename ResTraits<TRes>::PtrType ResObject::asKind()
+  { return dynamic_cast<TRes *>( this ); }
 
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 40938ff..2776718 100644 (file)
@@ -113,18 +113,18 @@ namespace zypp
       { return( resolvable_r ? find( resolvable_r->satSolvable() ) : PoolItem() ); }
 
     public:
-      /** \name Iterate over all PoolItems matching a \c _Filter. */
+      /** \name Iterate over all PoolItems matching a \c TFilter. */
       //@{
-      template<class _Filter>
-      filter_iterator<_Filter,const_iterator> filterBegin( const _Filter & filter_r ) const
+      template<class TFilter>
+      filter_iterator<TFilter,const_iterator> filterBegin( const TFilter & filter_r ) const
       { return make_filter_begin( filter_r, *this ); }
 
-      template<class _Filter>
-      filter_iterator<_Filter,const_iterator> filterEnd( const _Filter & filter_r ) const
+      template<class TFilter>
+      filter_iterator<TFilter,const_iterator> filterEnd( const TFilter & filter_r ) const
       { return make_filter_end( filter_r, *this ); }
 
-      template<class _Filter>
-      Iterable<filter_iterator<_Filter,const_iterator> > filter( const _Filter & filter_r ) const
+      template<class TFilter>
+      Iterable<filter_iterator<TFilter,const_iterator> > filter( const TFilter & filter_r ) const
       { return makeIterable( filterBegin( filter_r ), filterEnd( filter_r ) ); }
       //@}
 
@@ -175,13 +175,13 @@ namespace zypp
       byIdent_iterator byIdentBegin( ResKind kind_r, const C_Str & name_r ) const
       { return byIdentBegin( ByIdent(kind_r,name_r) ); }
 
-      template<class _Res>
+      template<class TRes>
       byIdent_iterator byIdentBegin( IdString name_r ) const
-      { return byIdentBegin( ByIdent(ResTraits<_Res>::kind,name_r) ); }
+      { return byIdentBegin( ByIdent(ResTraits<TRes>::kind,name_r) ); }
 
-      template<class _Res>
+      template<class TRes>
       byIdent_iterator byIdentBegin( const C_Str & name_r ) const
-      { return byIdentBegin( ByIdent(ResTraits<_Res>::kind,name_r) ); }
+      { return byIdentBegin( ByIdent(ResTraits<TRes>::kind,name_r) ); }
 
       /** Derive name and kind from \ref PoolItem. */
       byIdent_iterator byIdentBegin( const PoolItem & pi_r ) const
@@ -206,13 +206,13 @@ namespace zypp
       byIdent_iterator byIdentEnd( ResKind kind_r, const C_Str & name_r ) const
       { return byIdentEnd( ByIdent(kind_r,name_r) ); }
 
-      template<class _Res>
+      template<class TRes>
       byIdent_iterator byIdentEnd( IdString name_r ) const
-      { return byIdentEnd( ByIdent(ResTraits<_Res>::kind,name_r) ); }
+      { return byIdentEnd( ByIdent(ResTraits<TRes>::kind,name_r) ); }
 
-      template<class _Res>
+      template<class TRes>
       byIdent_iterator byIdentEnd( const C_Str & name_r ) const
-      { return byIdentEnd( ByIdent(ResTraits<_Res>::kind,name_r) ); }
+      { return byIdentEnd( ByIdent(ResTraits<TRes>::kind,name_r) ); }
 
       /** Derive name and kind from \ref PoolItem. */
       byIdent_iterator byIdentEnd( const PoolItem & pi_r ) const
@@ -234,13 +234,13 @@ namespace zypp
       Iterable<byIdent_iterator> byIdent( ResKind kind_r, const C_Str & name_r ) const
       { return makeIterable( byIdentBegin(  kind_r, name_r ), byIdentEnd(  kind_r, name_r ) ); }
 
-      template<class _Res>
+      template<class TRes>
       Iterable<byIdent_iterator> byIdent( IdString name_r ) const
-      { return makeIterable( byIdentBegin<_Res>( name_r ), byIdentEnd<_Res>( name_r ) ); }
+      { return makeIterable( byIdentBegin<TRes>( name_r ), byIdentEnd<TRes>( name_r ) ); }
 
-      template<class _Res>
+      template<class TRes>
       Iterable<byIdent_iterator> byIdent( const C_Str & name_r ) const
-      { return makeIterable( byIdentBegin<_Res>( name_r ), byIdentEnd<_Res>( name_r ) ); }
+      { return makeIterable( byIdentBegin<TRes>( name_r ), byIdentEnd<TRes>( name_r ) ); }
 
       Iterable<byIdent_iterator> byIdent( const PoolItem & pi_r ) const
       { return makeIterable( byIdentBegin( pi_r ), byIdentEnd( pi_r ) ); }
@@ -261,23 +261,23 @@ namespace zypp
       byKind_iterator byKindBegin( const ResKind & kind_r ) const
       { return make_filter_begin( ByKind(kind_r), *this ); }
 
-      template<class _Res>
+      template<class TRes>
           byKind_iterator byKindBegin() const
-      { return make_filter_begin( resfilter::byKind<_Res>(), *this ); }
+      { return make_filter_begin( resfilter::byKind<TRes>(), *this ); }
 
       byKind_iterator byKindEnd( const ResKind & kind_r ) const
       { return make_filter_end( ByKind(kind_r), *this ); }
 
-      template<class _Res>
+      template<class TRes>
           byKind_iterator byKindEnd() const
-      { return make_filter_end( resfilter::byKind<_Res>(), *this ); }
+      { return make_filter_end( resfilter::byKind<TRes>(), *this ); }
 
       Iterable<byKind_iterator> byKind( const ResKind & kind_r ) const
       { return makeIterable( byKindBegin( kind_r ), byKindEnd( kind_r ) ); }
 
-      template<class _Res>
+      template<class TRes>
       Iterable<byKind_iterator> byKind() const
-      { return makeIterable( byKindBegin<_Res>(), byKindEnd<_Res>() ); }
+      { return makeIterable( byKindBegin<TRes>(), byKindEnd<TRes>() ); }
       //@}
 
     public:
index 57a5793..c05ced5 100644 (file)
@@ -95,29 +95,29 @@ namespace zypp
     /** True if there are items of a certain kind. */
     bool empty( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       bool empty() const
-      { return empty( ResTraits<_Res>::kind ); }
+      { return empty( ResTraits<TRes>::kind ); }
 
     /** Number of Items of a certain kind.  */
     size_type size( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       size_type size() const
-      { return size( ResTraits<_Res>::kind ); }
+      { return size( ResTraits<TRes>::kind ); }
 
     const_iterator byKindBegin( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       const_iterator byKindBegin() const
-      { return byKindBegin( ResTraits<_Res>::kind ); }
+      { return byKindBegin( ResTraits<TRes>::kind ); }
 
 
     const_iterator byKindEnd( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       const_iterator byKindEnd() const
-      { return byKindEnd( ResTraits<_Res>::kind ); }
+      { return byKindEnd( ResTraits<TRes>::kind ); }
     //@}
 
  public:
@@ -141,9 +141,9 @@ namespace zypp
               != make_end<ui::selfilter::ByHasInstalledObj>( kind_r ) );
     }
 
-    template<class _Res>
+    template<class TRes>
       bool hasInstalledObj() const
-      { return hasInstalledObj( ResTraits<_Res>::kind ); }
+      { return hasInstalledObj( ResTraits<TRes>::kind ); }
 
   public:
     /** \name Save and restore state per kind of resolvable.
@@ -160,25 +160,25 @@ namespace zypp
 
     void saveState( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       void saveState() const
-      { return saveState( ResTraits<_Res>::kind ); }
+      { return saveState( ResTraits<TRes>::kind ); }
 
     void restoreState() const;
 
     void restoreState( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       void restoreState() const
-      { return restoreState( ResTraits<_Res>::kind ); }
+      { return restoreState( ResTraits<TRes>::kind ); }
 
     bool diffState() const;
 
     bool diffState( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       bool diffState() const
-      { return diffState( ResTraits<_Res>::kind ); }
+      { return diffState( ResTraits<TRes>::kind ); }
 
     /**
      * \class ScopedSaveState
@@ -193,42 +193,42 @@ namespace zypp
 
     ScopedSaveState scopedSaveState( const ResKind & kind_r ) const;
 
-    template<class _Res>
+    template<class TRes>
       ScopedSaveState && scopedSaveState() const
-      { return scopedSaveState( ResTraits<_Res>::kind ); }
+      { return scopedSaveState( ResTraits<TRes>::kind ); }
 
     //@}
 
   private:
-    template<class _Filter>
-      filter_iterator<_Filter,const_iterator>
-      make_begin( _Filter filter_r, const ResKind & kind_r ) const
+    template<class TFilter>
+      filter_iterator<TFilter,const_iterator>
+      make_begin( TFilter filter_r, const ResKind & kind_r ) const
       {
         return make_filter_iterator( filter_r,
                                      byKindBegin(kind_r),
                                      byKindEnd(kind_r) );
       }
-    template<class _Filter>
-      filter_iterator<_Filter,const_iterator>
+    template<class TFilter>
+      filter_iterator<TFilter,const_iterator>
       make_begin( const ResKind & kind_r ) const
       {
-        return make_begin( _Filter(), kind_r );
+        return make_begin( TFilter(), kind_r );
       }
 
 
-    template<class _Filter>
-      filter_iterator<_Filter,const_iterator>
-      make_end( _Filter filter_r, const ResKind & kind_r ) const
+    template<class TFilter>
+      filter_iterator<TFilter,const_iterator>
+      make_end( TFilter filter_r, const ResKind & kind_r ) const
       {
         return make_filter_iterator( filter_r,
                                      byKindEnd(kind_r),
                                      byKindEnd(kind_r) );
       }
-    template<class _Filter>
-      filter_iterator<_Filter,const_iterator>
+    template<class TFilter>
+      filter_iterator<TFilter,const_iterator>
       make_end( const ResKind & kind_r ) const
       {
-        return make_end( _Filter(), kind_r );
+        return make_end( TFilter(), kind_r );
       }
 
   private:
index 908e05b..499abc0 100644 (file)
@@ -663,25 +663,25 @@ namespace zypp
 
     /** Return whether the corresponding Field has value \a val_r.
     */
-    template<class _Field>
+    template<class TField>
       bool fieldValueIs( FieldType val_r ) const
-    { return _bitfield.isEqual<_Field>( val_r ); }
+    { return _bitfield.isEqual<TField>( val_r ); }
 
     /** Set the corresponding Field to value \a val_r.
     */
-    template<class _Field>
+    template<class TField>
       void fieldValueAssign( FieldType val_r )
-    { _bitfield.assign<_Field>( val_r ); }
+    { _bitfield.assign<TField>( val_r ); }
 
     /** compare two values.
     */
-    template<class _Field>
+    template<class TField>
       bool isGreaterThan( FieldType val_r )
-    { return _bitfield.value<_Field>() > val_r; }
+    { return _bitfield.value<TField>() > val_r; }
 
-    template<class _Field>
+    template<class TField>
       bool isLessThan( FieldType val_r )
-    { return _bitfield.value<_Field>() < val_r; }
+    { return _bitfield.value<TField>() < val_r; }
 
   private:
     friend class resstatus::StatusBackup;
index 42e4324..33097a4 100644 (file)
@@ -75,12 +75,12 @@ namespace zypp
   class PoolItem;
 
   /** ResTraits. Defines common types and the ResKind value. */
-  template<typename _Res>
+  template<typename TRes>
     struct ResTraits
     {
       typedef ResKind                   KindType;
-      typedef intrusive_ptr<_Res>       PtrType;
-      typedef intrusive_ptr<const _Res> constPtrType;
+      typedef intrusive_ptr<TRes>       PtrType;
+      typedef intrusive_ptr<const TRes> constPtrType;
 
       static const ResKind              kind;  ///< Defined in ResKind.cc
 
@@ -117,8 +117,8 @@ namespace zypp
    * ResKind packagekind = resKind<Package>();
    * \endcode
   */
-  template<typename _Res>
-    inline ResKind resKind() { return ResTraits<_Res>::kind; }
+  template<typename TRes>
+    inline ResKind resKind() { return ResTraits<TRes>::kind; }
 
   /** Convenient test for ResKinds.
    * \code
@@ -128,17 +128,17 @@ namespace zypp
    * if ( isKind<Package>( value ) )
    * \endcode
    */
-  template<typename _Res>
+  template<typename TRes>
     inline bool isKind( const ResKind & val_r )
-    { return( resKind<_Res>() == val_r ); }
+    { return( resKind<TRes>() == val_r ); }
   /** \overload */
-  template<typename _Res>
+  template<typename TRes>
     inline bool isKind( const std::string & val_r )
-    { return( resKind<_Res>() == val_r ); }
+    { return( resKind<TRes>() == val_r ); }
   /** \overload */
-  template<typename _Res>
+  template<typename TRes>
     inline bool isKind( const char * val_r )
-    { return( resKind<_Res>() == val_r ); }
+    { return( resKind<TRes>() == val_r ); }
 
 
   /////////////////////////////////////////////////////////////////
index 2917047..4430b6c 100644 (file)
@@ -95,9 +95,9 @@ namespace zypp
   * isKind<Package>(resPtr);
   * \endcode
   */
- template<class _Res>
+ template<class TRes>
  inline bool isKind( const Resolvable::constPtr & p )
- { return p && p->isKind<_Res>(); }
+ { return p && p->isKind<TRes>(); }
 
  // Specialization for Resolvable: Always true.
  template<>
@@ -118,13 +118,13 @@ namespace zypp
   * asKind<Package>(resPtr);
   * \endcode
   */
- template<class _Res>
- inline typename ResTraits<_Res>::PtrType asKind( const Resolvable::Ptr & p )
- { return dynamic_pointer_cast<_Res>(p); }
+ template<class TRes>
+ inline typename ResTraits<TRes>::PtrType asKind( const Resolvable::Ptr & p )
+ { return dynamic_pointer_cast<TRes>(p); }
 
- template<class _Res>
- inline typename ResTraits<_Res>::constPtrType asKind( const Resolvable::constPtr & p )
- { return dynamic_pointer_cast<const _Res>(p); }
+ template<class TRes>
+ inline typename ResTraits<TRes>::constPtrType asKind( const Resolvable::constPtr & p )
+ { return dynamic_pointer_cast<const TRes>(p); }
 
   ///////////////////////////////////////////////////////////////////
 
index 0f2a291..6e70740 100644 (file)
@@ -61,8 +61,8 @@ class VendorAttr
     /**
      * Adding new equivalent vendor set from list
      **/
-    template <class _Iterator>
-    void addVendorList( _Iterator begin, _Iterator end ) const
+    template <class TIterator>
+    void addVendorList( TIterator begin, TIterator end ) const
     { VendorList tmp( begin, end ); _addVendorList( tmp ); }
 
     /** Return whether two vendor strings shold be treated as the same vendor.
index ce071b1..e66235c 100644 (file)
@@ -230,10 +230,10 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   /** Mutable option. */
-  template<class _Tp>
+  template<class Tp>
       struct Option
       {
-       typedef _Tp value_type;
+       typedef Tp value_type;
 
        /** No default ctor, explicit initialisation! */
        Option( const value_type & initial_r )
@@ -261,14 +261,14 @@ namespace zypp
       };
 
   /** Mutable option with initial value also remembering a config value. */
-  template<class _Tp>
-      struct DefaultOption : public Option<_Tp>
+  template<class Tp>
+      struct DefaultOption : public Option<Tp>
       {
-       typedef _Tp         value_type;
-       typedef Option<_Tp> option_type;
+       typedef Tp         value_type;
+       typedef Option<Tp> option_type;
 
         DefaultOption( const value_type & initial_r )
-          : Option<_Tp>( initial_r ), _default( initial_r )
+          : Option<Tp>( initial_r ), _default( initial_r )
         {}
 
        /** Reset value to the current default. */
index a9331a1..ad61d55 100644 (file)
@@ -786,10 +786,10 @@ namespace zypp
   {
   public:
     /** message type (use like 'enum class \ref MsgType') */
-    struct _MsgTypeDef {
+    struct EMsgTypeDef {
       enum Enum { debug, info, warning, error, important, data };
     };
-    typedef base::EnumClass<_MsgTypeDef> MsgType;      ///< 'enum class MsgType'
+    typedef base::EnumClass<EMsgTypeDef> MsgType;      ///< 'enum class MsgType'
 
     /** typsafe map of userdata */
     typedef callback::UserData UserData;
index b67db98..3144994 100644 (file)
@@ -26,13 +26,13 @@ namespace zypp
    * \return Number of invokations of \a fnc_r, negative if
    * loop was aborted by \a fnc_.
   */
-  template <class _Iterator, class _Filter, class _Function>
-    inline int invokeOnEach( _Iterator begin_r, _Iterator end_r,
-                             _Filter filter_r,
-                             _Function fnc_r )
+  template <class TIterator, class TFilter, class TFunction>
+    inline int invokeOnEach( TIterator begin_r, TIterator end_r,
+                             TFilter filter_r,
+                             TFunction fnc_r )
     {
       int cnt = 0;
-      for ( _Iterator it = begin_r; it != end_r; ++it )
+      for ( TIterator it = begin_r; it != end_r; ++it )
         {
           if ( filter_r( *it ) )
             {
@@ -52,12 +52,12 @@ namespace zypp
    * \return Number of invokations of \a fnc_r, negative if
    * loop was aborted by \a fnc_.
   */
-  template <class _Iterator, class _Function>
-    inline int invokeOnEach( _Iterator begin_r, _Iterator end_r,
-                             _Function fnc_r )
+  template <class TIterator, class TFunction>
+    inline int invokeOnEach( TIterator begin_r, TIterator end_r,
+                             TFunction fnc_r )
     {
       int cnt = 0;
-      for ( _Iterator it = begin_r; it != end_r; ++it )
+      for ( TIterator it = begin_r; it != end_r; ++it )
         {
           ++cnt;
           if ( ! fnc_r( *it ) )
index 605e7b4..37a87d9 100644 (file)
@@ -21,39 +21,39 @@ namespace functor
 
   ///////////////////////////////////////////////////////////////////
   //
-  //   CLASS NAME : _Collector<_OutputIterator>
+  //   CLASS NAME : Collector<TOutputIterator>
   //
   /** Functor feeding values to an output_iterator.
    *
    * \code
    * LocaleSet locales;
    * for_each( begin(), end(),
-   *           Collector( std::inserter( locales_r, locales_r.begin() ) ) );
+   *           collector( std::inserter( locales_r, locales_r.begin() ) ) );
    * \endcode
    *
-   * \see Convenience constructor \ref Collector.
+   * \see Convenience constructor \ref collector.
    */
-  template<class _OutputIterator>
-  struct _Collector
+  template<class TOutputIterator>
+  struct Collector
   {
-    _Collector( _OutputIterator iter_r ) : _iter( iter_r ) {}
+    Collector( TOutputIterator iter_r ) : _iter( iter_r ) {}
 
-    template<class _Tp>
-    bool operator()( const _Tp & value_r ) const
+    template<class Tp>
+    bool operator()( const Tp & value_r ) const
     {
       *_iter++ = value_r;
       return true;
     }
 
     private:
-      mutable _OutputIterator _iter;
+      mutable TOutputIterator _iter;
   };
   ///////////////////////////////////////////////////////////////////
 
-  /** \relates _Collector Convenience constructor. */
-  template<class _OutputIterator>
-  inline _Collector<_OutputIterator> Collector( _OutputIterator iter_r )
-  { return _Collector<_OutputIterator>( iter_r ); }
+  /** \relates Collector Convenience constructor. */
+  template<class TOutputIterator>
+  inline Collector<TOutputIterator> collector( TOutputIterator iter_r )
+  { return Collector<TOutputIterator>( iter_r ); }
 
   ///////////////////////////////////////////////////////////////////
 
index ce5418d..a22a889 100644 (file)
@@ -24,22 +24,22 @@ namespace zypp
   //
   /** Integral type with initial value \c 0.
   */
-  template<class _IntT>
+  template<class TInt>
     class Counter
     {
     public:
-      Counter( _IntT value_r = _IntT(0) )
-      : _value( _IntT( value_r ) )
+      Counter( TInt value_r = TInt(0) )
+      : _value( TInt( value_r ) )
       {}
 
-      operator _IntT &()
+      operator TInt &()
       { return _value; }
 
-      operator const _IntT &() const
+      operator const TInt &() const
       { return _value; }
 
     public:
-      _IntT _value;
+      TInt _value;
     };
   ///////////////////////////////////////////////////////////////////
 
index 6d1545c..fb724b9 100644 (file)
@@ -92,23 +92,23 @@ namespace zypp
      * traced method, and traceCAD simply drops a line in the log.
      *
      * This tracer logs construction, copy construction, assignment,
-     * destruction and _PING.
+     * destruction and ping.
      *
      * assignment: In case the traced class defines an operator=
      * it must be altered to call TraceCAD::operator=, otherwise it
      * won't be triggered.
      *
-     * _PING: Completely up to you. Call _PING somewhere in the traced
+     * ping: Completely up to you. Call ping somewhere in the traced
      * class to indicate something. In case you overload traceCAD, do
-     * whatever is appropriate on _PING. It's just an offer to perform
+     * whatever is appropriate on ping. It's just an offer to perform
      * logging or actions here, and not in the traced code.
      *
      * But traceCAD may be overloaded to produce more stats.
      *
      * \see \c Example.COW_debug.cc.
      */
-    template<class _Tp>
-      struct TraceCAD : public base::ProvideNumericId<TraceCAD<_Tp>, unsigned long>
+    template<class Tp>
+      struct TraceCAD : public base::ProvideNumericId<TraceCAD<Tp>, unsigned long>
                       , public TraceCADBase
       {
         static unsigned long & _totalTraceCAD()
@@ -138,37 +138,37 @@ namespace zypp
         { --_totalTraceCAD();
           traceCAD( DTOR, *this, *this ); }
 
-        void _PING() const
+        void ping() const
         { traceCAD( PING, *this, *this ); }
       };
 
     /** \relates TraceCAD Stream output. */
-    template<class _Tp>
-      inline std::ostream & operator<<( std::ostream & str, const TraceCAD<_Tp> & obj )
+    template<class Tp>
+      inline std::ostream & operator<<( std::ostream & str, const TraceCAD<Tp> & obj )
       { return str << "(ID " << obj.numericId() << ", TOTAL " << obj._totalTraceCAD()
                    << ") [" << &obj << "] "; }
 
     /** Drop a log line about the traced method. Overload to
      * fit your needs.
     */
-    template<class _Tp>
+    template<class Tp>
       void traceCAD( TraceCADBase::What what_r,
-                     const TraceCAD<_Tp> & self_r,
-                     const TraceCAD<_Tp> & rhs_r )
+                     const TraceCAD<Tp> & self_r,
+                     const TraceCAD<Tp> & rhs_r )
       {
         switch( what_r )
           {
           case TraceCADBase::CTOR:
           case TraceCADBase::PING:
           case TraceCADBase::DTOR:
-            _DBG("DEBUG") << what_r << self_r << " (" << self_r._ident << ")" << std::endl;
+            L_DBG("DEBUG") << what_r << self_r << " (" << self_r._ident << ")" << std::endl;
             break;
 
           case TraceCADBase::COPYCTOR:
           case TraceCADBase::MOVECTOR:
           case TraceCADBase::ASSIGN:
           case TraceCADBase::MOVEASSIGN:
-            _DBG("DEBUG") << what_r << self_r << "( " << rhs_r << ")" << " (" << self_r._ident << ")" << std::endl;
+            L_DBG("DEBUG") << what_r << self_r << "( " << rhs_r << ")" << " (" << self_r._ident << ")" << std::endl;
             break;
           }
       }
index 39688f1..1dc8ac6 100644 (file)
@@ -23,7 +23,7 @@ namespace zypp
 
   ///////////////////////////////////////////////////////////////////
   //
-  //  CLASS NAME : DefaultIntegral<_Tp,_Initial>
+  //  CLASS NAME : DefaultIntegral<Tp,TInitial>
   //
   /** Integral type with defined initial value when default constructed.
    *
@@ -35,40 +35,40 @@ namespace zypp
    * \endcode
    *
    * \todo maybe specialize for bool, add logical and bit operators
-   * \todo let _Initial default to 0 then remove base/Counter.h
+   * \todo let TInitial default to 0 then remove base/Counter.h
   */
-  template<class _Tp, _Tp _Initial>
+  template<class Tp, Tp TInitial>
     class DefaultIntegral
     {
     public:
-      typedef _Tp value_type;
+      typedef Tp value_type;
 
     public:
-      DefaultIntegral( _Tp val_r = _Initial )
+      DefaultIntegral( Tp val_r = TInitial )
       : _val( val_r )
-      { BOOST_STATIC_ASSERT(boost::is_integral<_Tp>::value); }
+      { BOOST_STATIC_ASSERT(boost::is_integral<Tp>::value); }
 
-      /** Conversion to _Tp. */
+      /** Conversion to Tp. */
       //@{
-      _Tp & get()       { return _val; }
-      _Tp   get() const { return _val; }
+      Tp & get()       { return _val; }
+      Tp   get() const { return _val; }
 
-      operator _Tp &()       { return get(); }
-      operator _Tp  () const { return get(); }
+      operator Tp &()       { return get(); }
+      operator Tp  () const { return get(); }
       //@}
 
       /** Reset to the defined initial value. */
-      DefaultIntegral & reset()        { _val = _Initial; return *this; }
+      DefaultIntegral & reset()        { _val = TInitial; return *this; }
 
       /** \name Arithmetic operations.
-       * \c + \c - \c * \c / are provided via conversion to _Tp.
+       * \c + \c - \c * \c / are provided via conversion to Tp.
       */
       //@{
-      DefaultIntegral & operator=( _Tp rhs )  {  _val = rhs; return *this; }
-      DefaultIntegral & operator+=( _Tp rhs ) { _val += rhs; return *this; }
-      DefaultIntegral & operator-=( _Tp rhs ) { _val -= rhs; return *this; }
-      DefaultIntegral & operator*=( _Tp rhs ) { _val *= rhs; return *this; }
-      DefaultIntegral & operator/=( _Tp rhs ) { _val /= rhs; return *this; }
+      DefaultIntegral & operator=( Tp rhs )  {  _val = rhs; return *this; }
+      DefaultIntegral & operator+=( Tp rhs ) { _val += rhs; return *this; }
+      DefaultIntegral & operator-=( Tp rhs ) { _val -= rhs; return *this; }
+      DefaultIntegral & operator*=( Tp rhs ) { _val *= rhs; return *this; }
+      DefaultIntegral & operator/=( Tp rhs ) { _val /= rhs; return *this; }
 
       DefaultIntegral & operator++(/*prefix*/) { ++_val; return *this; }
       DefaultIntegral & operator--(/*prefix*/) { --_val; return *this; }
@@ -78,7 +78,7 @@ namespace zypp
       //@}
 
     private:
-      _Tp _val;
+      Tp _val;
     };
 
     /** \relates DefaultIntegral \c true initialized \c bool  */
index 48e8fdf..41c8b91 100644 (file)
@@ -49,29 +49,29 @@ namespace zypp
   class DtorReset
   {
   public:
-    template<class _Var>
-      DtorReset( _Var & var_r )
-      : _pimpl( new Impl<_Var,_Var>( var_r, var_r ) )
+    template<class TVar>
+      DtorReset( TVar & var_r )
+      : _pimpl( new Impl<TVar,TVar>( var_r, var_r ) )
       {}
-    template<class _Var, class _Val>
-      DtorReset( _Var & var_r, const _Val & val_r )
-      : _pimpl( new Impl<_Var,_Val>( var_r, val_r ) )
+    template<class TVar, class TVal>
+      DtorReset( TVar & var_r, const TVal & val_r )
+      : _pimpl( new Impl<TVar,TVal>( var_r, val_r ) )
       {}
 
   private:
-    /** Requires _Val being copy constructible, and assignment
-     * <tt>_Var = _Val</tt> defined. */
-    template<class _Var, class _Val>
+    /** Requires TVal being copy constructible, and assignment
+     * <tt>TVar = TVal</tt> defined. */
+    template<class TVar, class TVal>
       struct Impl
       {
-        Impl( _Var & var_r, const _Val & val_r )
+        Impl( TVar & var_r, const TVal & val_r )
         : _var( var_r )
         , _val( val_r )
         {}
         ~Impl()
         { _var = _val; }
-        _Var & _var;
-        _Val   _val;
+        TVar & _var;
+        TVal   _val;
       };
     shared_ptr<void> _pimpl;
   };
index 747b413..d7f2b1a 100644 (file)
@@ -25,37 +25,37 @@ namespace zypp
     /// \class EnumClass
     /// \brief Type safe enum (workaround SWIG not supporting enum class)
     /// \code
-    /// struct _ColorDef { enum Enum { R, G ,B }; };
-    /// typedef EnumClass<_ColorDef> Color;
+    /// struct EColorDef { enum Enum { R, G ,B }; };
+    /// typedef EnumClass<EColorDef> Color;
     /// \endcode
     /// Conversion to from string can be easily added, e.g. like this:
     /// \code
-    /// struct _ColorDef {
+    /// struct EColorDef {
     ///   enum Enum { R, G ,B };
     ///   static Enum fromString( const std::string & val_r );
     ///   static const std::string & asString( Enum val_r );
     /// };
-    /// std::ostream & operator<<( std::ostream & str, const _ColorDef & obj )
-    /// { return str << _ColorDef::asString( obj.inSwitch() ); }
+    /// std::ostream & operator<<( std::ostream & str, const EColorDef & obj )
+    /// { return str << EColorDef::asString( obj.inSwitch() ); }
     ///
-    /// typedef EnumClass<_ColorDef> Color;
+    /// typedef EnumClass<EColorDef> Color;
     /// Color red = Color::fromString("red");
     /// cout << red << endl; // "red"
     /// \endcode
     ///////////////////////////////////////////////////////////////////
-    template<typename _EnumDef>
-    class EnumClass : public _EnumDef
+    template<typename TEnumDef>
+    class EnumClass : public TEnumDef
     {
     public:
-      typedef typename _EnumDef::Enum Enum;            ///< The underlying enum type
+      typedef typename TEnumDef::Enum Enum;            ///< The underlying enum type
       typedef typename std::underlying_type<Enum>::type Integral;///< The underlying integral type
 
       EnumClass( Enum val_r ) : _val( val_r ) {}
 
       /** Underlying enum value for use in switch
        * \code
-       * struct _ColorDef { enum Enum { R, G ,B }; }
-       * typedef EnumClass<_ColorDef> Color;
+       * struct EColorDef { enum Enum { R, G ,B }; }
+       * typedef EnumClass<EColorDef> Color;
        *
        * Color a;
        * switch ( a.asEnum() )
@@ -65,8 +65,8 @@ namespace zypp
 
       /** Underlying integral value (e.g. array index)
        * \code
-       * struct _ColorDef { enum Enum { R, G ,B }; }
-       * typedef EnumClass<_ColorDef> Color;
+       * struct EColorDef { enum Enum { R, G ,B }; }
+       * typedef EnumClass<EColorDef> Color;
        *
        * Color a;
        * std::string table[] = { "red", "green", "blue" };
index 4d0f5be..3bde1ee 100644 (file)
@@ -279,36 +279,37 @@ namespace zypp
   std::ostream & operator<<( std::ostream & str, const Exception & obj );
 
   ///////////////////////////////////////////////////////////////////
-
-  /** Helper for \ref ZYPP_THROW. */
-  template<class _Excpt>
-    void _ZYPP_THROW( const _Excpt & excpt_r, const exception_detail::CodeLocation & where_r ) __attribute__((noreturn));
-  template<class _Excpt>
-    void _ZYPP_THROW( const _Excpt & excpt_r, const exception_detail::CodeLocation & where_r )
+  namespace exception_detail
+  {
+    /** Helper for \ref ZYPP_THROW. */
+    template<class TExcpt>
+    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    template<class TExcpt>
+    void do_ZYPP_THROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       excpt_r.relocate( where_r );
       Exception::log( excpt_r, where_r, "THROW:   " );
       throw( excpt_r );
     }
 
-  /** Helper for \ref ZYPP_THROW. */
-  template<class _Excpt>
-    void _ZYPP_CAUGHT( const _Excpt & excpt_r, const exception_detail::CodeLocation & where_r )
+    /** Helper for \ref ZYPP_THROW. */
+    template<class TExcpt>
+    void do_ZYPP_CAUGHT( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "CAUGHT:  " );
     }
 
-  /** Helper for \ref ZYPP_THROW. */
-  template<class _Excpt>
-    void _ZYPP_RETHROW( const _Excpt & excpt_r, const exception_detail::CodeLocation & where_r ) __attribute__((noreturn));
-  template<class _Excpt>
-    void _ZYPP_RETHROW( const _Excpt & excpt_r, const exception_detail::CodeLocation & where_r )
+    /** Helper for \ref ZYPP_THROW. */
+    template<class TExcpt>
+    void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r ) __attribute__((noreturn));
+    template<class TExcpt>
+    void do_ZYPP_RETHROW( const TExcpt & excpt_r, const CodeLocation & where_r )
     {
       Exception::log( excpt_r, where_r, "RETHROW: " );
       excpt_r.relocate( where_r );
       throw;
     }
-
+  } // namespace exception_detail
   ///////////////////////////////////////////////////////////////////
 
   /** \defgroup ZYPP_THROW ZYPP_THROW macros
@@ -318,15 +319,15 @@ namespace zypp
   //@{
   /** Drops a logline and throws the Exception. */
 #define ZYPP_THROW(EXCPT)\
-  _ZYPP_THROW( EXCPT, ZYPP_EX_CODELOCATION )
+  ::zypp::exception_detail::do_ZYPP_THROW( EXCPT, ZYPP_EX_CODELOCATION )
 
   /** Drops a logline telling the Exception was caught (in order to handle it). */
 #define ZYPP_CAUGHT(EXCPT)\
-  _ZYPP_CAUGHT( EXCPT, ZYPP_EX_CODELOCATION )
+  ::zypp::exception_detail::do_ZYPP_CAUGHT( EXCPT, ZYPP_EX_CODELOCATION )
 
   /** Drops a logline and rethrows, updating the CodeLocation. */
 #define ZYPP_RETHROW(EXCPT)\
-  _ZYPP_RETHROW( EXCPT, ZYPP_EX_CODELOCATION )
+  ::zypp::exception_detail::do_ZYPP_RETHROW( EXCPT, ZYPP_EX_CODELOCATION )
 
 
   /** Throw Exception built from a message string. */
index 816ce19..e05eca5 100644 (file)
@@ -54,11 +54,11 @@ namespace zypp
      *  }
      * \endcode
      */
-    template<typename _Enum>
+    template<typename TEnum>
     class Flags
     {
       public:
-        typedef _Enum Enum;    ///< The underlying enum type
+        typedef TEnum Enum;    ///< The underlying enum type
         typedef typename std::underlying_type<Enum>::type Integral;    ///< The underlying integral type
 
       public:
@@ -162,13 +162,13 @@ namespace zypp
       return ret;
     }
 
-    template<typename _Enum>
-    inline std::ostream & operator<<( std::ostream & str, const Flags<_Enum> & obj )
+    template<typename TEnum>
+    inline std::ostream & operator<<( std::ostream & str, const Flags<TEnum> & obj )
     { return str << str::hexstring(obj); }
 
-    template<typename _Enum>
-    inline std::ostream & operator<<( std::ostream & str, const typename Flags<_Enum>::Enum & obj )
-    { return str << Flags<_Enum>(obj); }
+    template<typename TEnum>
+    inline std::ostream & operator<<( std::ostream & str, const typename Flags<TEnum>::Enum & obj )
+    { return str << Flags<TEnum>(obj); }
 
     /** \relates Flags */
 #define ZYPP_DECLARE_FLAGS(Name,Enum) typedef zypp::base::Flags<Enum> Name
index 9d6de50..80942c3 100644 (file)
@@ -33,7 +33,7 @@ namespace zypp
   namespace functor
   { /////////////////////////////////////////////////////////////////
 
-    /** An unary functor forwarding to some other <tt>_Functor &</tt>.
+    /** An unary functor forwarding to some other <tt>TFunctor &</tt>.
      * \ingroup g_Functor
      *
      * Most algorithms take functor arguments by value. That's inconvenient
@@ -42,10 +42,10 @@ namespace zypp
      *
      * \code
      *   // Counts invokations of operator().
-     *   template<class _Tp>
-     *     struct Counter : public std::unary_function<_Tp, void>
+     *   template<class Tp>
+     *     struct Counter : public std::unary_function<Tp, void>
      *     {
-     *       void operator()( _Tp )
+     *       void operator()( Tp )
      *       { ++_value; }
      *
      *       Counter() : _value( 0 ) {}
@@ -64,7 +64,7 @@ namespace zypp
      * \endcode
      *
      * \note FunctorRef must be able to deduce the signature of
-     * \c _Functor::operator(). This is currently not automated,
+     * \c TFunctor::operator(). This is currently not automated,
      * so you must specify the operator() signature as template
      * arguments.
      *
@@ -77,10 +77,10 @@ namespace zypp
     /////////////////////////////////////////////////////////////////
     namespace functor_detail
     {
-      template <class _Functor, class res_type>
+      template <class TFunctor, class res_type>
         struct FunctorRef0
         {
-          FunctorRef0( _Functor & f_r )
+          FunctorRef0( TFunctor & f_r )
           : _f( f_r )
           {}
 
@@ -90,13 +90,13 @@ namespace zypp
           }
 
         private:
-          _Functor & _f;
+          TFunctor & _f;
         };
 
-      template <class _Functor, class res_type, class arg1_type>
+      template <class TFunctor, class res_type, class arg1_type>
         struct FunctorRef1 : public std::unary_function<arg1_type, res_type>
         {
-          FunctorRef1( _Functor & f_r )
+          FunctorRef1( TFunctor & f_r )
           : _f( f_r )
           {}
 
@@ -106,13 +106,13 @@ namespace zypp
           }
 
         private:
-          _Functor & _f;
+          TFunctor & _f;
         };
 
-      template <class _Functor, class res_type, class arg1_type, class arg2_type>
+      template <class TFunctor, class res_type, class arg1_type, class arg2_type>
         struct FunctorRef2 : public std::binary_function<arg1_type, arg2_type, res_type>
         {
-          FunctorRef2( _Functor & f_r )
+          FunctorRef2( TFunctor & f_r )
           : _f( f_r )
           {}
 
@@ -122,7 +122,7 @@ namespace zypp
           }
 
         private:
-          _Functor & _f;
+          TFunctor & _f;
         };
 
       struct nil
@@ -133,53 +133,53 @@ namespace zypp
     /** A binary \ref FunctorRef.
      * Create it using \ref functorRef convenience function.
     */
-    template <class _Functor, class res_type, class arg1_type = functor_detail::nil,
+    template <class TFunctor, class res_type, class arg1_type = functor_detail::nil,
                                               class arg2_type = functor_detail::nil>
       struct FunctorRef
-      : public functor_detail::FunctorRef2<_Functor, res_type, arg1_type, arg2_type>
+      : public functor_detail::FunctorRef2<TFunctor, res_type, arg1_type, arg2_type>
       {
-        FunctorRef( _Functor & f_r )
-        : functor_detail::FunctorRef2<_Functor, res_type, arg1_type, arg2_type>( f_r )
+        FunctorRef( TFunctor & f_r )
+        : functor_detail::FunctorRef2<TFunctor, res_type, arg1_type, arg2_type>( f_r )
         {}
       };
 
     /** A unary \ref FunctorRef.
      * Create it using \ref functorRef convenience function.
     */
-    template <class _Functor, class res_type, class arg1_type>
-      struct FunctorRef<_Functor, res_type, arg1_type>
-      : public functor_detail::FunctorRef1<_Functor, res_type, arg1_type>
+    template <class TFunctor, class res_type, class arg1_type>
+      struct FunctorRef<TFunctor, res_type, arg1_type>
+      : public functor_detail::FunctorRef1<TFunctor, res_type, arg1_type>
       {
-        FunctorRef( _Functor & f_r )
-        : functor_detail::FunctorRef1<_Functor, res_type, arg1_type>( f_r )
+        FunctorRef( TFunctor & f_r )
+        : functor_detail::FunctorRef1<TFunctor, res_type, arg1_type>( f_r )
         {}
       };
 
     /** A nullary \ref FunctorRef.
      * Create it using \ref functorRef convenience function.
     */
-    template <class _Functor, class res_type>
-      struct FunctorRef<_Functor, res_type>
-      : public functor_detail::FunctorRef0<_Functor, res_type>
+    template <class TFunctor, class res_type>
+      struct FunctorRef<TFunctor, res_type>
+      : public functor_detail::FunctorRef0<TFunctor, res_type>
       {
-        FunctorRef( _Functor & f_r )
-        : functor_detail::FunctorRef0<_Functor, res_type>( f_r )
+        FunctorRef( TFunctor & f_r )
+        : functor_detail::FunctorRef0<TFunctor, res_type>( f_r )
         {}
       };
 
     /** Convenience function creating a binary \ref FunctorRef. */
-    template <class res_type, class arg1_type, class arg2_type, class _Functor>
-      FunctorRef<_Functor, res_type, arg1_type, arg2_type>
-      functorRef( _Functor & f_r )
-      { return FunctorRef<_Functor, res_type, arg1_type, arg2_type>( f_r ); }
-    template <class res_type, class arg1_type, class _Functor>
-      FunctorRef<_Functor, res_type, arg1_type>
-      functorRef( _Functor & f_r )
-      { return FunctorRef<_Functor, res_type, arg1_type>( f_r ); }
-    template <class res_type, class _Functor>
-      FunctorRef<_Functor, res_type>
-      functorRef( _Functor & f_r )
-      { return FunctorRef<_Functor, res_type>( f_r ); }
+    template <class res_type, class arg1_type, class arg2_type, class TFunctor>
+      FunctorRef<TFunctor, res_type, arg1_type, arg2_type>
+      functorRef( TFunctor & f_r )
+      { return FunctorRef<TFunctor, res_type, arg1_type, arg2_type>( f_r ); }
+    template <class res_type, class arg1_type, class TFunctor>
+      FunctorRef<TFunctor, res_type, arg1_type>
+      functorRef( TFunctor & f_r )
+      { return FunctorRef<TFunctor, res_type, arg1_type>( f_r ); }
+    template <class res_type, class TFunctor>
+      FunctorRef<TFunctor, res_type>
+      functorRef( TFunctor & f_r )
+      { return FunctorRef<TFunctor, res_type>( f_r ); }
 
     /////////////////////////////////////////////////////////////////
 
@@ -190,10 +190,10 @@ namespace zypp
      *
      * \li \ref True and \ref False. No supprise, they always return
      *     \c true or \c false.
-     * \li \ref Not\<_Condition\>. _Condition is a functor, and
+     * \li \ref Not\<TCondition\>. TCondition is a functor, and
      *     it's result is inverted.
-     * \li \ref Chain\<_ACondition,_BCondition\>. \c _ACondition and \c _BCondition
-     *     are functors, and Chain evaluates <tt>_ACondition && _BCondition</tt>.
+     * \li \ref Chain\<TACondition,TBCondition\>. \c TACondition and \c TBCondition
+     *     are functors, and Chain evaluates <tt>TACondition && TBCondition</tt>.
      *
      * As it's no fun to get and write the correct template arguments,
      * convenience functions creating the correct functor are provided.
@@ -214,35 +214,33 @@ namespace zypp
     */
     //@{
 
-    /* functor that always returns a copied
-       value */
-    template<class T>
+    /* functor that always returns a copied value */
+    template<class TConst>
     struct Constant
     {
-      Constant( const T &value )
+      Constant( const TConst &value )
         : _value(value)
       {}
 
-      template<class _Tp>
-      T operator()( _Tp ) const
+      template<class Tp>
+      TConst operator()( Tp ) const
       { return _value; }
 
-      T operator()() const
+      TConst operator()() const
       { return _value; }
 
-      T _value;
+      TConst _value;
     };
 
-    template<class T>
-    inline Constant<T> constant( const T &value )
-    { return Constant<T>(value); }
+    template<class TConst>
+    inline Constant<TConst> constant( const TConst &value )
+    { return Constant<TConst>(value); }
 
-    /** Logical functor always \c true.
-    */
+    /** Logical functor always \c true. */
     struct True
     {
-      template<class _Tp>
-        bool operator()( _Tp ) const
+      template<class Tp>
+        bool operator()( Tp ) const
         {
           return true;
         }
@@ -256,8 +254,8 @@ namespace zypp
     */
     struct False
     {
-      template<class _Tp>
-        bool operator()( _Tp ) const
+      template<class Tp>
+        bool operator()( Tp ) const
         {
           return false;
         }
@@ -267,87 +265,87 @@ namespace zypp
     inline False false_c()
     { return False(); }
 
-    /** Logical functor inverting \a _Condition.
+    /** Logical functor inverting \a TCondition.
     */
-    template<class _Condition>
+    template<class TCondition>
       struct Not
       {
-        Not( _Condition cond_r )
+        Not( TCondition cond_r )
         : _cond( cond_r )
         {}
 
-        template<class _Tp>
-          bool operator()( _Tp t ) const
+        template<class Tp>
+          bool operator()( Tp t ) const
           {
             return ! _cond( t );
           }
 
-        _Condition _cond;
+        TCondition _cond;
       };
 
-    /** Convenience function for creating a Not from \a _Condition. */
-    template<class _Condition>
-      inline Not<_Condition> not_c( _Condition cond_r )
+    /** Convenience function for creating a Not from \a TCondition. */
+    template<class TCondition>
+      inline Not<TCondition> not_c( TCondition cond_r )
       {
-        return Not<_Condition>( cond_r );
+        return Not<TCondition>( cond_r );
       }
 
-    /** Logical functor chaining \a _ACondition \c OR \a _BCondition.
+    /** Logical functor chaining \a TACondition \c OR \a TBCondition.
     */
-    template<class _ACondition, class _BCondition>
+    template<class TACondition, class TBCondition>
       struct Or
       {
-        Or( _ACondition conda_r, _BCondition condb_r )
+        Or( TACondition conda_r, TBCondition condb_r )
         : _conda( conda_r )
         , _condb( condb_r )
         {}
 
-        template<class _Tp>
-          bool operator()( _Tp t ) const
+        template<class Tp>
+          bool operator()( Tp t ) const
           {
             return _conda( t ) || _condb( t );
           }
 
-        _ACondition _conda;
-        _BCondition _condb;
+        TACondition _conda;
+        TBCondition _condb;
       };
 
     /** Convenience function for creating a Or from two conditions
      *  \a conda_r OR \a condb_r.
     */
-    template<class _ACondition, class _BCondition>
-      inline Or<_ACondition, _BCondition> or_c( _ACondition conda_r, _BCondition condb_r )
+    template<class TACondition, class TBCondition>
+      inline Or<TACondition, TBCondition> or_c( TACondition conda_r, TBCondition condb_r )
       {
-        return Or<_ACondition, _BCondition>( conda_r, condb_r );
+        return Or<TACondition, TBCondition>( conda_r, condb_r );
       }
 
-    /** Logical functor chaining \a _ACondition \c AND \a _BCondition.
+    /** Logical functor chaining \a TACondition \c AND \a TBCondition.
     */
-    template<class _ACondition, class _BCondition>
+    template<class TACondition, class TBCondition>
       struct Chain
       {
-        Chain( _ACondition conda_r, _BCondition condb_r )
+        Chain( TACondition conda_r, TBCondition condb_r )
         : _conda( conda_r )
         , _condb( condb_r )
         {}
 
-        template<class _Tp>
-          bool operator()( _Tp t ) const
+        template<class Tp>
+          bool operator()( Tp t ) const
           {
             return _conda( t ) && _condb( t );
           }
 
-        _ACondition _conda;
-        _BCondition _condb;
+        TACondition _conda;
+        TBCondition _condb;
       };
 
     /** Convenience function for creating a Chain from two conditions
      *  \a conda_r and \a condb_r.
     */
-    template<class _ACondition, class _BCondition>
-      inline Chain<_ACondition, _BCondition> chain( _ACondition conda_r, _BCondition condb_r )
+    template<class TACondition, class TBCondition>
+      inline Chain<TACondition, TBCondition> chain( TACondition conda_r, TBCondition condb_r )
       {
-        return Chain<_ACondition, _BCondition>( conda_r, condb_r );
+        return Chain<TACondition, TBCondition>( conda_r, condb_r );
       }
 
     //@}
@@ -366,44 +364,44 @@ namespace zypp
      *                 getFirst( result ) );
      * \endcode
      */
-    template<class _Tp>
+    template<class Tp>
     struct GetFirst
     {
-      GetFirst( _Tp & result_r )
+      GetFirst( Tp & result_r )
         : _result( &result_r )
       {}
-      bool operator()( const _Tp & val_r )
+      bool operator()( const Tp & val_r )
       { *_result = val_r; return false; }
 
       private:
-        _Tp * _result;
+        Tp * _result;
     };
 
     /** Convenience function for creating \ref GetFirst. */
-    template<class _Tp>
-    GetFirst<_Tp> getFirst( _Tp & result_r )
-    { return GetFirst<_Tp>( result_r ); }
+    template<class Tp>
+    GetFirst<Tp> getFirst( Tp & result_r )
+    { return GetFirst<Tp>( result_r ); }
 
 
     /** Strore the last result found in the variable passed to the ctor.
      */
-    template<class _Tp>
+    template<class Tp>
     struct GetLast
     {
-      GetLast( _Tp & result_r )
+      GetLast( Tp & result_r )
         : _result( &result_r )
       {}
-      bool operator()( const _Tp & val_r )
+      bool operator()( const Tp & val_r )
       { *_result = val_r; return true; }
 
       private:
-        _Tp * _result;
+        Tp * _result;
     };
 
     /** Convenience function for creating \ref GetLast. */
-    template<class _Tp>
-    GetLast<_Tp> getLast( _Tp & result_r )
-    { return GetLast<_Tp>( result_r ); }
+    template<class Tp>
+    GetLast<Tp> getLast( Tp & result_r )
+    { return GetLast<Tp>( result_r ); }
 
 
     /** Store all results found to some output_iterator.
@@ -413,25 +411,25 @@ namespace zypp
                                            sysRoot / "etc/products.d" );
      * \endcode
      */
-    template<class _OutputIterator>
+    template<class TOutputIterator>
     struct GetAll
     {
-      GetAll( _OutputIterator result_r )
+      GetAll( TOutputIterator result_r )
         : _result( result_r )
       {}
 
-      template<class _Tp>
-      bool operator()(  const _Tp & val_r ) const
+      template<class Tp>
+      bool operator()(  const Tp & val_r ) const
       { *(_result++) = val_r; return true; }
 
       private:
-        mutable _OutputIterator _result;
+        mutable TOutputIterator _result;
     };
 
     /** Convenience function for creating \ref GetAll. */
-    template<class _OutputIterator>
-    GetAll<_OutputIterator> getAll( _OutputIterator result_r )
-    { return GetAll<_OutputIterator>( result_r ); }
+    template<class TOutputIterator>
+    GetAll<TOutputIterator> getAll( TOutputIterator result_r )
+    { return GetAll<TOutputIterator>( result_r ); }
 
     //@}
     ///////////////////////////////////////////////////////////////////
index 7d0f507..8bbcc87 100644 (file)
 #define _(MSG) ::zypp::gettext::dgettext( MSG )
 
 /** Return translated text (plural form). */
-#define _PL(MSG1,MSG2,N) ::zypp::gettext::dngettext( MSG1, MSG2, N )
+#define PL_(MSG1,MSG2,N) ::zypp::gettext::dngettext( MSG1, MSG2, N )
 
 #else
 #define _(MSG) ::gettext( MSG )
-#define _PL(MSG1,MSG2,N) ::ngettext( MSG1, MSG2, N )
+#define PL_(MSG1,MSG2,N) ::ngettext( MSG1, MSG2, N )
 #endif
 
 ///////////////////////////////////////////////////////////////////
index eaadd83..6512008 100644 (file)
@@ -186,7 +186,7 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
     //
-    // CLASS NAME : fXstream<class _BStr,class _SBuf>
+    // CLASS NAME : fXstream<class TBStr,class TSBuf>
     /**
      * @short Common template to define ifgzstream/ofgzstream
      * reading/writing gzip files.
@@ -195,14 +195,14 @@ namespace zypp
      * @ref ofgzstream. fXstream is just to avoid almost
      * duplicate code.
      **/
-    template<class _BStream,class _StreamBuf>
-      class fXstream : public _BStream
+    template<class TBStream,class TStreamBuf>
+      class fXstream : public TBStream
       {
       public:
 
         typedef gzstream_detail::ZlibError ZlibError;
-        typedef _BStream                   stream_type;
-        typedef _StreamBuf                 streambuf_type;
+        typedef TBStream                   stream_type;
+        typedef TStreamBuf                 streambuf_type;
 
         fXstream()
         : stream_type( NULL )
index f6515a3..382e283 100644 (file)
@@ -25,7 +25,7 @@
  */
 #define ZYPP_DEFINE_ID_HASHABLE(C)             \
 namespace std {                                        \
-  template<class _Tp> struct hash;             \
+  template<class Tp> struct hash;              \
   template<> struct hash<C>                    \
   {                                            \
     size_t operator()( const C & __s ) const   \
@@ -37,14 +37,14 @@ namespace std {                                     \
 namespace std
 {
   /** clone function for RW_pointer */
-  template<class _D>
-  inline unordered_set<_D> * rwcowClone( const std::unordered_set<_D> * rhs )
-  { return new std::unordered_set<_D>( *rhs ); }
+  template<class D>
+  inline unordered_set<D> * rwcowClone( const std::unordered_set<D> * rhs )
+  { return new std::unordered_set<D>( *rhs ); }
 
   /** clone function for RW_pointer */
-  template<class _K, class _V>
-  inline std::unordered_map<_K,_V> * rwcowClone( const std::unordered_map<_K,_V> * rhs )
-  { return new std::unordered_map<_K,_V>( *rhs ); }
+  template<class K, class V>
+  inline std::unordered_map<K,V> * rwcowClone( const std::unordered_map<K,V> * rhs )
+  { return new std::unordered_map<K,V>( *rhs ); }
 } // namespace std
 ///////////////////////////////////////////////////////////////////
 #endif // ZYPP_BASE_HASH_H
index 8ff4917..420950b 100644 (file)
@@ -32,12 +32,12 @@ namespace zypp
   ///   };
   /// \endcode
   ///////////////////////////////////////////////////////////////////
-  template <class _Iterator>
+  template <class TIterator>
   class Iterable
   {
   public:
     typedef size_t size_type;
-    typedef _Iterator iterator_type;
+    typedef TIterator iterator_type;
     typedef typename std::iterator_traits<iterator_type>::value_type           value_type;
     typedef typename std::iterator_traits<iterator_type>::difference_type      difference_type;
     typedef typename std::iterator_traits<iterator_type>::pointer              pointer;
@@ -78,9 +78,9 @@ namespace zypp
   };
 
   /** \relates Iterable convenient construction. */
-  template <class _Iterator>
-  Iterable<_Iterator> makeIterable( _Iterator && begin_r, _Iterator && end_r )
-  { return Iterable<_Iterator>( std::forward<_Iterator>(begin_r), std::forward<_Iterator>(end_r) ); }
+  template <class TIterator>
+  Iterable<TIterator> makeIterable( TIterator && begin_r, TIterator && end_r )
+  { return Iterable<TIterator>( std::forward<TIterator>(begin_r), std::forward<TIterator>(end_r) ); }
 
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index e0371ab..f4deb90 100644 (file)
@@ -96,35 +96,35 @@ namespace zypp
   using boost::make_filter_iterator;
 
   /** Convenience to create filter_iterator from container::begin(). */
-  template<class _Filter, class _Container>
-    filter_iterator<_Filter, typename _Container::const_iterator>
-    make_filter_begin( _Filter f, const _Container & c )
+  template<class TFilter, class TContainer>
+    filter_iterator<TFilter, typename TContainer::const_iterator>
+    make_filter_begin( TFilter f, const TContainer & c )
     {
       return make_filter_iterator( f, c.begin(), c.end() );
     }
 
   /** Convenience to create filter_iterator from container::begin(). */
-  template<class _Filter, class _Container>
-    filter_iterator<_Filter, typename _Container::const_iterator>
-    make_filter_begin( const _Container & c )
+  template<class TFilter, class TContainer>
+    filter_iterator<TFilter, typename TContainer::const_iterator>
+    make_filter_begin( const TContainer & c )
     {
-      return make_filter_iterator( _Filter(), c.begin(), c.end() );
+      return make_filter_iterator( TFilter(), c.begin(), c.end() );
     }
 
   /** Convenience to create filter_iterator from container::end(). */
-  template<class _Filter, class _Container>
-    filter_iterator<_Filter, typename _Container::const_iterator>
-    make_filter_end( _Filter f, const _Container & c )
+  template<class TFilter, class TContainer>
+    filter_iterator<TFilter, typename TContainer::const_iterator>
+    make_filter_end( TFilter f, const TContainer & c )
     {
       return make_filter_iterator( f, c.end(), c.end() );
     }
 
   /** Convenience to create filter_iterator from container::end(). */
-  template<class _Filter, class _Container>
-    filter_iterator<_Filter, typename _Container::const_iterator>
-    make_filter_end( const _Container & c )
+  template<class TFilter, class TContainer>
+    filter_iterator<TFilter, typename TContainer::const_iterator>
+    make_filter_end( const TContainer & c )
     {
-      return make_filter_iterator( _Filter(), c.end(), c.end() );
+      return make_filter_iterator( TFilter(), c.end(), c.end() );
     }
 
   /** \class transform_iterator
@@ -151,20 +151,20 @@ namespace zypp
   /** Functor taking a \c std::pair returning \c std::pair.first.
    * \see MapKVIteratorTraits
   */
-  template<class _Pair>
-    struct GetPairFirst : public std::unary_function<_Pair, const typename _Pair::first_type &>
+  template<class TPair>
+    struct GetPairFirst : public std::unary_function<TPair, const typename TPair::first_type &>
     {
-      const typename _Pair::first_type & operator()( const _Pair & pair_r ) const
+      const typename TPair::first_type & operator()( const TPair & pair_r ) const
       { return pair_r.first; }
     };
 
   /** Functor taking a \c std::pair returning \c std::pair.second .
    * \see MapKVIteratorTraits
   */
-  template<class _Pair>
-    struct GetPairSecond : public std::unary_function<_Pair, const typename _Pair::second_type &>
+  template<class TPair>
+    struct GetPairSecond : public std::unary_function<TPair, const typename TPair::second_type &>
     {
-      const typename _Pair::second_type & operator()( const _Pair & pair_r ) const
+      const typename TPair::second_type & operator()( const TPair & pair_r ) const
       { return pair_r.second; }
     };
 
@@ -206,62 +206,62 @@ namespace zypp
    * std::for_each( make_map_value_begin( mymap ), make_map_value_end( mymap ), DoSomething() );
    * \endcode
    */
-  template<class _Map>
+  template<class TMap>
     struct MapKVIteratorTraits
     {
       /** The map type */
-      typedef _Map                       MapType;
+      typedef TMap                       MapType;
       /** The maps key type */
-      typedef typename _Map::key_type    KeyType;
+      typedef typename TMap::key_type    KeyType;
       /** The key iterator type */
       typedef transform_iterator<GetPairFirst<typename MapType::value_type>,
                                  typename MapType::const_iterator> Key_const_iterator;
       /** The maps value (mapped) type */
-      typedef typename _Map::mapped_type ValueType;
+      typedef typename TMap::mapped_type ValueType;
       /** The value iterator type */
       typedef transform_iterator<GetPairSecond<typename MapType::value_type>,
                                  typename MapType::const_iterator> Value_const_iterator;
     };
 
   /** Convenience to create the key iterator from container::begin() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Key_const_iterator make_map_key_begin( const _Map & map_r )
-    { return make_transform_iterator( map_r.begin(), GetPairFirst<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Key_const_iterator make_map_key_begin( const TMap & map_r )
+    { return make_transform_iterator( map_r.begin(), GetPairFirst<typename TMap::value_type>() ); }
 
   /** Convenience to create the key iterator from container::end() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Key_const_iterator make_map_key_end( const _Map & map_r )
-    { return make_transform_iterator( map_r.end(), GetPairFirst<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Key_const_iterator make_map_key_end( const TMap & map_r )
+    { return make_transform_iterator( map_r.end(), GetPairFirst<typename TMap::value_type>() ); }
 
   /** Convenience to create the value iterator from container::begin() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Value_const_iterator make_map_value_begin( const _Map & map_r )
-    { return make_transform_iterator( map_r.begin(), GetPairSecond<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Value_const_iterator make_map_value_begin( const TMap & map_r )
+    { return make_transform_iterator( map_r.begin(), GetPairSecond<typename TMap::value_type>() ); }
 
   /** Convenience to create the value iterator from container::end() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Value_const_iterator make_map_value_end( const _Map & map_r )
-    { return make_transform_iterator( map_r.end(), GetPairSecond<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Value_const_iterator make_map_value_end( const TMap & map_r )
+    { return make_transform_iterator( map_r.end(), GetPairSecond<typename TMap::value_type>() ); }
 
   /** Convenience to create the key iterator from container::lower_bound() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Key_const_iterator make_map_key_lower_bound( const _Map & map_r, const typename _Map::key_type & key_r )
-    { return make_transform_iterator( map_r.lower_bound( key_r ), GetPairFirst<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Key_const_iterator make_map_key_lower_bound( const TMap & map_r, const typename TMap::key_type & key_r )
+    { return make_transform_iterator( map_r.lower_bound( key_r ), GetPairFirst<typename TMap::value_type>() ); }
 
   /** Convenience to create the key iterator from container::upper_bound() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Key_const_iterator make_map_key_upper_bound( const _Map & map_r, const typename _Map::key_type & key_r )
-    { return make_transform_iterator( map_r.upper_bound( key_r ), GetPairFirst<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Key_const_iterator make_map_key_upper_bound( const TMap & map_r, const typename TMap::key_type & key_r )
+    { return make_transform_iterator( map_r.upper_bound( key_r ), GetPairFirst<typename TMap::value_type>() ); }
 
   /** Convenience to create the value iterator from container::lower_bound() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Value_const_iterator make_map_value_lower_bound( const _Map & map_r, const typename _Map::key_type & key_r )
-    { return make_transform_iterator( map_r.lower_bound( key_r ), GetPairSecond<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Value_const_iterator make_map_value_lower_bound( const TMap & map_r, const typename TMap::key_type & key_r )
+    { return make_transform_iterator( map_r.lower_bound( key_r ), GetPairSecond<typename TMap::value_type>() ); }
 
   /** Convenience to create the value iterator from container::upper_bound() */
-  template<class _Map>
-    inline typename MapKVIteratorTraits<_Map>::Value_const_iterator make_map_value_upper_bound( const _Map & map_r, const typename _Map::key_type & key_r )
-    { return make_transform_iterator( map_r.upper_bound( key_r ), GetPairSecond<typename _Map::value_type>() ); }
+  template<class TMap>
+    inline typename MapKVIteratorTraits<TMap>::Value_const_iterator make_map_value_upper_bound( const TMap & map_r, const typename TMap::key_type & key_r )
+    { return make_transform_iterator( map_r.upper_bound( key_r ), GetPairSecond<typename TMap::value_type>() ); }
 
   /** \class function_output_iterator
    * An output iterator wrapping a unary function object; each time an
index 84262a5..b31c453 100644 (file)
@@ -177,8 +177,8 @@ namespace zypp
          * TmpLineWriter mylw( new log::StderrLineWriter );
          * \endcode
         */
-        template<class _LineWriter>
-        TmpLineWriter( _LineWriter * _allocated_r )
+        template<class TLineWriter>
+        TmpLineWriter( TLineWriter * _allocated_r )
           : _writer( LogControl::instance().getLineWriter() )
         { LogControl::instance().setLineWriter( shared_ptr<LineWriter>( _allocated_r ) ); }
 
index df8c0f8..18f8f61 100644 (file)
@@ -87,9 +87,9 @@ namespace zypp
    * // (1, 2, 3)
    * \endcode
   */
-  template<class _Iterator>
+  template<class TIterator>
     std::ostream & dumpRange( std::ostream & str,
-                              _Iterator begin, _Iterator end,
+                              TIterator begin, TIterator end,
                               const std::string & intro = "{",
                               const std::string & pfx   = "\n  ",
                               const std::string & sep   = "\n  ",
@@ -110,30 +110,30 @@ namespace zypp
   /** Print range defined by iterators (single line style).
    * \see dumpRange
    */
-  template<class _Iterator>
+  template<class TIterator>
     std::ostream & dumpRangeLine( std::ostream & str,
-                                  _Iterator begin, _Iterator end )
+                                  TIterator begin, TIterator end )
     { return dumpRange( str, begin, end, "(", "", ", ", "", ")" ); }
 
 
-  template<class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::vector<_Tp> & obj )
+  template<class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::vector<Tp> & obj )
     { return dumpRange( str, obj.begin(), obj.end() ); }
 
-  template<class _Tp, class _Cmp, class _Alloc>
-    std::ostream & operator<<( std::ostream & str, const std::set<_Tp,_Cmp,_Alloc> & obj )
+  template<class Tp, class TCmp, class TAlloc>
+    std::ostream & operator<<( std::ostream & str, const std::set<Tp,TCmp,TAlloc> & obj )
     { return dumpRange( str, obj.begin(), obj.end() ); }
 
-  template<class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::unordered_set<_Tp> & obj )
+  template<class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::unordered_set<Tp> & obj )
     { return dumpRange( str, obj.begin(), obj.end() ); }
 
-  template<class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::multiset<_Tp> & obj )
+  template<class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::multiset<Tp> & obj )
     { return dumpRange( str, obj.begin(), obj.end() ); }
 
-  template<class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::list<_Tp> & obj )
+  template<class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::list<Tp> & obj )
     { return dumpRange( str, obj.begin(), obj.end() ); }
 
   ///////////////////////////////////////////////////////////////////
@@ -149,32 +149,32 @@ namespace zypp
      * used in a std::map. The mapped std::pair is printed as
      * <tt>[key] = value</tt>.
     */
-    template<class _Pair>
+    template<class TPair>
       class MapEntry
       {
       public:
-        MapEntry( const _Pair & pair_r )
+        MapEntry( const TPair & pair_r )
         : _pair( &pair_r )
         {}
 
-        const _Pair & pair() const
+        const TPair & pair() const
         { return *_pair; }
 
       private:
-        const _Pair *const _pair;
+        const TPair *const _pair;
       };
 
     /** \relates MapEntry Stream output. */
-    template<class _Pair>
-      std::ostream & operator<<( std::ostream & str, const MapEntry<_Pair> & obj )
+    template<class TPair>
+      std::ostream & operator<<( std::ostream & str, const MapEntry<TPair> & obj )
       {
         return str << '[' << obj.pair().first << "] = " << obj.pair().second;
       }
 
     /** \relates MapEntry Convenience function to create MapEntry from std::pair. */
-    template<class _Pair>
-      MapEntry<_Pair> mapEntry( const _Pair & pair_r )
-      { return MapEntry<_Pair>( pair_r ); }
+    template<class TPair>
+      MapEntry<TPair> mapEntry( const TPair & pair_r )
+      { return MapEntry<TPair>( pair_r ); }
 
     ///////////////////////////////////////////////////////////////////
     // dumpMap
@@ -184,12 +184,12 @@ namespace zypp
      * Uses a transform_iterator to wrap the std::pair into MapEntry.
      *
      */
-    template<class _Map>
+    template<class TMap>
       class DumpMap
       {
       public:
-        typedef _Map                        MapType;
-        typedef typename _Map::value_type   PairType;
+        typedef TMap                        MapType;
+        typedef typename TMap::value_type   PairType;
         typedef MapEntry<PairType>          MapEntryType;
 
         struct Transformer : public std::unary_function<PairType, MapEntryType>
@@ -202,11 +202,11 @@ namespace zypp
                 MapEntry_const_iterator;
 
       public:
-        DumpMap( const _Map & map_r )
+        DumpMap( const TMap & map_r )
         : _map( &map_r )
         {}
 
-        const _Map & map() const
+        const TMap & map() const
         { return *_map; }
 
         MapEntry_const_iterator begin() const
@@ -216,18 +216,18 @@ namespace zypp
         { return make_transform_iterator( map().end(), Transformer() );}
 
       private:
-        const _Map *const _map;
+        const TMap *const _map;
       };
 
     /** \relates DumpMap Stream output. */
-    template<class _Map>
-      std::ostream & operator<<( std::ostream & str, const DumpMap<_Map> & obj )
+    template<class TMap>
+      std::ostream & operator<<( std::ostream & str, const DumpMap<TMap> & obj )
       { return dumpRange( str, obj.begin(), obj.end() ); }
 
     /** \relates DumpMap Convenience function to create DumpMap from std::map. */
-    template<class _Map>
-      DumpMap<_Map> dumpMap( const _Map & map_r )
-      { return DumpMap<_Map>( map_r ); }
+    template<class TMap>
+      DumpMap<TMap> dumpMap( const TMap & map_r )
+      { return DumpMap<TMap>( map_r ); }
 
     ///////////////////////////////////////////////////////////////////
     // dumpKeys
@@ -240,18 +240,18 @@ namespace zypp
      * std::cout << dumpKeys(mymap) << std::endl;
      * \endcode
      */
-    template<class _Map>
+    template<class TMap>
       class DumpKeys
       {
       public:
-        typedef typename MapKVIteratorTraits<_Map>::Key_const_iterator MapKey_const_iterator;
+        typedef typename MapKVIteratorTraits<TMap>::Key_const_iterator MapKey_const_iterator;
 
       public:
-        DumpKeys( const _Map & map_r )
+        DumpKeys( const TMap & map_r )
         : _map( &map_r )
         {}
 
-        const _Map & map() const
+        const TMap & map() const
         { return *_map; }
 
         MapKey_const_iterator begin() const
@@ -261,18 +261,18 @@ namespace zypp
         { return make_map_key_end( map() ); }
 
       private:
-        const _Map *const _map;
+        const TMap *const _map;
       };
 
     /** \relates DumpKeys Stream output. */
-    template<class _Map>
-      std::ostream & operator<<( std::ostream & str, const DumpKeys<_Map> & obj )
+    template<class TMap>
+      std::ostream & operator<<( std::ostream & str, const DumpKeys<TMap> & obj )
       { return dumpRange( str, obj.begin(), obj.end() ); }
 
     /** \relates DumpKeys Convenience function to create DumpKeys from std::map. */
-    template<class _Map>
-      DumpKeys<_Map> dumpKeys( const _Map & map_r )
-      { return DumpKeys<_Map>( map_r ); }
+    template<class TMap>
+      DumpKeys<TMap> dumpKeys( const TMap & map_r )
+      { return DumpKeys<TMap>( map_r ); }
 
     ///////////////////////////////////////////////////////////////////
     // dumpValues
@@ -285,18 +285,18 @@ namespace zypp
      * std::cout << dumpValues(mymap) << std::endl;
      * \endcode
      */
-    template<class _Map>
+    template<class TMap>
       class DumpValues
       {
       public:
-        typedef typename MapKVIteratorTraits<_Map>::Value_const_iterator MapValue_const_iterator;
+        typedef typename MapKVIteratorTraits<TMap>::Value_const_iterator MapValue_const_iterator;
 
       public:
-        DumpValues( const _Map & map_r )
+        DumpValues( const TMap & map_r )
         : _map( &map_r )
         {}
 
-        const _Map & map() const
+        const TMap & map() const
         { return *_map; }
 
         MapValue_const_iterator begin() const
@@ -306,18 +306,18 @@ namespace zypp
         { return make_map_value_end( map() ); }
 
       private:
-        const _Map *const _map;
+        const TMap *const _map;
       };
 
     /** \relates DumpValues Stream output. */
-    template<class _Map>
-      std::ostream & operator<<( std::ostream & str, const DumpValues<_Map> & obj )
+    template<class TMap>
+      std::ostream & operator<<( std::ostream & str, const DumpValues<TMap> & obj )
       { return dumpRange( str, obj.begin(), obj.end() ); }
 
     /** \relates DumpValues Convenience function to create DumpValues from std::map. */
-    template<class _Map>
-      DumpValues<_Map> dumpValues( const _Map & map_r )
-      { return DumpValues<_Map>( map_r ); }
+    template<class TMap>
+      DumpValues<TMap> dumpValues( const TMap & map_r )
+      { return DumpValues<TMap>( map_r ); }
 
     /////////////////////////////////////////////////////////////////
   } // namespace _logtoolsdetail
@@ -329,16 +329,16 @@ namespace zypp
   using _logtoolsdetail::dumpKeys;   // dumpRange keys
   using _logtoolsdetail::dumpValues; // dumpRange values
 
-  template<class _Key, class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::map<_Key, _Tp> & obj )
+  template<class TKey, class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::map<TKey, Tp> & obj )
     { return str << dumpMap( obj ); }
 
-  template<class _Key, class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::unordered_map<_Key, _Tp> & obj )
+  template<class TKey, class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::unordered_map<TKey, Tp> & obj )
     { return str << dumpMap( obj ); }
 
-  template<class _Key, class _Tp>
-    std::ostream & operator<<( std::ostream & str, const std::multimap<_Key, _Tp> & obj )
+  template<class TKey, class Tp>
+    std::ostream & operator<<( std::ostream & str, const std::multimap<TKey, Tp> & obj )
     { return str << dumpMap( obj ); }
 
   /** Print stream status bits.
@@ -368,21 +368,21 @@ namespace zypp
 
   namespace detail
   {
-    template<class _Tp>
+    template<class Tp>
     struct Dump
     {
-      Dump( const _Tp & obj_r ) : _obj( obj_r ) {}
-      const _Tp & _obj;
+      Dump( const Tp & obj_r ) : _obj( obj_r ) {}
+      const Tp & _obj;
     };
 
-    template<class _Tp>
-    std::ostream & operator<<( std::ostream & str, const Dump<_Tp> & obj )
+    template<class Tp>
+    std::ostream & operator<<( std::ostream & str, const Dump<Tp> & obj )
     { return dumpOn( str, obj._obj ); }
   }
 
-  template<class _Tp>
-  detail::Dump<_Tp> dump( const _Tp & obj_r )
-  { return detail::Dump<_Tp>(obj_r); }
+  template<class Tp>
+  detail::Dump<Tp> dump( const Tp & obj_r )
+  { return detail::Dump<Tp>(obj_r); }
 
 
   /////////////////////////////////////////////////////////////////
index 9043a9c..6892db0 100644 (file)
@@ -39,7 +39,7 @@ namespace zypp
  * to return the log stream.
  *
  * @code
- * _DBG("foo") << ....
+ * L_DBG("foo") << ....
  * @endcode
  * Logs a debug message for group @a "foo".
  *
@@ -59,29 +59,29 @@ namespace zypp
 #define ZYPP_BASE_LOGGER_LOGGROUP "DEFINE_LOGGROUP"
 #endif
 
-#define XXX _XXX( ZYPP_BASE_LOGGER_LOGGROUP )
-#define DBG _DBG( ZYPP_BASE_LOGGER_LOGGROUP )
-#define MIL _MIL( ZYPP_BASE_LOGGER_LOGGROUP )
-#define WAR _WAR( ZYPP_BASE_LOGGER_LOGGROUP )
-#define ERR _ERR( ZYPP_BASE_LOGGER_LOGGROUP )
-#define SEC _SEC( ZYPP_BASE_LOGGER_LOGGROUP )
-#define INT _INT( ZYPP_BASE_LOGGER_LOGGROUP )
-#define USR _USR( ZYPP_BASE_LOGGER_LOGGROUP )
+#define XXX L_XXX( ZYPP_BASE_LOGGER_LOGGROUP )
+#define DBG L_DBG( ZYPP_BASE_LOGGER_LOGGROUP )
+#define MIL L_MIL( ZYPP_BASE_LOGGER_LOGGROUP )
+#define WAR L_WAR( ZYPP_BASE_LOGGER_LOGGROUP )
+#define ERR L_ERR( ZYPP_BASE_LOGGER_LOGGROUP )
+#define SEC L_SEC( ZYPP_BASE_LOGGER_LOGGROUP )
+#define INT L_INT( ZYPP_BASE_LOGGER_LOGGROUP )
+#define USR L_USR( ZYPP_BASE_LOGGER_LOGGROUP )
 
-#define _XXX(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )
-#define _DBG(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )
-#define _MIL(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )
-#define _WAR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )
-#define _ERR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )
-#define _SEC(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )
-#define _INT(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )
-#define _USR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )
+#define L_XXX(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_XXX )
+#define L_DBG(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP"++", zypp::base::logger::E_MIL )
+#define L_MIL(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_MIL )
+#define L_WAR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_WAR )
+#define L_ERR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_ERR )
+#define L_SEC(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_SEC )
+#define L_INT(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_INT )
+#define L_USR(GROUP) ZYPP_BASE_LOGGER_LOG( GROUP, zypp::base::logger::E_USR )
 
-#define _BASEFILE ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )
+#define L_BASEFILE ( *__FILE__ == '/' ? strrchr( __FILE__, '/' ) + 1 : __FILE__ )
 
 /** Actual call to @ref getStream. */
 #define ZYPP_BASE_LOGGER_LOG(GROUP,LEVEL) \
-        zypp::base::logger::getStream( GROUP, LEVEL, _BASEFILE, __FUNCTION__, __LINE__ )
+        zypp::base::logger::getStream( GROUP, LEVEL, L_BASEFILE, __FUNCTION__, __LINE__ )
 
 /*@}*/
 
index eaaa3d5..5f58582 100644 (file)
@@ -144,7 +144,7 @@ namespace zypp
       , _seq    ( 0 )
       {
        _glevel += "..";
-        INT << _level << "START MEASURE(" << _ident << ")" << endl;
+        log() << _level << "START MEASURE(" << _ident << ")" << endl;
         _start.get();
       }
 
@@ -152,34 +152,40 @@ namespace zypp
       {
         _stop.get();
         ++_seq;
-        std::ostream & str( INT << _level << "MEASURE(" << _ident << ") " );
+        std::ostream & str( log() << _level << "MEASURE(" << _ident << ") " );
         dumpMeasure( str );
        _glevel.erase( 0, 2 );
       }
 
       void restart()
       {
-        INT << _level << "RESTART MEASURE(" << _ident << ")" << endl;
+        log() << _level << "RESTART MEASURE(" << _ident << ")" << endl;
         _start = _stop;
       }
 
-      void elapsed() const
+      void elapsed( const std::string & tag_r = std::string() ) const
       {
         _stop.get();
         ++_seq;
-        std::ostream & str( INT << _level << "ELAPSED(" << _ident << ") " );
-        dumpMeasure( str );
+        std::ostream & str( log() << _level << "ELAPSED(" << _ident << ") " );
+        dumpMeasure( str, tag_r );
         _elapsed = _stop;
       }
 
     private:
-      std::ostream & dumpMeasure( std::ostream & str_r ) const
+      /** Return the log stream. */
+      std::ostream & log() const
+      { return INT; }
+
+      std::ostream & dumpMeasure( std::ostream & str_r, const std::string & tag_r = std::string() ) const
       {
         str_r << ( _stop - _start );
         if ( _seq > 1 ) // diff to previous _elapsed
           {
             str_r << " [" << ( _stop - _elapsed ) << "]";
           }
+       if ( ! tag_r.empty() )
+         str_r << " - " << tag_r;
         return str_r << endl;
       }
 
@@ -215,26 +221,20 @@ namespace zypp
     {}
 
     void Measure::start( const std::string & ident_r )
-    {
-      stop();
-      _pimpl.reset( new Impl( ident_r ) );
-    }
+    { stop(); _pimpl.reset( new Impl( ident_r ) ); }
 
     void Measure::restart()
-    {
-      _pimpl->restart();
-    }
+    { _pimpl->restart(); }
 
     void Measure::elapsed() const
-    {
-      if ( _pimpl )
-        _pimpl->elapsed();
-    }
+    { if ( _pimpl ) _pimpl->elapsed(); }
+    void Measure::elapsed( const std::string & tag_r ) const
+    { if ( _pimpl ) _pimpl->elapsed( tag_r ); }
+    void Measure::elapsed( long tag_r ) const
+    { if ( _pimpl ) _pimpl->elapsed( asString( tag_r ) ); }
 
     void Measure::stop()
-    {
-      _pimpl.reset();
-    }
+    { _pimpl.reset(); }
 
     /////////////////////////////////////////////////////////////////
   } // namespace debug
index 8c2806b..29293d1 100644 (file)
@@ -90,6 +90,18 @@ namespace zypp
        * Timer keeps on running.
       */
       void elapsed() const;
+      /** \overload Tagging the time with some text
+       * \code
+       * elapsed( "after action foo..." );
+       * \endcode
+       */
+      void elapsed( const std::string & tag_r ) const;
+      /** \overload Tagging the time with e.g. a line number
+       * \code
+       * elapsed( __LINE__ );
+       * \endcode
+       */
+      void elapsed( long tag_r ) const;
 
       /** Stop a running timer. */
       void stop();
index fc5bff3..09ec183 100644 (file)
@@ -37,11 +37,11 @@ namespace zypp
   ///   Commands    cmd( clist.getValue( "second" ) );
   /// \endcode
   ///////////////////////////////////////////////////////////////////
-  template< class _Tp, const bool _WithAlias = true >
+  template< class Tp, const bool _tWithAlias = true >
   class NamedValue
   {
-    typedef std::map< std::string, _Tp > NameMap;
-    typedef std::map< _Tp, std::string > ValueMap;
+    typedef std::map< std::string, Tp > NameMap;
+    typedef std::map< Tp, std::string > ValueMap;
 
   public:
     /** Whether not initialized (no (name,value) pair remembered) */
@@ -62,7 +62,7 @@ namespace zypp
       /** Get value mapped for name or alias.
        * \return \c true if name or alias was found.
        */
-      bool getValue( const std::string & name_r, _Tp & value_r ) const
+      bool getValue( const std::string & name_r, Tp & value_r ) const
       {
        typename NameMap::const_iterator it( _nameMap.find( name_r ) );
        if ( it == _nameMap.end() )
@@ -71,7 +71,7 @@ namespace zypp
        return true;
       }
       /** \overload \throws std::out_of_range exception if \a name_r was not found. */
-      const _Tp & getValue( const std::string & name_r ) const
+      const Tp & getValue( const std::string & name_r ) const
       { return _nameMap.at( name_r ); }
     //@}
 
@@ -89,7 +89,7 @@ namespace zypp
       /** Get name of value.
        * \return \c true if name or alias was found.
        */
-      bool getName( const _Tp & value_r, std::string & name_r ) const
+      bool getName( const Tp & value_r, std::string & name_r ) const
       {
        typename ValueMap::const_iterator it( _valueMap.find( value_r ) );
        if ( it == _valueMap.end() )
@@ -98,7 +98,7 @@ namespace zypp
        return true;
       }
       /** \overload \throws std::out_of_range exception if \a value_r was not found. */
-      const std::string & getName( const _Tp & value_r ) const
+      const std::string & getName( const Tp & value_r ) const
       { return _valueMap.at( value_r ); }
     //@}
 
@@ -106,30 +106,30 @@ namespace zypp
     /** \name Inserter
      */
     //@{
-      class _Inserter
+      class TInserter
       {
       public:
-       _Inserter( NamedValue & parent_r, const _Tp & value_r )
+       TInserter( NamedValue & parent_r, const Tp & value_r )
        : _parent( &parent_r )
        , _value( value_r )
        {}
-       _Inserter & operator|( const std::string & name_r )
+       TInserter & operator|( const std::string & name_r )
        { _parent->insert( _value, name_r ); return *this; }
       private:
        NamedValue * _parent;
-       _Tp _value;
+       Tp _value;
       };
 
-      _Inserter operator()( const _Tp & value_r )
-      { return _Inserter( *this, value_r ); }
+      TInserter operator()( const Tp & value_r )
+      { return TInserter( *this, value_r ); }
     //@}
 
     /** Remember name (1st call) or alias (subsequent calls).
      * \return \C true if this is the 1st call for \a value_r.
      * \throws std::logic_error if \a name_r is already used as name or alias.
-     * \throws std::logic_error if \c _WithAlias is \c false and a name for \a value_r is already defined.
+     * \throws std::logic_error if \c _tWithAlias is \c false and a name for \a value_r is already defined.
      */
-    bool insert( const _Tp & value_r, const std::string & name_r )
+    bool insert( const Tp & value_r, const std::string & name_r )
     {
       typename NameMap::const_iterator nit( _nameMap.find( name_r ) );
       if ( nit != _nameMap.end() )     // duplicate name
@@ -138,7 +138,7 @@ namespace zypp
       typename ValueMap::const_iterator tit( _valueMap.find( value_r ) );
       if ( tit != _valueMap.end() )    // duplicate value, i.e. an alias
       {
-       if ( !_WithAlias )
+       if ( !_tWithAlias )
          throw std::logic_error( "NamedValue::insert alias" );
 
        _nameMap[name_r] = value_r;
index 2990e2d..b6142fb 100644 (file)
@@ -41,12 +41,12 @@ namespace zypp
      * foo.numericId(); // returns foo's NumericId.
      * \endcode
     */
-    template<class _Derived, class _NumericIdType>
+    template<class TDerived, class TNumericIdType>
       struct ProvideNumericId
       {
       public:
         /** \return The objects numeric Id. */
-        _NumericIdType numericId() const
+        TNumericIdType numericId() const
         { return _numericId; }
 
       protected:
@@ -73,14 +73,14 @@ namespace zypp
         {}
       private:
         /** Provide the next Id to use. */
-        static _NumericIdType nextId()
+        static TNumericIdType nextId()
         {
-          static _NumericIdType _staticCounter = 0;
+          static TNumericIdType _staticCounter = 0;
           // Assert not returning 0
           return ++_staticCounter;
         }
         /**  */
-        const _NumericIdType _numericId;
+        const TNumericIdType _numericId;
       };
     ///////////////////////////////////////////////////////////////////
 
index e6d26d1..d0a6cf4 100644 (file)
@@ -122,8 +122,8 @@ namespace std
   // as the typedef (else g++ will just print the pointer value).
 
   /** \relates zypp::shared_ptr Stream output. */
-  template<class _D>
-  inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<_D> & obj )
+  template<class D>
+  inline std::ostream & operator<<( std::ostream & str, const zypp::shared_ptr<D> & obj )
   {
     if ( obj )
       return str << *obj;
@@ -139,8 +139,8 @@ namespace std
   }
 
   /** \relates zypp::shared_ptr Stream output. */
-  template<class _D>
-  inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<_D> & obj )
+  template<class D>
+  inline std::ostream & dumpOn( std::ostream & str, const zypp::shared_ptr<D> & obj )
   {
     if ( obj )
       return dumpOn( str, *obj );
@@ -152,16 +152,16 @@ namespace std
   { return str << obj; }
 
   /** \relates zypp::intrusive_ptr Stream output. */
-  template<class _D>
-  inline std::ostream & operator<<( std::ostream & str, const zypp::intrusive_ptr<_D> & obj )
+  template<class D>
+  inline std::ostream & operator<<( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
   {
     if ( obj )
       return str << *obj;
     return str << std::string("NULL");
   }
   /** \relates zypp::intrusive_ptr Stream output. */
-  template<class _D>
-  inline std::ostream & dumpOn( std::ostream & str, const zypp::intrusive_ptr<_D> & obj )
+  template<class D>
+  inline std::ostream & dumpOn( std::ostream & str, const zypp::intrusive_ptr<D> & obj )
   {
     if ( obj )
       return dumpOn( str, *obj );
@@ -180,60 +180,60 @@ namespace zypp
     //
     ///////////////////////////////////////////////////////////////////
     /**
-     * Don't forgett to provide versions for _Ptr and _constPtr,
+     * Don't forgett to provide versions for PtrType and constPtrType,
      * esp. if creation a of temporary is not acceptable (eg. when
      * checking the ref count value).
     */
     namespace rw_pointer {
 
-      template<class _D>
+      template<class D>
         struct Shared
         {
-          typedef shared_ptr<_D>       _Ptr;
-          typedef shared_ptr<const _D> _constPtr;
+          typedef shared_ptr<D>       PtrType;
+          typedef shared_ptr<const D> constPtrType;
           /** Check whether pointer is not shared. */
-          bool unique( const _constPtr & ptr_r )
+          bool unique( const constPtrType & ptr_r )
           { return !ptr_r || ptr_r.unique(); }
-          bool unique( const _Ptr & ptr_r )
+          bool unique( const PtrType & ptr_r )
           { return !ptr_r || ptr_r.unique(); }
           /** Return number of references. */
-          long use_count( const _constPtr & ptr_r ) const
+          long use_count( const constPtrType & ptr_r ) const
           { return ptr_r.use_count(); }
-          long use_count( const _Ptr & ptr_r ) const
+          long use_count( const PtrType & ptr_r ) const
           { return ptr_r.use_count(); }
         };
 
-      template<class _D>
+      template<class D>
         struct Intrusive
         {
-          typedef intrusive_ptr<_D>       _Ptr;
-          typedef intrusive_ptr<const _D> _constPtr;
+          typedef intrusive_ptr<D>       PtrType;
+          typedef intrusive_ptr<const D> constPtrType;
           /** Check whether pointer is not shared. */
-          bool unique( const _constPtr & ptr_r )
+          bool unique( const constPtrType & ptr_r )
           { return !ptr_r || (ptr_r->refCount() <= 1); }
-          bool unique( const _Ptr & ptr_r )
+          bool unique( const PtrType & ptr_r )
           { return !ptr_r || (ptr_r->refCount() <= 1); }
           /** Return number of references. */
-          long use_count( const _constPtr & ptr_r ) const
+          long use_count( const constPtrType & ptr_r ) const
           { return ptr_r ? ptr_r->refCount() : 0; }
-          long use_count( const _Ptr & ptr_r ) const
+          long use_count( const PtrType & ptr_r ) const
           { return ptr_r ? ptr_r->refCount() : 0; }
         };
 
-       template<class _D>
+       template<class D>
         struct Scoped
         {
-          typedef scoped_ptr<_D>       _Ptr;
-          typedef scoped_ptr<const _D> _constPtr;
+          typedef scoped_ptr<D>       PtrType;
+          typedef scoped_ptr<const D> constPtrType;
           /** Check whether pointer is not shared. */
-          bool unique( const _constPtr & ptr_r )
+          bool unique( const constPtrType & ptr_r )
           { return true; }
-          bool unique( const _Ptr & ptr_r )
+          bool unique( const PtrType & ptr_r )
           { return true; }
           /** Return number of references. */
-          long use_count( const _constPtr & ptr_r ) const
+          long use_count( const constPtrType & ptr_r ) const
           { return ptr_r ? 1 : 0; }
-          long use_count( const _Ptr & ptr_r ) const
+          long use_count( const PtrType & ptr_r ) const
           { return ptr_r ? 1 : 0; }
         };
 
@@ -246,10 +246,10 @@ namespace zypp
     //
     /** Wrapper for \c const correct access via \ref ZYPP_SMART_PTR.
      *
-     * zypp::RW_pointer<tt>\<_D,_Traits></tt> stores a \ref ZYPP_SMART_PTR
-     * of type \c _Traits::_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>. Thus \em RW_ means \em read/write,
+     * zypp::RW_pointer<tt>\<D,DTraits></tt> stores a \ref ZYPP_SMART_PTR
+     * of type \c DTraits::PtrType, 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>. Thus \em RW_ means \em read/write,
      * as you get a different type, dependent on whether you're allowed to
      * read or write.
      *
@@ -258,9 +258,9 @@ namespace zypp
      * nonconst implementation methods.
      *
      * The second template argument defaults to
-     * <tt>_Traits = rw_pointer::Shared<_D></tt> thus wraping a
-     * <tt>shared_ptr<_D></tt>. To wrap an <tt>intrusive_ptr<_D></tt>
-     * use <tt>rw_pointer::Intrusive<_D></tt>.
+     * <tt>DTraits = rw_pointer::Shared<D></tt> thus wraping a
+     * <tt>shared_ptr<D></tt>. To wrap an <tt>intrusive_ptr<D></tt>
+     * use <tt>rw_pointer::Intrusive<D></tt>.
      *
      * \see zypp::RWCOW_pointer for 'copy on write' functionality.
      *
@@ -281,11 +281,11 @@ namespace zypp
      * };
      * \endcode
     */
-    template<class _D, class _Traits = rw_pointer::Shared<_D> >
+    template<class D, class DTraits = rw_pointer::Shared<D> >
       struct RW_pointer
       {
-        typedef typename _Traits::_Ptr               _Ptr;
-        typedef typename _Traits::_constPtr          _constPtr;
+        typedef typename DTraits::PtrType               PtrType;
+        typedef typename DTraits::constPtrType          constPtrType;
 
         RW_pointer()
         {}
@@ -294,12 +294,12 @@ namespace zypp
         {}
 
         explicit
-        RW_pointer( typename _Ptr::element_type * dptr )
+        RW_pointer( typename PtrType::element_type * dptr )
         : _dptr( dptr )
         {}
 
         explicit
-        RW_pointer( _Ptr dptr )
+        RW_pointer( PtrType dptr )
         : _dptr( dptr )
         {}
 
@@ -307,66 +307,66 @@ namespace zypp
        { reset(); return *this; }
 
         void reset()
-        { _Ptr().swap( _dptr ); }
+        { PtrType().swap( _dptr ); }
 
-        void reset( typename _Ptr::element_type * dptr )
-        { _Ptr( dptr ).swap( _dptr ); }
+        void reset( typename PtrType::element_type * dptr )
+        { PtrType( dptr ).swap( _dptr ); }
 
         void swap( RW_pointer & rhs )
         { _dptr.swap( rhs._dptr ); }
 
-        void swap( _Ptr & rhs )
+        void swap( PtrType & rhs )
         { _dptr.swap( rhs ); }
 
         explicit operator bool() const
         { return _dptr.get() != nullptr; }
 
-        const _D & operator*() const
+        const D & operator*() const
         { return *_dptr; };
 
-        const _D * operator->() const
+        const D * operator->() const
         { return _dptr.operator->(); }
 
-        const _D * get() const
+        const D * get() const
         { return _dptr.get(); }
 
-        _D & operator*()
+        D & operator*()
         { return *_dptr; }
 
-        _D * operator->()
+        D * operator->()
         { return _dptr.operator->(); }
 
-        _D * get()
+        D * get()
         { return _dptr.get(); }
 
       public:
         bool unique() const
-       { return _Traits().unique( _dptr ); }
+       { return DTraits().unique( _dptr ); }
 
        long use_count() const
-       { return _Traits().use_count( _dptr ); }
+       { return DTraits().use_count( _dptr ); }
 
-        _constPtr getPtr() const
+        constPtrType getPtr() const
         { return _dptr; }
 
-        _Ptr getPtr()
+        PtrType getPtr()
         { return _dptr; }
 
-        _constPtr cgetPtr()
+        constPtrType cgetPtr()
         { return _dptr; }
 
       private:
-        _Ptr _dptr;
+        PtrType _dptr;
       };
     ///////////////////////////////////////////////////////////////////
 
     /** \relates RW_pointer Stream output.
      *
-     * Print the \c _D object the RW_pointer 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 RW_pointer<_D, _Ptr> & obj )
+    template<class D, class DPtr>
+      inline std::ostream & operator<<( std::ostream & str, const RW_pointer<D, DPtr> & obj )
       {
         if ( obj.get() )
           return str << *obj.get();
@@ -374,62 +374,62 @@ namespace zypp
       }
 
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RW_pointer<_D, _Ptr> & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_Ptr & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const typename _Ptr::_Ptr & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_constPtr & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const typename _Ptr::_constPtr & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RW_pointer<_D, _Ptr> & lhs, std::nullptr_t )
+    template<class D, class DPtr>
+      inline bool operator==( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
       { return( lhs.get() == nullptr ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( std::nullptr_t, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
       { return( nullptr == rhs.get() ); }
 
 
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RW_pointer<_D, _Ptr> & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const RW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_Ptr & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const typename _Ptr::_Ptr & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const typename DPtr::PtrType & lhs, const RW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_constPtr & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const typename _Ptr::_constPtr & lhs, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const typename DPtr::constPtrType & lhs, const RW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RW_pointer<_D, _Ptr> & lhs, std::nullptr_t )
+    template<class D, class DPtr>
+      inline bool operator!=( const RW_pointer<D, DPtr> & lhs, std::nullptr_t )
       { return( lhs.get() != nullptr ); }
     /** \relates RW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( std::nullptr_t, const RW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( std::nullptr_t, const RW_pointer<D, DPtr> & rhs )
       { return( nullptr != rhs.get() ); }
 
     ///////////////////////////////////////////////////////////////////
@@ -437,10 +437,10 @@ namespace zypp
     /** \relates RWCOW_pointer Clone the underlying object.
      * Calls \a rhs <tt>-\>clone()</tt>. Being defined as a
      * function outside \ref RWCOW_pointer allows to overload
-     * it, in case a specific \a _D does not have <tt>clone()</tt>.
+     * it, in case a specific \a D does not have <tt>clone()</tt>.
      */
-    template<class _D>
-      inline _D * rwcowClone( const _D * rhs )
+    template<class D>
+      inline D * rwcowClone( const D * rhs )
       { return rhs->clone(); }
 
     ///////////////////////////////////////////////////////////////////
@@ -454,11 +454,11 @@ namespace zypp
      *
      * See \ref RW_pointer.
     */
-    template<class _D, class _Traits = rw_pointer::Shared<_D> >
+    template<class D, class DTraits = rw_pointer::Shared<D> >
       struct RWCOW_pointer
       {
-        typedef typename _Traits::_Ptr               _Ptr;
-        typedef typename _Traits::_constPtr          _constPtr;
+        typedef typename DTraits::PtrType               PtrType;
+        typedef typename DTraits::constPtrType          constPtrType;
 
        RWCOW_pointer()
        {}
@@ -467,12 +467,12 @@ namespace zypp
        {}
 
         explicit
-        RWCOW_pointer( typename _Ptr::element_type * dptr )
+        RWCOW_pointer( typename PtrType::element_type * dptr )
         : _dptr( dptr )
         {}
 
         explicit
-        RWCOW_pointer( _Ptr dptr )
+        RWCOW_pointer( PtrType dptr )
         : _dptr( dptr )
         {}
 
@@ -480,52 +480,52 @@ namespace zypp
        { reset(); return *this; }
 
         void reset()
-        { _Ptr().swap( _dptr ); }
+        { PtrType().swap( _dptr ); }
 
-        void reset( typename _Ptr::element_type * dptr )
-        { _Ptr( dptr ).swap( _dptr ); }
+        void reset( typename PtrType::element_type * dptr )
+        { PtrType( dptr ).swap( _dptr ); }
 
         void swap( RWCOW_pointer & rhs )
         { _dptr.swap( rhs._dptr ); }
 
-        void swap( _Ptr & rhs )
+        void swap( PtrType & rhs )
         { _dptr.swap( rhs ); }
 
         explicit operator bool() const
        { return _dptr.get() != nullptr; }
 
-        const _D & operator*() const
+        const D & operator*() const
         { return *_dptr; };
 
-        const _D * operator->() const
+        const D * operator->() const
         { return _dptr.operator->(); }
 
-        const _D * get() const
+        const D * get() const
         { return _dptr.get(); }
 
-        _D & operator*()
+        D & operator*()
         { assertUnshared(); return *_dptr; }
 
-        _D * operator->()
+        D * operator->()
         { assertUnshared(); return _dptr.operator->(); }
 
-        _D * get()
+        D * get()
         { assertUnshared(); return _dptr.get(); }
 
       public:
         bool unique() const
-       { return _Traits().unique( _dptr ); }
+       { return DTraits().unique( _dptr ); }
 
        long use_count() const
-       { return _Traits().use_count( _dptr ); }
+       { return DTraits().use_count( _dptr ); }
 
-        _constPtr getPtr() const
+        constPtrType getPtr() const
         { return _dptr; }
 
-        _Ptr getPtr()
+        PtrType getPtr()
         { assertUnshared(); return _dptr; }
 
-        _constPtr cgetPtr()
+        constPtrType cgetPtr()
         { return _dptr; }
 
       private:
@@ -533,21 +533,21 @@ namespace zypp
         void assertUnshared()
         {
           if ( !unique() )
-            _Ptr( rwcowClone( _dptr.get() ) ).swap( _dptr );
+            PtrType( rwcowClone( _dptr.get() ) ).swap( _dptr );
         }
 
       private:
-        _Ptr _dptr;
+        PtrType _dptr;
       };
     ///////////////////////////////////////////////////////////////////
 
     /** \relates RWCOW_pointer Stream output.
      *
-     * Print the \c _D object the RWCOW_pointer refers, or \c "NULL"
+     * Print the \c D object the RWCOW_pointer refers, or \c "NULL"
      * if the pointer is \c NULL.
      */
-    template<class _D, class _Ptr>
-      inline std::ostream & operator<<( std::ostream & str, const RWCOW_pointer<_D, _Ptr> & obj )
+    template<class D, class DPtr>
+      inline std::ostream & operator<<( std::ostream & str, const RWCOW_pointer<D, DPtr> & obj )
       {
         if ( obj.get() )
           return str << *obj.get();
@@ -555,61 +555,61 @@ namespace zypp
       }
 
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RWCOW_pointer<_D, _Ptr> & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RWCOW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_Ptr & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const typename _Ptr::_Ptr & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RWCOW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_constPtr & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const typename _Ptr::_constPtr & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return( lhs.get() == rhs.get() ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( const RWCOW_pointer<_D, _Ptr> & lhs, std::nullptr_t )
+    template<class D, class DPtr>
+      inline bool operator==( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
       { return( lhs.get() == nullptr ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator==( std::nullptr_t, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator==( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
       { return( nullptr == rhs.get() ); }
 
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RWCOW_pointer<_D, _Ptr> & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RWCOW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_Ptr & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::PtrType & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const typename _Ptr::_Ptr & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const typename DPtr::PtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RWCOW_pointer<_D, _Ptr> & lhs, const typename _Ptr::_constPtr & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, const typename DPtr::constPtrType & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const typename _Ptr::_constPtr & lhs, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( const typename DPtr::constPtrType & lhs, const RWCOW_pointer<D, DPtr> & rhs )
       { return ! ( lhs == rhs ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( const RWCOW_pointer<_D, _Ptr> & lhs, std::nullptr_t )
+    template<class D, class DPtr>
+      inline bool operator!=( const RWCOW_pointer<D, DPtr> & lhs, std::nullptr_t )
       { return( lhs.get() != nullptr ); }
     /** \relates RWCOW_pointer */
-    template<class _D, class _Ptr>
-      inline bool operator!=( std::nullptr_t, const RWCOW_pointer<_D, _Ptr> & rhs )
+    template<class D, class DPtr>
+      inline bool operator!=( std::nullptr_t, const RWCOW_pointer<D, DPtr> & rhs )
       { return( nullptr != rhs.get() ); }
 
     ///////////////////////////////////////////////////////////////////
index 5b37830..c711da9 100644 (file)
@@ -15,7 +15,7 @@
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 {
-  const std::string & _SetCompareDef::asString( Enum val_r )
+  const std::string & ESetCompareDef::asString( Enum val_r )
   {
     static std::map<Enum,std::string> _table = {
       { uncomparable,          "{?}" },
@@ -27,7 +27,7 @@ namespace zypp
     return _table[val_r];
   }
 
-  const std::string & _SetRelationDef::asString( Enum val_r )
+  const std::string & ESetRelationDef::asString( Enum val_r )
   {
     static std::map<Enum,std::string> _table = {
       { uncomparable,          "{??}" },
index a97d5d9..28c8811 100644 (file)
 namespace zypp
 {
   ///////////////////////////////////////////////////////////////////
-  /// \class _SetCompareDef
+  /// \class ESetCompareDef
   /// \brief Result of set comparison (use like 'enum class \ref SetCompare')
   /// This is the type a \c compare function should return.
   ///////////////////////////////////////////////////////////////////
-  struct _SetCompareDef {
+  struct ESetCompareDef {
     enum Enum {
       uncomparable     = 0,            ///< "{?}"
       equal            = (1<<0),       ///< "{=}"
@@ -36,8 +36,8 @@ namespace zypp
     /** String representantion */
     static const std::string & asString( Enum val_r );
   };
-  /** \relates _SetCompareDef typedef 'enum class SetCompare' */
-  typedef base::EnumClass<_SetCompareDef> SetCompare;
+  /** \relates ESetCompareDef typedef 'enum class SetCompare' */
+  typedef base::EnumClass<ESetCompareDef> SetCompare;
 
   /** \relates SetCompare Stream output */
   inline std::ostream & operator<<( std::ostream & str, const SetCompare::Enum & obj )
@@ -47,14 +47,14 @@ namespace zypp
   { return str << obj.asEnum(); }
 
   ///////////////////////////////////////////////////////////////////
-  /// \class _SetRelationDef
+  /// \class ESetRelationDef
   /// \brief Set Relation based on \ref SetCompare (use like 'enum class \ref SetRelation')
   /// Comparison (\c== \c!=) between \ref SetRelation  and \ref SetCompare
   /// is defined to let \c SetRelation::subset match \c SetCompare::equal
   /// as well as \c SetCompare::properSubset. Accordingly \c SetRelation::subset
   /// matches \c SetCompare::equal as well as \c SetCompare::properSuperset.
   ///////////////////////////////////////////////////////////////////
-  struct _SetRelationDef {
+  struct ESetRelationDef {
     enum Enum {
       uncomparable     = SetCompare::uncomparable,     ///< "{??}"
       equal            = SetCompare::equal,            ///< "{==}"
@@ -67,8 +67,8 @@ namespace zypp
     /** String representantion */
     static const std::string & asString( Enum val_r );
   };
-  /** \relates _SetRelationDef typedef 'enum class SetRelation' */
-  typedef base::EnumClass<_SetRelationDef> SetRelation;
+  /** \relates ESetRelationDef typedef 'enum class SetRelation' */
+  typedef base::EnumClass<ESetRelationDef> SetRelation;
 
   /** \relates SetRelation Stream output */
   inline std::ostream & operator<<( std::ostream & str, const SetRelation::Enum & obj )
index 6aa3f45..9d4b7d9 100644 (file)
@@ -33,12 +33,12 @@ namespace zypp
     ///
     /// \note The tracking API expects the template arg to have set semantic.
     ///////////////////////////////////////////////////////////////////
-    template <class _Set>
+    template <class TSet>
     struct SetTracker
     {
-      typedef  _Set                    set_type;
-      typedef typename _Set::key_type  key_type;
-      typedef typename _Set::value_type        value_type;
+      typedef  TSet                    set_type;
+      typedef typename TSet::key_type  key_type;
+      typedef typename TSet::value_type        value_type;
 
       /** Default Ctor: empty set */
       SetTracker()
@@ -162,17 +162,17 @@ namespace zypp
       static bool find( const set_type & set_r, const key_type & key_r )
       { return set_r.find( key_r ) != set_r.end(); }
 
-      template <class _ORDERED_SET, typename enable_if = typename _ORDERED_SET::key_compare>
-      static void setDifference( const _ORDERED_SET & lhs, const _ORDERED_SET & rhs, _ORDERED_SET & result_r )
+      template <class TORDERED_SET, typename enable_if = typename TORDERED_SET::key_compare>
+      static void setDifference( const TORDERED_SET & lhs, const TORDERED_SET & rhs, TORDERED_SET & result_r )
       {
        // std::set_difference requires ordered sets!
        std::set_difference( lhs.begin(), lhs.end(), rhs.begin(), rhs.end(),
                             std::inserter( result_r, result_r.end() ),
-                            typename _ORDERED_SET::key_compare() );
+                            typename TORDERED_SET::key_compare() );
       }
 
-      template <class _UNORDERED_SET, typename enable_if = typename _UNORDERED_SET::hasher, typename = void>
-      static void setDifference( const _UNORDERED_SET & lhs, const _UNORDERED_SET & rhs, _UNORDERED_SET & result_r )
+      template <class TUNORDERED_SET, typename enable_if = typename TUNORDERED_SET::hasher, typename = void>
+      static void setDifference( const TUNORDERED_SET & lhs, const TUNORDERED_SET & rhs, TUNORDERED_SET & result_r )
       {
        // std::set_difference requires ordered sets!
        for ( const auto & l : lhs )
@@ -186,8 +186,8 @@ namespace zypp
     };
 
     /** \relates SetTracker Stream output */
-    template <class _Set>
-    std::ostream & operator<<( std::ostream & str, const SetTracker<_Set> & obj )
+    template <class TSet>
+    std::ostream & operator<<( std::ostream & str, const SetTracker<TSet> & obj )
     { return str << "set(" << obj.current().size() << "|+" << obj.added().size() << "|-" << obj.removed().size() << ')'; }
 
   } // namespace base
index 0315364..95ab089 100644 (file)
@@ -22,6 +22,7 @@ extern "C"
 #include "zypp/base/String.h"
 
 #include "zypp/base/StrMatcher.h"
+#include "zypp/sat/detail/PoolMember.h"
 
 using std::endl;
 
@@ -185,7 +186,7 @@ namespace zypp
        if ( _flags.mode() == Match::OTHER )
          ZYPP_THROW( MatchUnknownModeException( _flags, _search ) );
 
-       _matcher.reset( new ::_Datamatcher );
+       _matcher.reset( new sat::detail::CDatamatcher );
        int res = ::datamatcher_init( _matcher.get(), _search.c_str(), _flags.get() );
        if ( res )
        {
@@ -237,7 +238,7 @@ namespace zypp
   private:
     std::string _search;
     Match       _flags;
-    mutable scoped_ptr< ::_Datamatcher> _matcher;
+    mutable scoped_ptr< sat::detail::CDatamatcher> _matcher;
 
   private:
     friend Impl * rwcowClone<Impl>( const Impl * rhs );
index 6b4114a..7265efb 100644 (file)
@@ -334,8 +334,8 @@ namespace zypp
      * (\c std::string, \ref Pathname, \ref IdString, ...).
      * \Note \c NULL never matches.
      */
-    template<class _Tp>
-    bool operator()( const _Tp & string_r ) const
+    template<class Tp>
+    bool operator()( const Tp & string_r ) const
     { return doMatch( string_r.c_str() ); }
     /** \overload */
     bool operator()( const char * string_r ) const
index 2321593..15a5799 100644 (file)
@@ -51,11 +51,11 @@ namespace zypp { using boost::formatNAC; }
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 {
-  /** Request a human readable (translated) string representation of _Tp [_Tp.asUserString()]
+  /** Request a human readable (translated) string representation of Tp [Tp.asUserString()]
    * Classes may implement a default as member function.
    */
-  template <class _Tp>
-  std::string asUserString( const _Tp & val_r )
+  template <class Tp>
+  std::string asUserString( const Tp & val_r )
   { return val_r.asUserString(); }
 
 }// namespace zypp
@@ -71,8 +71,8 @@ namespace zypp
     MessageString( const char * str_r )                : std::string( str_r ? str_r : "" ) {}
     MessageString( const std::string & str_r )         : std::string( str_r ) {}
     // boost::format, std::ostringstream, str::Str ...
-    template<class _Str>
-    MessageString( const _Str & str_r )        : std::string( str_r.str() ) {}
+    template<class TStr>
+    MessageString( const TStr & str_r )        : std::string( str_r.str() ) {}
   };
 
   /** Convenience \c char* constructible from \c std::string and \c char*,
@@ -175,16 +175,16 @@ namespace zypp
     inline std::string asString( char * t )
     { return t; }
 
-    template<class _T>
-        inline std::string asString( const _T &t )
+    template<class Tp>
+        inline std::string asString( const Tp &t )
         { return t.asString(); }
 
-    template<class _T>
-        inline std::string asString( const intrusive_ptr<_T> &p )
+    template<class Tp>
+        inline std::string asString( const intrusive_ptr<Tp> &p )
         { return p->asString(); }
 
-    template<class _T>
-        inline std::string asString( const weak_ptr<_T> &p )
+    template<class Tp>
+        inline std::string asString( const weak_ptr<Tp> &p )
         { return p->asString(); }
 
     template<>
@@ -236,8 +236,8 @@ namespace zypp
     */
     struct Str
     {
-      template<class _Tp>
-      Str & operator<<( const _Tp & val )
+      template<class Tp>
+      Str & operator<<( const Tp & val )
       { _str << val; return *this; }
 
       Str & operator<<( std::ostream& (*iomanip)( std::ostream& ) )
@@ -356,8 +356,8 @@ namespace zypp
      * time_t t = strtonum<time_t>( "42" );
      * \endcode
     */
-    template<typename _It>
-      _It strtonum( const C_Str & str );
+    template<typename TInt>
+      TInt strtonum( const C_Str & str );
 
     template<>
       inline short              strtonum( const C_Str & str ) { return ::strtol  ( str, NULL, 0 ); }
@@ -382,9 +382,9 @@ namespace zypp
      * time_t t; strtonum( "42", t );
      * \endcode
     */
-    template<typename _It>
-      inline _It strtonum( const C_Str & str, _It & i )
-      { return i = strtonum<_It>( str ); }
+    template<typename TInt>
+      inline TInt strtonum( const C_Str & str, TInt & i )
+      { return i = strtonum<TInt>( str ); }
     //@}
 
     ///////////////////////////////////////////////////////////////////
@@ -474,10 +474,8 @@ namespace zypp
      * \endcode
      *
     */
-    template<class _OutputIterator>
-      unsigned split( const C_Str &   line_r,
-                      _OutputIterator result_r,
-                      const C_Str &   sepchars_r = " \t" )
+    template<class TOutputIterator>
+      unsigned split( const C_Str & line_r, TOutputIterator result_r, const C_Str & sepchars_r = " \t" )
       {
         const char * beg = line_r;
         const char * cur = beg;
@@ -535,11 +533,8 @@ namespace zypp
      *
      * \endcode
      */
-    template<class _OutputIterator>
-      unsigned splitEscaped( const C_Str &   line_r,
-                      _OutputIterator result_r,
-                      const C_Str &   sepchars_r = " \t",
-                      bool withEmpty = false)
+    template<class TOutputIterator>
+      unsigned splitEscaped( const C_Str & line_r, TOutputIterator result_r, const C_Str & sepchars_r = " \t", bool withEmpty = false)
       {
         const char * beg = line_r;
         const char * cur = beg;
@@ -668,10 +663,8 @@ namespace zypp
      * \endcode
      *
     */
-    template<class _OutputIterator>
-      unsigned splitFields( const C_Str &   line_r,
-                            _OutputIterator result_r,
-                            const C_Str &   sepchars_r = ":" )
+    template<class TOutputIterator>
+      unsigned splitFields( const C_Str & line_r, TOutputIterator result_r, const C_Str & sepchars_r = ":" )
       {
         const char * beg = line_r;
         const char * cur = beg;
@@ -709,13 +702,10 @@ namespace zypp
      * \see splitFields()
      * \see splitEscaped()
      */
-    template<class _OutputIterator>
-      unsigned splitFieldsEscaped( const C_Str &   line_r,
-                            _OutputIterator result_r,
-                            const C_Str &   sepchars_r = ":" )
+    template<class TOutputIterator>
+      unsigned splitFieldsEscaped( const C_Str & line_r, TOutputIterator result_r, const C_Str & sepchars_r = ":" )
       {
-        return
-          splitEscaped( line_r, result_r, sepchars_r, true /* withEmpty */ );
+        return splitEscaped( line_r, result_r, sepchars_r, true /* withEmpty */ );
       }
 
     //@}
@@ -724,12 +714,11 @@ namespace zypp
     /** \name Join. */
     //@{
     /** Join strings using separator \a sep_r (defaults to BLANK). */
-    template <class _Iterator>
-      std::string join( _Iterator begin, _Iterator end,
-                        const C_Str & sep_r = " " )
+    template <class TIterator>
+      std::string join( TIterator begin, TIterator end, const C_Str & sep_r = " " )
       {
         std::string res;
-        for ( _Iterator iter = begin; iter != end; ++ iter )
+        for ( TIterator iter = begin; iter != end; ++ iter )
           {
             if ( iter != begin )
               res += sep_r;
@@ -739,21 +728,19 @@ namespace zypp
       }
 
     /** Join strings using separator \a sep_r (defaults to BLANK). */
-    template <class _Container>
-      std::string join( const _Container & cont_r,
-                        const C_Str & sep_r = " " )
+    template <class TContainer>
+      std::string join( const TContainer & cont_r, const C_Str & sep_r = " " )
       { return join( cont_r.begin(), cont_r.end(), sep_r ); }
 
     /** Join strings using separator \a sep_r, quoting or escaping the values.
      * Separator defaults to BLANK. Use \ref splitEscaped to restore the
      * values.
      */
-    template <class _Iterator>
-      std::string joinEscaped( _Iterator begin, _Iterator end,
-                               const char sep_r = ' ' )
+    template <class TIterator>
+      std::string joinEscaped( TIterator begin, TIterator end, const char sep_r = ' ' )
       {
         std::vector<char> buf;
-        for ( _Iterator iter = begin; iter != end; ++ iter )
+        for ( TIterator iter = begin; iter != end; ++ iter )
         {
           if ( iter != begin )
             buf.push_back( sep_r );
index 4360470..5ca9b70 100644 (file)
@@ -19,17 +19,17 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
   namespace _detail
   {
-    template<typename _Tp>
+    template<typename Tp>
     struct _has_type_const_iterator
     {
     private:
       template<typename C> static std::true_type  test( typename C::const_iterator * );
       template<typename C> static std::false_type test(...);
     public:
-      static constexpr bool value = decltype(test<_Tp>(nullptr))::value;
+      static constexpr bool value = decltype(test<Tp>(nullptr))::value;
     };
 
-    template <typename _Tp>
+    template <typename Tp>
     struct _has_container_begin_end
     {
     private:
@@ -43,29 +43,29 @@ namespace zypp
       template<typename C> static std::false_type testEnd(...);
 
     public:
-      static constexpr bool beg_value = decltype(testBeg<_Tp>(nullptr))::value;
-      static constexpr bool end_value = decltype(testEnd<_Tp>(nullptr))::value;
+      static constexpr bool beg_value = decltype(testBeg<Tp>(nullptr))::value;
+      static constexpr bool end_value = decltype(testEnd<Tp>(nullptr))::value;
       static constexpr bool value = beg_value && end_value;
     };
   } // namespace _detail
   ///////////////////////////////////////////////////////////////////
 
-  /** Whether \a _Tp defines type \a _Tp::const_iterator */
-  template<typename _Tp>
+  /** Whether \a Tp defines type \a Tp::const_iterator */
+  template<typename Tp>
   struct has_type_const_iterator
-  : public std::integral_constant<bool, _detail::has_type_const_iterator<_Tp>::value>
+  : public std::integral_constant<bool, _detail::has_type_const_iterator<Tp>::value>
   {};
 
-  /** Whether \a _Tp defines methods <tt>_Tp::const_iterator begin/end() const</tt> */
-  template<typename _Tp>
+  /** Whether \a Tp defines methods <tt>Tp::const_iterator begin/end() const</tt> */
+  template<typename Tp>
   struct has_container_begin_end
-  : public std::integral_constant<bool, _detail::_has_container_begin_end<_Tp>::value>
+  : public std::integral_constant<bool, _detail::_has_container_begin_end<Tp>::value>
   {};
 
-  /** Whether \a _Tp is a container (begin/end iterabel, but not plain std::string) */
-  template<typename _Tp>
+  /** Whether \a Tp is a container (begin/end iterabel, but not plain std::string) */
+  template<typename Tp>
   struct is_container
-  : public std::integral_constant<bool, !std::is_same<_Tp, std::string>::value && has_container_begin_end<_Tp>::value>
+  : public std::integral_constant<bool, !std::is_same<Tp, std::string>::value && has_container_begin_end<Tp>::value>
   {};
 
 
index da54d05..d49142b 100644 (file)
@@ -31,11 +31,11 @@ namespace zypp
     ///
     /// Used e.g. vor variable replaced config strings.
     ///////////////////////////////////////////////////////////////////
-    template<class _Tp, class _UnaryFunction>
+    template<class Tp, class TUnaryFunction>
     struct ValueTransform
     {
-      typedef _Tp RawType;
-      typedef _UnaryFunction Transformator;
+      typedef Tp RawType;
+      typedef TUnaryFunction Transformator;
       typedef typename Transformator::result_type TransformedType;
 
     public:
@@ -87,11 +87,11 @@ namespace zypp
     ///
     /// Offers iterating over transformed strings in the list.
     ///////////////////////////////////////////////////////////////////
-    template<class _Container, class _UnaryFunction>
+    template<class TContainer, class TUnaryFunction>
     struct ContainerTransform
     {
-      typedef _Container Container;
-      typedef _UnaryFunction Transformator;
+      typedef TContainer Container;
+      typedef TUnaryFunction Transformator;
       typedef typename Container::size_type size_type;
       typedef typename Container::value_type RawType;
       typedef typename Transformator::result_type TransformedType;
index 717a9f3..2e246dc 100644 (file)
@@ -33,8 +33,8 @@ namespace zypp
     using xml::unescape;
 
     /** \relates NodeAttr NODE ATTRIBUTE representation of types [asString] */
-    template <class _Tp>
-    std::string asXmlNodeAttr( const _Tp & val_r )
+    template <class Tp>
+    std::string asXmlNodeAttr( const Tp & val_r )
     { return asString( val_r ); }
 
     ///////////////////////////////////////////////////////////////////
@@ -44,8 +44,8 @@ namespace zypp
     {
       typedef std::pair<std::string,std::string> Pair;
 
-      template <typename _Type>
-      NodeAttr( std::string key_r, const _Type & val_r )
+      template <typename Tp>
+      NodeAttr( std::string key_r, const Tp & val_r )
       : Pair( std::move(key_r), asXmlNodeAttr(val_r) )
       {}
 
@@ -181,8 +181,8 @@ namespace zypp
   /// \name Default dumpAsXmlOn based on asString.
   ///
   //@{
-  template <class _Tp>
-  inline std::ostream & dumpAsXmlOn( std::ostream & str, const _Tp & obj, const std::string & name_r )
+  template <class Tp>
+  inline std::ostream & dumpAsXmlOn( std::ostream & str, const Tp & obj, const std::string & name_r )
   {
     xmlout::Node guard( str, name_r, xmlout::Node::optionalContent );
     const std::string & content( asString( obj ) );
index 18c05fe..3569ba1 100644 (file)
@@ -56,7 +56,7 @@ MediaHandler::MediaHandler ( const Url &      url_r,
                             const bool       does_download_r )
     : _mediaSource()
     , _attachPoint( new AttachPoint())
-    , _AttachPointHint()
+    , _attachPointHint()
     , _relativeRoot( urlpath_below_attachpoint_r)
     , _does_download( does_download_r )
     , _attach_mtime(0)
@@ -268,8 +268,8 @@ MediaHandler::setAttachPoint(const AttachPointRef &ref)
 void
 MediaHandler::attachPointHint(const Pathname &path, bool temporary)
 {
-  _AttachPointHint.path = path;
-  _AttachPointHint.temp = temporary;
+  _attachPointHint.path = path;
+  _attachPointHint.temp = temporary;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -283,7 +283,7 @@ MediaHandler::attachPointHint(const Pathname &path, bool temporary)
 AttachPoint
 MediaHandler::attachPointHint() const
 {
-  return _AttachPointHint;
+  return _attachPointHint;
 }
 
 ///////////////////////////////////////////////////////////////////
index f5b5cde..52fd9a8 100644 (file)
@@ -82,7 +82,7 @@ class MediaHandler {
         *
         *      dir, false => user specified attach point (not removed)
         */
-       AttachPoint     _AttachPointHint;
+       AttachPoint     _attachPointHint;
 
        /**
         * The relative root directory of the data on the media.
index b50593c..51230bc 100644 (file)
@@ -27,7 +27,7 @@ namespace zypp {
     shared_ptr<ProxyInfo::Impl> ProxyInfo::Impl::_nullimpl;
 
     ProxyInfo::ProxyInfo()
-#ifdef _WITH_LIBPROXY_SUPPORT_
+#ifdef WITH_LIBPROXY_SUPPORT
     : _pimpl( new ProxyInfoLibproxy() )
 #else
     : _pimpl( new ProxyInfoSysconfig("proxy") )
index 408b9f3..1ea7b01 100644 (file)
@@ -16,7 +16,7 @@
 #include <list>
 
 #include "zypp/media/proxyinfo/ProxyInfoSysconfig.h"
-#ifdef _WITH_LIBPROXY_SUPPORT_
+#ifdef WITH_LIBPROXY_SUPPORT
 #include "zypp/media/proxyinfo/ProxyInfoLibproxy.h"
 #endif
 
index 85ffc86..6b53a84 100644 (file)
@@ -27,10 +27,10 @@ namespace zypp
 
     /** Parse xml \c input_r and store data in \c data_r.
      *
-     * \c _Data must be defaultconstructible and assignable.
+     * \c TData must be defaultconstructible and assignable.
      *
-     * \c _Data::RootNode must be a \ref xml::ParseDef constructible
-     * from \c _Data&.
+     * \c TData::RootNode must be a \ref xml::ParseDef constructible
+     * from \c TData&.
      *
      * \throws ParseDefException on parse errors.
      *
@@ -93,11 +93,11 @@ namespace zypp
      *  xmlData.parse( "/tmp/mytest.xml" );
      * \endcode
      */
-    template<class _Data>
-    inline void rnParse( const InputStream & input_r, _Data & data_r )
+    template<class TData>
+    inline void rnParse( const InputStream & input_r, TData & data_r )
     {
-      typedef typename _Data::RootNode RootNode;
-      _Data pdata;
+      typedef typename TData::RootNode RootNode;
+      TData pdata;
 
       xml::Reader reader( input_r );
       RootNode rootNode( pdata );
index 8f0ee7d..ba559ee 100644 (file)
@@ -125,13 +125,13 @@ namespace zypp
     /** \ref parseDefAssign exposed details */
     namespace parse_def_assign
     { /////////////////////////////////////////////////////////////////
-     template <class _Type> struct Assigner;
+      template <class Tp> struct Assigner;
 
       typedef shared_ptr<Assigner<void> > AssignerRef;
 
       /** Common interface to all Assigner types. */
       template <>
-          struct Assigner<void>
+      struct Assigner<void>
       {
         virtual ~Assigner()
         {}
@@ -140,20 +140,20 @@ namespace zypp
       };
 
       /** Assigner assigns text to types constructible from \c char*.
-       * \see \ref assigner consvenience constructor.
+       * \see \ref assigner convenience constructor.
       */
-      template <class _Type>
-          struct Assigner : public Assigner<void>
+      template <class Tp>
+      struct Assigner : public Assigner<void>
       {
-        Assigner(_Type & value_r )
+        Assigner( Tp & value_r )
           : _value( &value_r )
         {}
 
         virtual void assign( const char * text_r )
-        { *_value = _Type( text_r ); }
+        { *_value = Tp( text_r ); }
 
         private:
-          _Type * _value;
+          Tp * _value;
       };
 
       /** \name Assigner specialisation for numeric and boolean values.
@@ -176,20 +176,19 @@ namespace zypp
           inline void Assigner<unsigned long>::assign( const char * text_r )      { str::strtonum( text_r, *_value ); }
       template <>
           inline void Assigner<unsigned long long>::assign( const char * text_r ) { str::strtonum( text_r, *_value ); }
-
       template <>
-          inline void Assigner<bool>::assign( const char * text_r ) { str::strToBoolNodefault( text_r, *_value ); }
+          inline void Assigner<bool>::assign( const char * text_r )               { str::strToBoolNodefault( text_r, *_value ); }
       //@}
 
       /** \name \relates Assigner Convenience constructor */
       //@{
-      template <class _Type>
-          inline AssignerRef assigner( _Type & value_r )
-      { return AssignerRef( new Assigner<_Type>( value_r ) ); }
+      template <class Tp>
+          inline AssignerRef assigner( Tp & value_r )
+      { return AssignerRef( new Assigner<Tp>( value_r ) ); }
 
-      template <class _Tp, _Tp _Initial>
-          inline AssignerRef assigner( DefaultIntegral<_Tp,_Initial> & value_r )
-      { return AssignerRef( new Assigner<_Tp>( value_r.get() ) ); }
+      template <class Tp, Tp TInitial>
+          inline AssignerRef assigner( DefaultIntegral<Tp,TInitial> & value_r )
+      { return AssignerRef( new Assigner<Tp>( value_r.get() ) ); }
       //@}
 
 
@@ -260,9 +259,9 @@ namespace zypp
 
         private:
           std::unordered_map<std::string, std::vector<AssignerRef> > _attr;
-          std::vector<AssignerRef>                                        _text;
-          function<void ( const Node & )>                                 _pre;
-          function<void ( const Node & )>                                 _post;
+          std::vector<AssignerRef>                                   _text;
+          function<void ( const Node & )>                            _pre;
+          function<void ( const Node & )>                            _post;
       };
 
       /** Helper class to build a \ref Consumer.
@@ -286,25 +285,25 @@ namespace zypp
         {}
 
         /** Contruct \ref Consumer. */
-        template <class _Type>
-            Builder( _Type & value_r )
+        template <class Tp>
+            Builder( Tp & value_r )
           : _ptr( new Consumer )
         { operator()( value_r ); }
 
         /** Contruct \ref Consumer. */
-        template <class _Type>
-            Builder( const std::string & attr_r, _Type & value_r )
+        template <class Tp>
+            Builder( const std::string & attr_r, Tp & value_r )
           : _ptr( new Consumer )
         {  operator()( attr_r, value_r ); }
 
         /** Extend \ref Consumer. */
-        template <class _Type>
-            Builder & operator()( _Type & value_r )
+        template <class Tp>
+            Builder & operator()( Tp & value_r )
         { _ptr->add( assigner( value_r ) ); return *this; }
 
         /** Extend \ref Consumer. */
-        template <class _Type>
-            Builder & operator()( const std::string & attr_r, _Type & value_r )
+        template <class Tp>
+            Builder & operator()( const std::string & attr_r, Tp & value_r )
         { _ptr->add( attr_r, assigner( value_r ) ); return *this; }
 
         /** Set pre notification callback. */
@@ -356,12 +355,12 @@ namespace zypp
     inline parse_def_assign::Builder parseDefAssign()
     { return parse_def_assign::Builder(); }
 
-    template <class _Type>
-        inline parse_def_assign::Builder parseDefAssign( _Type & value_r )
+    template <class Tp>
+        inline parse_def_assign::Builder parseDefAssign( Tp & value_r )
     { return parse_def_assign::Builder( value_r ); }
 
-    template <class _Type>
-        inline parse_def_assign::Builder parseDefAssign( const std::string & attr_r, _Type & value_r )
+    template <class Tp>
+        inline parse_def_assign::Builder parseDefAssign( const std::string & attr_r, Tp & value_r )
     { return parse_def_assign::Builder( attr_r, value_r ); }
     //@}
 
index a01abed..0b9f684 100644 (file)
@@ -66,9 +66,9 @@ namespace zypp
    *  number of ResObjects per Kind in a container.
    * Fits container of ResObject::Ptr or PoolItem.
   */
-  template <class _Iterator>
+  template <class TIterator>
     std::ostream & dumpPoolStats( std::ostream & str,
-                                  _Iterator begin_r, _Iterator end_r )
+                                  TIterator begin_r, TIterator end_r )
     {
       pool::PoolStats stats;
       std::for_each( begin_r, end_r,
index eeb8378..816d2e9 100644 (file)
@@ -45,15 +45,15 @@ namespace zypp
 
     /** In CXX0X std::_Select2nd does no longer derive from std::unary_function
      */
-    template<typename _Pair>
-    struct P_Select2nd : public std::unary_function<_Pair, typename _Pair::second_type>
+    template<typename TPair>
+    struct P_Select2nd : public std::unary_function<TPair, typename TPair::second_type>
     {
-      typename _Pair::second_type&
-      operator()(_Pair& __x) const
+      typename TPair::second_type&
+      operator()(TPair& __x) const
       { return __x.second; }
 
-      const typename _Pair::second_type&
-      operator()(const _Pair& __x) const
+      const typename TPair::second_type&
+      operator()(const TPair& __x) const
       { return __x.second; }
     };
 
index 783d6c8..8d5e2d1 100644 (file)
@@ -65,8 +65,8 @@ namespace zypp
       const_iterator end() const       { return reinterpret_cast<const_iterator>(Queue::end()); }
 
     public:
-      using Queue::operator struct ::_Queue *;         ///< libsolv backdoor
-      using Queue::operator const struct ::_Queue *;   ///< libsolv backdoor
+      using Queue::operator detail::CQueue *;          ///< libsolv backdoor
+      using Queue::operator const detail::CQueue *;    ///< libsolv backdoor
     };
 
     /** \relates FileConflicts Stream output */
index d3fb410..0f98bdb 100644 (file)
@@ -753,7 +753,7 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
 
-    bool LookupAttr::iterator::dip_equal( const ::_Dataiterator & lhs, const ::_Dataiterator & rhs ) const
+    bool LookupAttr::iterator::dip_equal( const detail::CDataiterator & lhs, const detail::CDataiterator & rhs ) const
     {
       // Iterator equal is same position in same container.
       // Here: same attribute in same solvable.
@@ -784,7 +784,7 @@ namespace zypp
 
     std::ostream & operator<<( std::ostream & str, const LookupAttr::iterator & obj )
     {
-      const ::_Dataiterator * dip = obj.get();
+      const detail::CDataiterator * dip = obj.get();
       if ( ! dip )
         return str << "EndOfQuery";
 
@@ -808,9 +808,9 @@ namespace zypp
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
 
-std::ostream & operator<<( std::ostream & str, const ::_Dataiterator * obj )
+std::ostream & operator<<( std::ostream & str, const zypp::sat::detail::CDataiterator * obj )
 {
-  str << "::_Dataiterator(";
+  str << "detail::CDataiterator(";
   if ( ! obj )
   {
     str << "NULL";
index 86500a0..f547e22 100644 (file)
 #ifndef ZYPP_SAT_LOOKUPATTR_H
 #define ZYPP_SAT_LOOKUPATTR_H
 
-extern "C"
-{
-struct _Dataiterator;
-}
 #include <iosfwd>
 
 #include "zypp/base/PtrTypes.h"
@@ -161,8 +157,9 @@ namespace zypp
         */
         size_type size() const;
 
-        /** TransformIterator returning an \ref iterator vaue of type \c _ResultT. */
-        template<class _ResultT, class _AttrT = _ResultT> class transformIterator;
+        /** TransformIterator returning an \ref iterator vaue of type \c TResult. */
+        template<class TResult, class TAttr = TResult>
+       class TransformIterator;
         //@}
 
       public:
@@ -285,7 +282,7 @@ namespace zypp
 
     namespace detail
     {
-      /** Wrapper around sat \c ::_Dataiterator.
+      /** Wrapper around sat \c detail::CDataiterator.
        *
        * Manages copy and assign, and release of allocated
        * resources like datamatcher inside the dataiterator.
@@ -295,7 +292,7 @@ namespace zypp
       class DIWrap
       {
         public:
-          /** \c NULL \c ::_Dataiterator */
+          /** \c NULL \c detail::CDataiterator */
           DIWrap()
           : _dip( 0 )
           {}
@@ -330,12 +327,12 @@ namespace zypp
           { return _dip; }
 
         public:
-          ::_Dataiterator * operator->() const  { return _dip; }
-          ::_Dataiterator * get()        const  { return _dip; }
+          detail::CDataiterator * operator->() const  { return _dip; }
+          detail::CDataiterator * get()        const  { return _dip; }
           const std::string & getstr()   const  { return _mstring; }
 
        private:
-          ::_Dataiterator * _dip;
+          detail::CDataiterator * _dip;
           std::string _mstring;
       };
       /** \relates DIWrap Stream output. */
@@ -352,7 +349,7 @@ namespace zypp
      */
     class LookupAttr::iterator : public boost::iterator_adaptor<
         iterator                       // Derived
-        , ::_Dataiterator *            // Base
+        , detail::CDataiterator *            // Base
         , detail::IdType               // Value
         , boost::forward_traversal_tag // CategoryOrTraversal
         , detail::IdType               // Reference
@@ -528,7 +525,7 @@ namespace zypp
          *
          * Should be specialized for supported types above.
         */
-        template<class _Tp> _Tp asType() const { return _Tp(id()); }
+        template<class Tp> Tp asType() const { return Tp(id()); }
         //@}
 
         ///////////////////////////////////////////////////////////////////
@@ -545,7 +542,7 @@ namespace zypp
 
       public:
         /**
-         * C-tor taking over ownership of the passed \c ::_Dataiterator
+         * C-tor taking over ownership of the passed \c detail::CDataiterator
          * and doing it's first iteration (::dataiterator_step)
          */
         iterator( detail::DIWrap & dip_r );
@@ -560,7 +557,7 @@ namespace zypp
               && ( ! base() || dip_equal( *base(), *rhs.base() ) );
         }
 
-        bool dip_equal( const ::_Dataiterator & lhs, const ::_Dataiterator & rhs ) const;
+        bool dip_equal( const detail::CDataiterator & lhs, const detail::CDataiterator & rhs ) const;
 
         detail::IdType dereference() const;
 
@@ -568,7 +565,7 @@ namespace zypp
 
       public:
         /** Expert backdoor. */
-        ::_Dataiterator * get() const
+        detail::CDataiterator * get() const
         { return _dip.get(); }
       private:
         detail::DIWrap _dip;
@@ -591,7 +588,7 @@ namespace zypp
     template<> inline IdString     LookupAttr::iterator::asType<IdString>()     const { return idStr(); }
     template<>        CheckSum     LookupAttr::iterator::asType<CheckSum>()     const;
 
-    template<class _ResultT, class _AttrT>
+    template<class TResult, class TAttr>
     class ArrayAttr;
     //@}
 
@@ -603,10 +600,10 @@ namespace zypp
 ///////////////////////////////////////////////////////////////////
 
 /** \relates LookupAttr::iterator Stream output of the underlying iterator for debug. */
-std::ostream & operator<<( std::ostream & str, const ::_Dataiterator * obj );
+std::ostream & operator<<( std::ostream & str, const zypp::sat::detail::CDataiterator * obj );
 
 /** \relates LookupAttr::iterator Stream output of the underlying iterator for debug. */
-inline std::ostream & operator<<( std::ostream & str, const ::_Dataiterator & obj )
+inline std::ostream & operator<<( std::ostream & str, const zypp::sat::detail::CDataiterator & obj )
 { return str << &obj; }
 
 #endif // ZYPP_SAT_LOOKUPATTR_H
index 800e9c2..9102add 100644 (file)
@@ -24,11 +24,11 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
     //
-    // CLASS NAME : LookupAttr::transformIterator
+    // CLASS NAME : LookupAttr::TransformIterator
     //
-    /** TransformIterator returning an \ref iterator value of type \c _ResultT.
+    /** TransformIterator returning an \ref iterator value of type \c TResult.
      *
-     * The underlying LookupAttr::iterators value is retrieved \ref asType<_AttrT>
+     * The underlying LookupAttr::iterators value is retrieved \ref asType<TAttr>
      * and the returned \ref ResultT is constructed fron that value.
      *
      * \code
@@ -40,7 +40,7 @@ namespace zypp
      *       {}
      *
      *     public:
-     *       typedef sat::LookupAttr::transformIterator<PackageKeyword,IdString> iterator;
+     *       typedef sat::LookupAttr::TransformIterator<PackageKeyword,IdString> iterator;
      *
      *       iterator begin() const { return iterator( _q.begin() ); }
      *       iterator end() const   { return iterator( _q.end() ); }
@@ -52,21 +52,21 @@ namespace zypp
      *
      * \see \ref ArrayAttr.
      */
-    template<class _ResultT, class _AttrT>
-    class LookupAttr::transformIterator : public boost::iterator_adaptor<
-          transformIterator<_ResultT,_AttrT> // Derived
+    template<class TResult, class TAttr>
+    class LookupAttr::TransformIterator : public boost::iterator_adaptor<
+          TransformIterator<TResult,TAttr> // Derived
           , LookupAttr::iterator         // Base
-          , _ResultT                     // Value
+          , TResult                      // Value
           , boost::forward_traversal_tag // CategoryOrTraversal
-          , _ResultT                     // Reference
+          , TResult                      // Reference
     >
     {
       public:
-        transformIterator()
+        TransformIterator()
         {}
 
         explicit
-        transformIterator( const LookupAttr::iterator & val_r )
+        TransformIterator( const LookupAttr::iterator & val_r )
         { this->base_reference() = val_r; }
 
       public:
@@ -116,25 +116,25 @@ namespace zypp
       private:
         friend class boost::iterator_core_access;
 
-        _ResultT dereference() const
+        TResult dereference() const
         {
           const LookupAttr::iterator lit( this->base_reference() );
-          return _ResultT( lit.asType<_AttrT>() );
+          return TResult( lit.asType<TAttr>() );
         }
     };
     ///////////////////////////////////////////////////////////////////
 
-    template<class _ResultT, class _AttrT>
+    template<class TResult, class TAttr>
     class ArrayAttr;
 
-    template<class _ResultT, class _AttrT>
-    std::ostream & operator<<( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj );
+    template<class TResult, class TAttr>
+    std::ostream & operator<<( std::ostream & str, const ArrayAttr<TResult,TAttr> & obj );
 
     ///////////////////////////////////////////////////////////////////
     //
     // CLASS NAME : ArrayAttr
     //
-    /** \ref LookupAttr::transformIterator based container to retrieve list attributes.
+    /** \ref LookupAttr::TransformIterator based container to retrieve list attributes.
      *
      * You may pass \ref LookupAttr::REPO_ATTR as \ref LookupAttr::Location argument,
      * to lookup attributes associated with the \ref Repository as a whole
@@ -150,10 +150,10 @@ namespace zypp
      *
      * \todo Maybe add some way to unify the result.
      */
-    template<class _ResultT, class _AttrT>
+    template<class TResult, class TAttr>
     class ArrayAttr
     {
-      friend std::ostream & operator<< <_ResultT,_AttrT>( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj );
+      friend std::ostream & operator<< <TResult,TAttr>( std::ostream & str, const ArrayAttr<TResult,TAttr> & obj );
 
       public:
         ArrayAttr()
@@ -172,7 +172,7 @@ namespace zypp
         {}
 
       public:
-        typedef LookupAttr::transformIterator<_ResultT,_AttrT> iterator;
+        typedef LookupAttr::TransformIterator<TResult,TAttr> iterator;
         typedef LookupAttr::size_type size_type;
 
         iterator begin() const
@@ -194,7 +194,7 @@ namespace zypp
 
       public:
 
-        iterator find( const _ResultT & key_r ) const
+        iterator find( const TResult & key_r ) const
         {
           for_( it, begin(), end() )
           {
@@ -210,8 +210,8 @@ namespace zypp
     ///////////////////////////////////////////////////////////////////
 
     /** \relates LookupAttr::iterator Stream output. */
-    template<class _ResultT, class _AttrT>
-    inline std::ostream & operator<<( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj )
+    template<class TResult, class TAttr>
+    inline std::ostream & operator<<( std::ostream & str, const ArrayAttr<TResult,TAttr> & obj )
     { return dumpOn( str, obj._q ); }
 
     /////////////////////////////////////////////////////////////////
index 66afad2..b44a1f6 100644 (file)
@@ -27,10 +27,10 @@ namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   template<>
-  struct ::_Map * rwcowClone<struct ::_Map>( const struct ::_Map * rhs )
+  sat::detail::CMap * rwcowClone<sat::detail::CMap>( const sat::detail::CMap * rhs )
   {
-    struct ::_Map * ret = new ::_Map;
-    ::map_init_clone( ret, const_cast<struct ::_Map *>(rhs) );
+    sat::detail::CMap * ret = new sat::detail::CMap;
+    ::map_init_clone( ret, const_cast<sat::detail::CMap *>(rhs) );
     return ret;
   }
 
@@ -39,15 +39,15 @@ namespace zypp
   { /////////////////////////////////////////////////////////////////
 
     Map::Map()
-      : _pimpl( new ::_Map )
+      : _pimpl( new detail::CMap )
     { ::map_init( _pimpl.get(), 0 ); }
 
     Map::Map( size_type size_r )
-      : _pimpl( new ::_Map )
+      : _pimpl( new detail::CMap )
     { ::map_init( _pimpl.get(), size_r ); }
 
     Map::Map( PoolSizeType )
-      : _pimpl( new ::_Map )
+      : _pimpl( new detail::CMap )
     { ::map_init( _pimpl.get(), Pool::instance().capacity() ); }
 
     Map::~Map()
@@ -117,13 +117,13 @@ namespace zypp
       return ret;
     }
 
-    Map::operator struct ::_Map *()    // COW: nonconst version can't be inlined
-    { return _pimpl.get(); }           // without exposing struct ::_Map
+    Map::operator detail::CMap *()     // COW: nonconst version can't be inlined
+    { return _pimpl.get(); }           // without exposing detail::CMap
 
     bool operator==( const Map & lhs, const Map & rhs )
     {
-      const struct ::_Map * l = lhs;
-      const struct ::_Map * r = rhs;
+      const detail::CMap * l = lhs;
+      const detail::CMap * r = rhs;
       return( l == r || ( l->size == r->size && ::memcmp( l->map, r->map, l->size ) == 0 ) );
     }
 
index 9eaddea..ab6a7c1 100644 (file)
 #ifndef ZYPP_SAT_MAP_H
 #define ZYPP_SAT_MAP_H
 
-extern "C"
-{
-  struct _Map;
-}
 #include <iosfwd>
 #include <string>
 
 #include "zypp/base/PtrTypes.h"
+#include "zypp/sat/detail/PoolMember.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -108,11 +105,11 @@ namespace zypp
       std::string asString( const char on_r = '1', const char off_r = '0' ) const;
 
     public:
-      operator struct ::_Map *();              ///< libsolv backdoor
-      operator const struct ::_Map *() const   ///< libsolv backdoor
+      operator detail::CMap *();               ///< libsolv backdoor
+      operator const detail::CMap *() const    ///< libsolv backdoor
       { return _pimpl.get(); }
     private:
-      RWCOW_pointer<struct ::_Map> _pimpl;     ///< Pointer to implementation
+      RWCOW_pointer<detail::CMap> _pimpl;      ///< Pointer to implementation
     };
 
     /** \relates Map Stream output */
@@ -130,7 +127,7 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   /** \relates Map Clone function for RWCOW_pointer */
-  template<> struct ::_Map * rwcowClone<struct ::_Map>( const struct ::_Map * rhs );
+  template<> sat::detail::CMap * rwcowClone<sat::detail::CMap>( const sat::detail::CMap * rhs );
 
   typedef sat::Map Bitmap;
 
index cd4c79a..f6694ac 100644 (file)
@@ -46,7 +46,7 @@ namespace zypp
     const std::string & Pool::systemRepoAlias()
     { return detail::PoolImpl::systemRepoAlias(); }
 
-    ::_Pool * Pool::get() const
+    detail::CPool * Pool::get() const
     { return myPool().getPool(); }
 
     Pool::size_type Pool::capacity() const
@@ -288,12 +288,12 @@ namespace zypp
       std::ofstream idx( solvidxfile.c_str() );
 
 
-      ::_Pool * _pool = ::pool_create();
-      ::_Repo * _repo = ::repo_create( _pool, "" );
+      detail::CPool * _pool = ::pool_create();
+      detail::CRepo * _repo = ::repo_create( _pool, "" );
       if ( ::repo_add_solv( _repo, solv, 0 ) == 0 )
       {
        int _id = 0;
-       ::_Solvable * _solv = nullptr;
+       detail::CSolvable * _solv = nullptr;
        FOR_REPO_SOLVABLES( _repo, _id, _solv )
        {
          if ( _solv )
index c907efc..b02d2b3 100644 (file)
@@ -167,14 +167,14 @@ namespace zypp
        { return makeIterable( solvablesBegin(), solvablesEnd() ); }
 
       public:
-        /** \name Iterate all Solvables matching a \c _Filter. */
+        /** \name Iterate all Solvables matching a \c TFilter. */
         //@{
-        template<class _Filter>
-        filter_iterator<_Filter,SolvableIterator> filterBegin( const _Filter & filter_r ) const
+        template<class TFilter>
+        filter_iterator<TFilter,SolvableIterator> filterBegin( const TFilter & filter_r ) const
         { return make_filter_iterator( filter_r, solvablesBegin(), solvablesEnd() ); }
 
-        template<class _Filter>
-        filter_iterator<_Filter,SolvableIterator> filterEnd( const _Filter & filter_r ) const
+        template<class TFilter>
+        filter_iterator<TFilter,SolvableIterator> filterEnd( const TFilter & filter_r ) const
         { return make_filter_iterator( filter_r, solvablesEnd(), solvablesEnd() ); }
         //@}
 
@@ -260,7 +260,7 @@ namespace zypp
 
       public:
         /** Expert backdoor. */
-        ::_Pool * get() const;
+        detail::CPool * get() const;
       private:
         /** Default ctor */
         Pool() {}
index 13458ba..8aa2e74 100644 (file)
@@ -25,10 +25,10 @@ namespace zypp
 {
 
   template<>
-  struct ::_Queue * rwcowClone<struct ::_Queue>( const struct ::_Queue * rhs )
+  sat::detail::CQueue * rwcowClone<sat::detail::CQueue>( const sat::detail::CQueue * rhs )
   {
-    struct ::_Queue * ret = new ::_Queue;
-    ::queue_init_clone( ret, const_cast<struct ::_Queue *>(rhs) );
+    sat::detail::CQueue * ret = new sat::detail::CQueue;
+    ::queue_init_clone( ret, const_cast<sat::detail::CQueue *>(rhs) );
     return ret;
   }
 
@@ -37,7 +37,7 @@ namespace zypp
   {
 
     Queue::Queue()
-      : _pimpl( new ::_Queue )
+      : _pimpl( new detail::CQueue )
     { ::queue_init( _pimpl.get() ); }
 
     Queue::~Queue()
@@ -115,8 +115,8 @@ namespace zypp
     Queue::value_type Queue::pop_front()
     { return ::queue_shift( _pimpl.get() ); }
 
-    Queue::operator struct ::_Queue *()                // COW: nonconst version can't be inlined
-    { return _pimpl.get(); }                   // without exposing struct ::_Queue
+    Queue::operator detail::CQueue *()         // COW: nonconst version can't be inlined
+    { return _pimpl.get(); }                   // without exposing detail::CQueue
 
     std::ostream & operator<<( std::ostream & str, const Queue & obj )
     { return dumpRangeLine( str << "Queue ", obj.begin(), obj.end() );  }
@@ -135,8 +135,8 @@ namespace zypp
 
     bool operator==( const Queue & lhs, const Queue & rhs )
     {
-      const struct ::_Queue * l = lhs;
-      const struct ::_Queue * r = rhs;
+      const detail::CQueue * l = lhs;
+      const detail::CQueue * r = rhs;
       return( l == r || ( l->count == r->count && ::memcmp( l->elements, r->elements, l->count ) == 0 ) );
     }
 
index c8563b6..a1b3fdc 100644 (file)
 #ifndef ZYPP_SAT_QUEUE_H
 #define ZYPP_SAT_QUEUE_H
 
-extern "C"
-{
-  struct _Queue;
-}
 #include <iosfwd>
 
 #include "zypp/base/PtrTypes.h"
@@ -111,11 +107,11 @@ namespace zypp
        value_type pop_front();
 
      public:
-       operator struct ::_Queue *();                   ///< libsolv backdoor
-       operator const struct ::_Queue *() const        ///< libsolv backdoor
+       operator detail::CQueue *();                    ///< libsolv backdoor
+       operator const detail::CQueue *() const         ///< libsolv backdoor
        { return _pimpl.get(); }
       private:
-       RWCOW_pointer<struct ::_Queue> _pimpl;          ///< Pointer to implementation
+       RWCOW_pointer<detail::CQueue> _pimpl;           ///< Pointer to implementation
     };
 
     /** \relates Queue Stream output */
@@ -135,7 +131,7 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   /** \relates Queue Clone function for RWCOW_pointer */
-  template<> struct ::_Queue * rwcowClone<struct ::_Queue>( const struct ::_Queue * rhs );
+  template<> sat::detail::CQueue * rwcowClone<sat::detail::CQueue>( const sat::detail::CQueue * rhs );
 
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 08186c6..4419222 100644 (file)
@@ -139,8 +139,8 @@ namespace zypp
         { size_type s = 0; for_( it, self().begin(), self().end() ) ++s; return s;}
 
        /** Whether collection contains a specific \ref Solvable. */
-       template<class _Solv>
-       bool contains( const _Solv & solv_r ) const
+       template<class TSolv>
+       bool contains( const TSolv & solv_r ) const
        {
          Solvable solv( asSolvable()( solv_r ) );
          for_( it, self().begin(), self().end() )
index 175b76d..19447e2 100644 (file)
@@ -99,11 +99,11 @@ namespace zypp
 
     /////////////////////////////////////////////////////////////////
 
-    ::_Solvable * Solvable::get() const
+    detail::CSolvable * Solvable::get() const
     { return myPool().getSolvable( _id ); }
 
 #define NO_SOLVABLE_RETURN( VAL ) \
-    ::_Solvable * _solvable( get() ); \
+    detail::CSolvable * _solvable( get() ); \
     if ( ! _solvable ) return VAL
 
     Solvable Solvable::nextInPool() const
@@ -114,7 +114,7 @@ namespace zypp
       NO_SOLVABLE_RETURN( noSolvable );
       for ( detail::SolvableIdType next = _id+1; next < unsigned(_solvable->repo->end); ++next )
       {
-        ::_Solvable * nextS( myPool().getSolvable( next ) );
+        detail::CSolvable * nextS( myPool().getSolvable( next ) );
         if ( nextS && nextS->repo == _solvable->repo )
         {
           return Solvable( next );
@@ -409,7 +409,7 @@ namespace zypp
     bool Solvable::identical( const Solvable & rhs ) const
     {
       NO_SOLVABLE_RETURN( ! rhs.get() );
-      ::_Solvable * rhssolvable( rhs.get() );
+      detail::CSolvable * rhssolvable( rhs.get() );
       return rhssolvable && ( _solvable == rhssolvable || ::solvable_identical( _solvable, rhssolvable ) );
     }
 
@@ -607,7 +607,7 @@ namespace zypp
     LocaleSet Solvable::getSupportedLocales() const
     {
       LocaleSet ret;
-      invokeOnEachSupportedLocale( supplements(), functor::Collector( std::inserter( ret, ret.begin() ) ) );
+      invokeOnEachSupportedLocale( supplements(), functor::collector( std::inserter( ret, ret.begin() ) ) );
       return ret;
     }
 
index db9f92a..0de43f6 100644 (file)
@@ -90,12 +90,12 @@ namespace zypp
        */
       bool isKind( const ResKind & kind_r ) const;
       /** \overload */
-      template<class _Res>
+      template<class TRes>
       bool isKind() const
-      { return isKind( resKind<_Res>() ); }
+      { return isKind( resKind<TRes>() ); }
       /** \overload Extend the test to a range of \ref ResKind. */
-      template<class _Iterator>
-      bool isKind( _Iterator begin, _Iterator end ) const
+      template<class TIterator>
+      bool isKind( TIterator begin, TIterator end ) const
       { for_( it, begin, end ) if ( isKind( *it ) ) return true; return false; }
 
       /** The name (without any ResKind prefix). */
@@ -369,7 +369,7 @@ namespace zypp
       /** Return next Solvable in \ref Repo (or \ref noSolvable). */
       Solvable nextInRepo() const;
       /** Expert backdoor. */
-      ::_Solvable * get() const;
+      detail::CSolvable * get() const;
       /** Expert backdoor. */
       IdType id() const { return _id; }
 
@@ -400,9 +400,9 @@ namespace zypp
     { return lhs.get() < rhs.get(); }
 
     /** \relates Solvable Test whether a \ref Solvable is of a certain Kind. */
-    template<class _Res>
+    template<class TRes>
     inline bool isKind( const Solvable & solvable_r )
-    { return solvable_r.isKind( ResTraits<_Res>::kind ); }
+    { return solvable_r.isKind( ResTraits<TRes>::kind ); }
 
     /** \relates Solvable Test for same content. */
     inline bool identical( const Solvable & lhs, const Solvable & rhs )
@@ -453,7 +453,7 @@ namespace zypp
       /** */
       class SolvableIterator : public boost::iterator_adaptor<
           SolvableIterator                   // Derived
-          , ::_Solvable*                     // Base
+          , CSolvable*                       // Base
           , const Solvable                   // Value
           , boost::forward_traversal_tag     // CategoryOrTraversal
           , const Solvable                   // Reference
index a981cac..e4a8391 100644 (file)
@@ -49,8 +49,8 @@ namespace zypp
         {}
 
         /** Ctor building a set from a range. */
-        template<class _InputIterator>
-        SolvableSet( _InputIterator begin_r, _InputIterator end_r )
+        template<class TInputIterator>
+        SolvableSet( TInputIterator begin_r, TInputIterator end_r )
         : _pimpl( new Container( begin_r, end_r ) )
         {}
 
@@ -64,8 +64,8 @@ namespace zypp
         { return _pimpl->size(); }
 
        /** */
-       template<class _Solv>
-       bool contains( const _Solv & solv_r ) const
+       template<class TSolv>
+       bool contains( const TSolv & solv_r ) const
        { return( get().count( asSolvable()( solv_r ) ) ); }
 
         /** Iterator pointing to the first \ref Solvable. */
@@ -81,8 +81,8 @@ namespace zypp
        /** Insert a Solvable.
         * \return \c true if it was actually inserted, or \c false if already present.
        */
-       template<class _Solv>
-       bool insert( const _Solv & solv_r )
+       template<class TSolv>
+       bool insert( const TSolv & solv_r )
        { return get().insert( asSolvable()( solv_r ) ).second; }
 
       public:
index a84c76c..64b2c9b 100644 (file)
@@ -62,10 +62,10 @@ namespace zypp
 
       ResKind          kind() const                            { return satSolvable().kind(); }
       bool             isKind( const ResKind & kind_r ) const  { return satSolvable().isKind( kind_r ); }
-      template<class _Res>
-      bool             isKind() const                          { return satSolvable().isKind<_Res>(); }
-      template<class _Iterator>
-      bool isKind( _Iterator begin, _Iterator end ) const      { return satSolvable().isKind( begin, end ); }
+      template<class TRes>
+      bool             isKind() const                          { return satSolvable().isKind<TRes>(); }
+      template<class TIterator>
+      bool isKind( TIterator begin, TIterator end ) const      { return satSolvable().isKind( begin, end ); }
 
       std::string      name() const                            { return satSolvable().name(); }
       Edition          edition() const                         { return satSolvable().edition(); }
@@ -198,9 +198,9 @@ namespace zypp
     { return lhs < rhs.satSolvable(); }
 
     /** \relates SolvableType Test whether the \ref Solvable is of a certain \ref ResKind. */
-    template<class _Res, class Derived>
+    template<class TRes, class Derived>
     inline bool isKind( const SolvableType<Derived> & solvable_r )
-    { return isKind<_Res>( solvable_r.satSolvable() ); }
+    { return isKind<TRes>( solvable_r.satSolvable() ); }
 
     /** \relates SolvableType Test for same content. */
     template <class LDerived, class RDerived>
index fcb843f..a2165f9 100644 (file)
@@ -8,10 +8,6 @@
 \---------------------------------------------------------------------*/
 /** \file      zypp/sat/Transaction.h
  */
-extern "C"
-{
-  struct _Transaction;
-}
 #ifndef ZYPP_SAT_TRANSACTION_H
 #define ZYPP_SAT_TRANSACTION_H
 
index f34efd7..e3f196d 100644 (file)
@@ -59,8 +59,8 @@ namespace zypp
         WhatObsoletes( const ResObject_constPtr item_r );
 
         /** Ctor from a range of \ref Solvable, \ref PoolItem or \ref ResObject::constPtr. */
-        template <class _Iterator>
-        WhatObsoletes( _Iterator begin, _Iterator end )
+        template <class TIterator>
+        WhatObsoletes( TIterator begin, TIterator end )
         : _begin( 0 )
         {
           for_( it, begin, end )
index 04db2e1..80ed3ba 100644 (file)
@@ -106,18 +106,18 @@ namespace zypp
 
       /////////////////////////////////////////////////////////////////
 
-      static void logSat( struct _Pool *, void *data, int type, const char *logString )
+      static void logSat( CPool *, void *data, int type, const char *logString )
       {
          if ( type & (SOLV_FATAL|SOLV_ERROR) ) {
-           _ERR("libsolv") << logString;
+           L_ERR("libsolv") << logString;
          } else if ( type & SOLV_DEBUG_STATS ) {
-           _DBG("libsolv") << logString;
+           L_DBG("libsolv") << logString;
          } else {
-           _MIL("libsolv") << logString;
+           L_MIL("libsolv") << logString;
          }
       }
 
-      detail::IdType PoolImpl::nsCallback( struct _Pool *, void * data, detail::IdType lhs, detail::IdType rhs )
+      detail::IdType PoolImpl::nsCallback( CPool *, void * data, detail::IdType lhs, detail::IdType rhs )
       {
         // lhs:    the namespace identifier, e.g. NAMESPACE:MODALIAS
         // rhs:    the value, e.g. pci:v0000104Cd0000840[01]sv*sd*bc*sc*i*
@@ -296,16 +296,16 @@ namespace zypp
 
       ///////////////////////////////////////////////////////////////////
 
-      ::_Repo * PoolImpl::_createRepo( const std::string & name_r )
+      CRepo * PoolImpl::_createRepo( const std::string & name_r )
       {
         setDirty(__FUNCTION__, name_r.c_str() );
-        ::_Repo * ret = ::repo_create( _pool, name_r.c_str() );
+        CRepo * ret = ::repo_create( _pool, name_r.c_str() );
         if ( ret && name_r == systemRepoAlias() )
           ::pool_set_installed( _pool, ret );
         return ret;
       }
 
-      void PoolImpl::_deleteRepo( ::_Repo * repo_r )
+      void PoolImpl::_deleteRepo( CRepo * repo_r )
       {
         setDirty(__FUNCTION__, repo_r->name );
        if ( isSystemRepo( repo_r ) )
@@ -314,7 +314,7 @@ namespace zypp
         ::repo_free( repo_r, /*reuseids*/false );
       }
 
-      int PoolImpl::_addSolv( ::_Repo * repo_r, FILE * file_r )
+      int PoolImpl::_addSolv( CRepo * repo_r, FILE * file_r )
       {
         setDirty(__FUNCTION__, repo_r->name );
         int ret = ::repo_add_solv( repo_r, file_r, 0 );
@@ -323,7 +323,7 @@ namespace zypp
         return ret;
       }
 
-      int PoolImpl::_addHelix( ::_Repo * repo_r, FILE * file_r )
+      int PoolImpl::_addHelix( CRepo * repo_r, FILE * file_r )
       {
         setDirty(__FUNCTION__, repo_r->name );
         int ret = ::repo_add_helix( repo_r, file_r, 0 );
@@ -332,7 +332,7 @@ namespace zypp
         return 0;
       }
 
-      void PoolImpl::_postRepoAdd( ::_Repo * repo_r )
+      void PoolImpl::_postRepoAdd( CRepo * repo_r )
       {
         if ( ! isSystemRepo( repo_r ) )
         {
@@ -352,7 +352,7 @@ namespace zypp
           unsigned       blockSize  = 0;
           for ( detail::IdType i = repo_r->start; i < repo_r->end; ++i )
           {
-              ::_Solvable * s( _pool->solvables + i );
+              CSolvable * s( _pool->solvables + i );
               if ( s->repo == repo_r && sysids.find( s->arch ) == sysids.end() )
               {
                 // Remember an unwanted arch entry:
@@ -376,7 +376,7 @@ namespace zypp
         }
       }
 
-      detail::SolvableIdType PoolImpl::_addSolvables( ::_Repo * repo_r, unsigned count_r )
+      detail::SolvableIdType PoolImpl::_addSolvables( CRepo * repo_r, unsigned count_r )
       {
         setDirty(__FUNCTION__, repo_r->name );
         return ::repo_add_solvable_block( repo_r, count_r );
@@ -384,7 +384,7 @@ namespace zypp
 
       void PoolImpl::setRepoInfo( RepoIdType id_r, const RepoInfo & info_r )
       {
-        ::_Repo * repo( getRepo( id_r ) );
+        CRepo * repo( getRepo( id_r ) );
         if ( repo )
         {
           bool dirty = false;
index 3a467ee..6d75452 100644 (file)
@@ -58,7 +58,7 @@ namespace zypp
           ~PoolImpl();
 
           /** Pointer style access forwarded to sat-pool. */
-          ::_Pool * operator->()
+          CPool * operator->()
           { return _pool; }
 
         public:
@@ -88,16 +88,16 @@ namespace zypp
           void depSetDirty( const char * a1 = 0, const char * a2 = 0, const char * a3 = 0 );
 
           /** Callback to resolve namespace dependencies (language, modalias, filesystem, etc.). */
-          static detail::IdType nsCallback( ::_Pool *, void * data, detail::IdType lhs, detail::IdType rhs );
+          static detail::IdType nsCallback( CPool *, void * data, detail::IdType lhs, detail::IdType rhs );
 
         public:
           /** Reserved system repository alias \c @System. */
           static const std::string & systemRepoAlias();
 
-          bool isSystemRepo( ::_Repo * repo_r ) const
+          bool isSystemRepo( CRepo * repo_r ) const
           { return repo_r && _pool->installed == repo_r; }
 
-          ::_Repo * systemRepo() const
+          CRepo * systemRepo() const
           { return _pool->installed; }
 
           /** Get rootdir (for file conflicts check) */
@@ -123,53 +123,53 @@ namespace zypp
            */
           //@{
           /** Creating a new repo named \a name_r. */
-          ::_Repo * _createRepo( const std::string & name_r );
+          CRepo * _createRepo( const std::string & name_r );
 
           /** Creating a new repo named \a name_r. */
-          void _deleteRepo( ::_Repo * repo_r );
+          void _deleteRepo( CRepo * repo_r );
 
           /** Adding solv file to a repo.
            * Except for \c isSystemRepo_r, solvables of incompatible architecture
            * are filtered out.
           */
-          int _addSolv( ::_Repo * repo_r, FILE * file_r );
+          int _addSolv( CRepo * repo_r, FILE * file_r );
 
           /** Adding helix file to a repo.
            * Except for \c isSystemRepo_r, solvables of incompatible architecture
            * are filtered out.
           */
-          int _addHelix( ::_Repo * repo_r, FILE * file_r );
+          int _addHelix( CRepo * repo_r, FILE * file_r );
 
           /** Adding Solvables to a repo. */
-          detail::SolvableIdType _addSolvables( ::_Repo * repo_r, unsigned count_r );
+          detail::SolvableIdType _addSolvables( CRepo * repo_r, unsigned count_r );
           //@}
 
           /** Helper postprocessing the repo after adding solv or helix files. */
-          void _postRepoAdd( ::_Repo * repo_r );
+          void _postRepoAdd( CRepo * repo_r );
 
         public:
           /** a \c valid \ref Solvable has a non NULL repo pointer. */
-          bool validSolvable( const ::_Solvable & slv_r ) const
+          bool validSolvable( const CSolvable & slv_r ) const
           { return slv_r.repo; }
           /** \overload Check also for id_r being in range of _pool->solvables. */
           bool validSolvable( SolvableIdType id_r ) const
           { return id_r < unsigned(_pool->nsolvables) && validSolvable( _pool->solvables[id_r] ); }
           /** \overload Check also for slv_r being in range of _pool->solvables. */
-          bool validSolvable( const ::_Solvable * slv_r ) const
+          bool validSolvable( const CSolvable * slv_r ) const
           { return _pool->solvables <= slv_r && slv_r <= _pool->solvables+_pool->nsolvables && validSolvable( *slv_r ); }
 
         public:
-          ::_Pool * getPool() const
+          CPool * getPool() const
           { return _pool; }
 
           /** \todo a quick check whether the repo was meanwhile deleted. */
-          ::_Repo * getRepo( RepoIdType id_r ) const
+          CRepo * getRepo( RepoIdType id_r ) const
           { return id_r; }
 
           /** Return pointer to the sat-solvable or NULL if it is not valid.
            * \see \ref validSolvable.
            */
-          ::_Solvable * getSolvable( SolvableIdType id_r ) const
+          CSolvable * getSolvable( SolvableIdType id_r ) const
           {
             if ( validSolvable( id_r ) )
               return &_pool->solvables[id_r];
@@ -309,7 +309,7 @@ namespace zypp
 
         private:
           /** sat-pool. */
-          ::_Pool * _pool;
+          CPool * _pool;
           /** Serial number. */
           SerialNumber _serial;
           /** Watch serial number. */
index f16aee3..9573098 100644 (file)
 
 extern "C"
 {
-struct _Solvable;
-struct _Repo;
-struct _Pool;
+  // Those _Type names are exposed as sat::detail::CType below!
+  struct _Dataiterator;
+  struct _Datamatcher;
+  struct _Map;
+  struct _Pool;
+  struct _Queue;
+  struct _Repo;
+  struct _Solvable;
+  struct _Solver;
+  struct _Transaction;
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -45,6 +52,21 @@ namespace zypp
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
+    ///////////////////////////////////////////////////////////////////
+    namespace detail
+    {
+      typedef ::_Dataiterator  CDataiterator;  ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Datamatcher   CDatamatcher;   ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Map           CMap;           ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Pool          CPool;          ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Queue         CQueue;         ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Repo          CRepo;          ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Solvable      CSolvable;      ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Solver                CSolver;        ///< Wrapped libsolv C data type exposed as backdoor
+      typedef ::_Transaction   CTransaction;   ///< Wrapped libsolv C data type exposed as backdoor
+    } // namespace detail
+    ///////////////////////////////////////////////////////////////////
+
     class Pool;
     class Solvable;
 
index 77ba113..7a9c350 100644 (file)
@@ -60,7 +60,7 @@ extern "C"
 
 #include "zypp/sat/detail/PoolImpl.h"
 
-#define _XDEBUG(x) do { if (base::logger::isExcessive()) XXX << x << std::endl;} while (0)
+#define XDEBUG(x) do { if (base::logger::isExcessive()) XXX << x << std::endl;} while (0)
 
 /////////////////////////////////////////////////////////////////////////
 namespace zypp
@@ -101,7 +101,7 @@ IMPL_PTR_TYPE(SATResolver);
 // Callbacks for SAT policies
 //---------------------------------------------------------------------------
 
-int vendorCheck( Pool *pool, Solvable *solvable1, Solvable *solvable2 )
+int vendorCheck( sat::detail::CPool *pool, Solvable *solvable1, Solvable *solvable2 )
 {
   return VendorAttr::instance().equivalent( IdString(solvable1->vendor),
                                             IdString(solvable2->vendor) ) ? 0 : 1;
@@ -138,8 +138,8 @@ std::ostream &
 SATResolver::dumpOn( std::ostream & os ) const
 {
     os << "<resolver>" << endl;
-    if (_solv) {
-#define OUTS(X) os << "  " << #X << "\t= " << solver_get_flag(_solv, SOLVER_FLAG_##X) << endl
+    if (_satSolver) {
+#define OUTS(X) os << "  " << #X << "\t= " << solver_get_flag(_satSolver, SOLVER_FLAG_##X) << endl
        OUTS( ALLOW_DOWNGRADE );
        OUTS( ALLOW_ARCHCHANGE );
        OUTS( ALLOW_VENDORCHANGE );
@@ -175,10 +175,10 @@ SATResolver::dumpOn( std::ostream & os ) const
 
 //---------------------------------------------------------------------------
 
-SATResolver::SATResolver (const ResPool & pool, Pool *SATPool)
-    : _pool (pool)
-    , _SATPool (SATPool)
-    , _solv(NULL)
+SATResolver::SATResolver (const ResPool & pool, sat::detail::CPool *satPool)
+    : _pool(pool)
+    , _satPool(satPool)
+    , _satSolver(NULL)
     , _fixsystem(false)
     , _allowdowngrade(false)
     , _allowarchchange(false)
@@ -214,102 +214,6 @@ SATResolver::pool (void) const
     return _pool;
 }
 
-void
-SATResolver::resetItemTransaction (PoolItem item)
-{
-    bool found = false;
-    for (PoolItemList::const_iterator iter = _items_to_remove.begin();
-        iter != _items_to_remove.end(); ++iter) {
-       if (*iter == item) {
-           _items_to_remove.remove(*iter);
-           found = true;
-           break;
-       }
-    }
-    if (!found) {
-       for (PoolItemList::const_iterator iter = _items_to_install.begin();
-            iter != _items_to_install.end(); ++iter) {
-           if (*iter == item) {
-               _items_to_install.remove(*iter);
-               found = true;
-               break;
-           }
-       }
-    }
-    if (!found) {
-       for (PoolItemList::const_iterator iter = _items_to_keep.begin();
-            iter != _items_to_keep.end(); ++iter) {
-           if (*iter == item) {
-               _items_to_keep.remove(*iter);
-               found = true;
-               break;
-           }
-       }
-    }
-    if (!found) {
-       for (PoolItemList::const_iterator iter = _items_to_lock.begin();
-            iter != _items_to_lock.end(); ++iter) {
-           if (*iter == item) {
-               _items_to_lock.remove(*iter);
-               found = true;
-               break;
-           }
-       }
-    }
-}
-
-
-void
-SATResolver::addPoolItemToInstall (PoolItem item)
-{
-    resetItemTransaction (item);
-    _items_to_install.push_back (item);
-    _items_to_install.unique ();
-}
-
-
-void
-SATResolver::addPoolItemsToInstallFromList (PoolItemList & rl)
-{
-    for (PoolItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
-       addPoolItemToInstall (*iter);
-    }
-}
-
-
-void
-SATResolver::addPoolItemToRemove (PoolItem item)
-{
-    resetItemTransaction (item);
-    _items_to_remove.push_back (item);
-    _items_to_remove.unique ();
-}
-
-
-void
-SATResolver::addPoolItemsToRemoveFromList (PoolItemList & rl)
-{
-    for (PoolItemList::const_iterator iter = rl.begin(); iter != rl.end(); iter++) {
-       addPoolItemToRemove (*iter);
-    }
-}
-
-void
-SATResolver::addPoolItemToLock (PoolItem item)
-{
-    resetItemTransaction (item);
-    _items_to_lock.push_back (item);
-    _items_to_lock.unique ();
-}
-
-void
-SATResolver::addPoolItemToKeep (PoolItem item)
-{
-    resetItemTransaction (item);
-    _items_to_keep.push_back (item);
-    _items_to_keep.unique ();
-}
-
 //---------------------------------------------------------------------------
 
 // copy marked item from solution back to pool
@@ -327,15 +231,15 @@ SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::Tra
     // installation/deletion
     if (status.isToBeInstalled()) {
        r = item.status().setToBeInstalled (causer);
-       _XDEBUG("SATSolutionToPool install returns " << item << ", " << r);
+       XDEBUG("SATSolutionToPool install returns " << item << ", " << r);
     }
     else if (status.isToBeUninstalledDueToUpgrade()) {
        r = item.status().setToBeUninstalledDueToUpgrade (causer);
-       _XDEBUG("SATSolutionToPool upgrade returns " << item << ", " <<  r);
+       XDEBUG("SATSolutionToPool upgrade returns " << item << ", " <<  r);
     }
     else if (status.isToBeUninstalled()) {
        r = item.status().setToBeUninstalled (causer);
-       _XDEBUG("SATSolutionToPool remove returns " << item << ", " <<  r);
+       XDEBUG("SATSolutionToPool remove returns " << item << ", " <<  r);
     }
 
     return;
@@ -346,65 +250,71 @@ SATSolutionToPool (PoolItem item, const ResStatus & status, const ResStatus::Tra
 // resolvePool
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-
-//----------------------------------------------------------------------------
-// Helper functions for the ZYPP-Pool
-//----------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------------------------------------
-//  This function loops over the pool and grabs all items
-//  It clears all previous bySolver() states also
-//
-//  Every toBeInstalled is passed to zypp::solver:detail::Resolver.addPoolItemToInstall()
-//  Every toBeUninstalled is passed to zypp::solver:detail::Resolver.addPoolItemToRemove()
-//
-//  Solver results must be written back to the pool.
-//------------------------------------------------------------------------------------------------------------
-
-
+/////////////////////////////////////////////////////////////////////////
+/// \class SATCollectTransact
+/// \brief Commit helper functor distributing PoolItem by status into lists
+///
+/// On the fly it clears all PoolItem bySolver/ByApplLow status.
+/// The lists are cleared in the Ctor, populated by \ref operator().
+/////////////////////////////////////////////////////////////////////////
 struct SATCollectTransact : public resfilter::PoolItemFilterFunctor
 {
-    SATResolver & resolver;
+  SATCollectTransact( PoolItemList & items_to_install_r,
+                     PoolItemList & items_to_remove_r,
+                     PoolItemList & items_to_lock_r,
+                     PoolItemList & items_to_keep_r,
+                     bool solveSrcPackages_r )
+  : _items_to_install( items_to_install_r )
+  , _items_to_remove( items_to_remove_r )
+  , _items_to_lock( items_to_lock_r )
+  , _items_to_keep( items_to_keep_r )
+  , _solveSrcPackages( solveSrcPackages_r )
+  {
+    _items_to_install.clear();
+    _items_to_remove.clear();
+    _items_to_lock.clear();
+    _items_to_keep.clear();
+  }
 
-    SATCollectTransact (SATResolver & r)
-       : resolver (r)
-    { }
+  bool operator()( const PoolItem & item_r )
+  {
+
+    ResStatus & itemStatus( item_r.status() );
+    bool by_solver = ( itemStatus.isBySolver() || itemStatus.isByApplLow() );
 
-    bool operator()( PoolItem item )           // only transacts() items go here
+    if ( by_solver )
     {
-       ResStatus status = item.status();
-       bool by_solver = (status.isBySolver() || status.isByApplLow());
+      // Clear former solver/establish resultd
+      itemStatus.resetTransact( ResStatus::APPL_LOW );
+      return true;     // -> back out here, don't re-queue former results
+    }
 
-       if (by_solver) {
-           item.status().resetTransact( ResStatus::APPL_LOW );// clear any solver/establish transactions
-           return true;                                // back out here, dont re-queue former solver result
-       }
+    if ( !_solveSrcPackages && item_r.isKind<SrcPackage>() )
+    {
+      // Later we may continue on a per source package base.
+      return true; // dont process this source package.
+    }
 
-       if ( item.satSolvable().isKind<SrcPackage>() && ! resolver.solveSrcPackages() )
-       {
-         // Later we may continue on a per source package base.
-         return true; // dont process this source package.
-       }
+    switch ( itemStatus.getTransactValue() )
+    {
+      case ResStatus::TRANSACT:
+       itemStatus.isUninstalled() ?    _items_to_install.push_back( item_r )
+                                  :    _items_to_remove.push_back( item_r );   break;
+      case ResStatus::LOCKED:          _items_to_lock.push_back( item_r );     break;
+      case ResStatus::KEEP_STATE:      _items_to_keep.push_back( item_r );     break;
+    }
+    return true;
+  }
 
-       if (status.isToBeInstalled()) {
-           resolver.addPoolItemToInstall(item);        // -> install!
-       }
-       else if (status.isToBeUninstalled()) {
-           resolver.addPoolItemToRemove(item);         // -> remove !
-       }
-        else if (status.isLocked()
-                && !by_solver) {
-           resolver.addPoolItemToLock (item);
-        }
-        else if (status.isKept()
-                && !by_solver) {
-           resolver.addPoolItemToKeep (item);
-        }
+private:
+  PoolItemList & _items_to_install;
+  PoolItemList & _items_to_remove;
+  PoolItemList & _items_to_lock;
+  PoolItemList & _items_to_keep;
+  bool _solveSrcPackages;
 
-       return true;
-    }
 };
+/////////////////////////////////////////////////////////////////////////
 
 
 //----------------------------------------------------------------------------
@@ -464,8 +374,8 @@ bool
 SATResolver::solving(const CapabilitySet & requires_caps,
                     const CapabilitySet & conflict_caps)
 {
-    _solv = solver_create( _SATPool );
-    ::pool_set_custom_vendorcheck( _SATPool, &vendorCheck );
+    _satSolver = solver_create( _satPool );
+    ::pool_set_custom_vendorcheck( _satPool, &vendorCheck );
     if (_fixsystem) {
        queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
        queue_push( &(_jobQueue), 0 );
@@ -482,20 +392,20 @@ SATResolver::solving(const CapabilitySet & requires_caps,
        queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
        queue_push( &(_jobQueue), 0 );
     }
-    solver_set_flag(_solv, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_VENDORCHANGE, _allowvendorchange);
-    solver_set_flag(_solv, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
-    solver_set_flag(_solv, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
-    solver_set_flag(_solv, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires);
-    solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_DOWNGRADE,    _dup_allowdowngrade );
-    solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_NAMECHANGE,   _dup_allownamechange );
-    solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE,   _dup_allowarchchange );
-    solver_set_flag(_solv, SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE, _dup_allowvendorchange );
+    solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_VENDORCHANGE, _allowvendorchange);
+    solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
+    solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
+    solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires);
+    solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_DOWNGRADE,       _dup_allowdowngrade );
+    solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_NAMECHANGE,      _dup_allownamechange );
+    solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE,      _dup_allowarchchange );
+    solver_set_flag(_satSolver, SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE,    _dup_allowvendorchange );
 #if 1
-#define HACKENV(X,D) solver_set_flag(_solv, X, env::HACKENV( #X, D ) );
+#define HACKENV(X,D) solver_set_flag(_satSolver, X, env::HACKENV( #X, D ) );
     HACKENV( SOLVER_FLAG_DUP_ALLOW_DOWNGRADE,  _dup_allowdowngrade );
     HACKENV( SOLVER_FLAG_DUP_ALLOW_NAMECHANGE, _dup_allownamechange );
     HACKENV( SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE, _dup_allowarchchange );
@@ -507,7 +417,7 @@ SATResolver::solving(const CapabilitySet & requires_caps,
     // Solve !
     MIL << "Starting solving...." << endl;
     MIL << *this;
-    solver_solve( _solv, &(_jobQueue) );
+    solver_solve( _satSolver, &(_jobQueue) );
     MIL << "....Solver end" << endl;
 
     // copying solution back to zypp pool
@@ -518,7 +428,7 @@ SATResolver::solving(const CapabilitySet & requires_caps,
     /*  solvables to be installed */
     Queue decisionq;
     queue_init(&decisionq);
-    solver_get_decisionqueue(_solv, &decisionq);
+    solver_get_decisionqueue(_satSolver, &decisionq);
     for ( int i = 0; i < decisionq.count; ++i )
     {
       sat::Solvable slv( decisionq.elements[i] );
@@ -527,7 +437,7 @@ SATResolver::solving(const CapabilitySet & requires_caps,
 
       PoolItem poolItem( slv );
       SATSolutionToPool (poolItem, ResStatus::toBeInstalled, ResStatus::SOLVER);
-      _result_items_to_install.push_back (poolItem);
+      _result_items_to_install.push_back( poolItem );
     }
     queue_free(&decisionq);
 
@@ -538,7 +448,7 @@ SATResolver::solving(const CapabilitySet & requires_caps,
       bool mustCheckObsoletes = false;
       for_( it, systemRepo.solvablesBegin(), systemRepo.solvablesEnd() )
       {
-       if (solver_get_decisionlevel(_solv, it->id()) > 0)
+       if (solver_get_decisionlevel(_satSolver, it->id()) > 0)
          continue;
 
        // Check if this is an update
@@ -579,9 +489,9 @@ SATResolver::solving(const CapabilitySet & requires_caps,
     queue_init(&suggestions);
     queue_init(&orphaned);
     queue_init(&unneeded);
-    solver_get_recommendations(_solv, &recommendations, &suggestions, 0);
-    solver_get_orphaned(_solv, &orphaned);
-    solver_get_unneeded(_solv, &unneeded, 1);
+    solver_get_recommendations(_satSolver, &recommendations, &suggestions, 0);
+    solver_get_orphaned(_satSolver, &orphaned);
+    solver_get_unneeded(_satSolver, &unneeded, 1);
     /*  solvables which are recommended */
     for ( int i = 0; i < recommendations.count; ++i )
     {
@@ -627,20 +537,20 @@ SATResolver::solving(const CapabilitySet & requires_caps,
     invokeOnEach( _pool.begin(),
                  _pool.end(),
                  functor::functorRef<bool,PoolItem> (collectPseudoInstalled) );
-    solver_trivial_installable(_solv, &solvableQueue, &flags );
+    solver_trivial_installable(_satSolver, &solvableQueue, &flags );
     for (int i = 0; i < solvableQueue.count; i++) {
        PoolItem item = _pool.find (sat::Solvable(solvableQueue.elements[i]));
        item.status().setUndetermined();
 
        if (flags.elements[i] == -1) {
            item.status().setNonRelevant();
-           _XDEBUG("SATSolutionToPool(" << item << " ) nonRelevant !");
+           XDEBUG("SATSolutionToPool(" << item << " ) nonRelevant !");
        } else if (flags.elements[i] == 1) {
            item.status().setSatisfied();
-           _XDEBUG("SATSolutionToPool(" << item << " ) satisfied !");
+           XDEBUG("SATSolutionToPool(" << item << " ) satisfied !");
        } else if (flags.elements[i] == 0) {
            item.status().setBroken();
-           _XDEBUG("SATSolutionToPool(" << item << " ) broken !");
+           XDEBUG("SATSolutionToPool(" << item << " ) broken !");
        }
     }
     queue_free(&(solvableQueue));
@@ -671,7 +581,7 @@ SATResolver::solving(const CapabilitySet & requires_caps,
        }
     }
 
-    if (solver_problem_count(_solv) > 0 )
+    if (solver_problem_count(_satSolver) > 0 )
     {
        ERR << "Solverrun finished with an ERROR" << endl;
        return false;
@@ -684,21 +594,18 @@ SATResolver::solving(const CapabilitySet & requires_caps,
 void
 SATResolver::solverInit(const PoolItemList & weakItems)
 {
-    SATCollectTransact info (*this);
 
     MIL << "SATResolver::solverInit()" << endl;
 
     // remove old stuff
     solverEnd();
-
     queue_init( &_jobQueue );
-    _items_to_install.clear();
-    _items_to_remove.clear();
-    _items_to_lock.clear();
-    _items_to_keep.clear();
 
-    invokeOnEach ( _pool.begin(), _pool.end(),
-                  functor::functorRef<bool,PoolItem>(info) );
+    // clear and rebuild: _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep
+    {
+      SATCollectTransact collector( _items_to_install, _items_to_remove, _items_to_lock, _items_to_keep, solveSrcPackages() );
+      invokeOnEach ( _pool.begin(), _pool.end(), functor::functorRef<bool,PoolItem>( collector ) );
+    }
 
     for (PoolItemList::const_iterator iter = weakItems.begin(); iter != weakItems.end(); iter++) {
        Id id = (*iter)->satSolvable().id();
@@ -731,7 +638,7 @@ SATResolver::solverInit(const PoolItemList & weakItems)
       queue_push( &(_jobQueue), solv.id() );
     }
 
-    ::pool_add_userinstalled_jobs(_SATPool, sat::Pool::instance().autoInstalled(), &(_jobQueue), GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED);
+    ::pool_add_userinstalled_jobs(_satPool, sat::Pool::instance().autoInstalled(), &(_jobQueue), GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED);
 
     if ( _distupgrade )
     {
@@ -770,10 +677,10 @@ void
 SATResolver::solverEnd()
 {
   // cleanup
-  if ( _solv )
+  if ( _satSolver )
   {
-    solver_free(_solv);
-    _solv = NULL;
+    solver_free(_satSolver);
+    _satSolver = NULL;
     queue_free( &(_jobQueue) );
   }
 }
@@ -904,8 +811,8 @@ void SATResolver::doUpdate()
     // set locks for the solver
     setLocks();
 
-    _solv = solver_create( _SATPool );
-    ::pool_set_custom_vendorcheck( _SATPool, &vendorCheck );
+    _satSolver = solver_create( _satPool );
+    ::pool_set_custom_vendorcheck( _satPool, &vendorCheck );
     if (_fixsystem) {
        queue_push( &(_jobQueue), SOLVER_VERIFY|SOLVER_SOLVABLE_ALL);
        queue_push( &(_jobQueue), 0 );
@@ -922,21 +829,21 @@ void SATResolver::doUpdate()
        queue_push( &(_jobQueue), SOLVER_DROP_ORPHANED|SOLVER_SOLVABLE_ALL);
        queue_push( &(_jobQueue), 0 );
     }
-    solver_set_flag(_solv, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
-    solver_set_flag(_solv, SOLVER_FLAG_ALLOW_VENDORCHANGE, _allowvendorchange);
-    solver_set_flag(_solv, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
-    solver_set_flag(_solv, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
-    solver_set_flag(_solv, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ADD_ALREADY_RECOMMENDED, !_ignorealreadyrecommended);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_DOWNGRADE, _allowdowngrade);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_UNINSTALL, _allowuninstall);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_ARCHCHANGE, _allowarchchange);
+    solver_set_flag(_satSolver, SOLVER_FLAG_ALLOW_VENDORCHANGE, _allowvendorchange);
+    solver_set_flag(_satSolver, SOLVER_FLAG_SPLITPROVIDES, _dosplitprovides);
+    solver_set_flag(_satSolver, SOLVER_FLAG_NO_UPDATEPROVIDE, _noupdateprovide);
+    solver_set_flag(_satSolver, SOLVER_FLAG_IGNORE_RECOMMENDED, _onlyRequires);
 
     sat::Pool::instance().prepareForSolving();
 
     // Solve !
     MIL << "Starting solving for update...." << endl;
     MIL << *this;
-    solver_solve( _solv, &(_jobQueue) );
+    solver_solve( _satSolver, &(_jobQueue) );
     MIL << "....Solver end" << endl;
 
     // copying solution back to zypp pool
@@ -945,14 +852,14 @@ void SATResolver::doUpdate()
     /*  solvables to be installed */
     Queue decisionq;
     queue_init(&decisionq);
-    solver_get_decisionqueue(_solv, &decisionq);
+    solver_get_decisionqueue(_satSolver, &decisionq);
     for (int i = 0; i < decisionq.count; i++)
     {
       Id p;
       p = decisionq.elements[i];
       if (p < 0 || !sat::Solvable(p))
        continue;
-      if (sat::Solvable(p).repository().get() == _solv->pool->installed)
+      if (sat::Solvable(p).repository().get() == _satSolver->pool->installed)
        continue;
 
       PoolItem poolItem = _pool.find (sat::Solvable(p));
@@ -965,9 +872,9 @@ void SATResolver::doUpdate()
     queue_free(&decisionq);
 
     /* solvables to be erased */
-    for (int i = _solv->pool->installed->start; i < _solv->pool->installed->start + _solv->pool->installed->nsolvables; i++)
+    for (int i = _satSolver->pool->installed->start; i < _satSolver->pool->installed->start + _satSolver->pool->installed->nsolvables; i++)
     {
-      if (solver_get_decisionlevel(_solv, i) > 0)
+      if (solver_get_decisionlevel(_satSolver, i) > 0)
          continue;
 
       PoolItem poolItem( _pool.find( sat::Solvable(i) ) );
@@ -1051,7 +958,7 @@ sat::Solvable SATResolver::mapSolvable ( const Id & id )
 string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreId)
 {
   string ret;
-  Pool *pool = _solv->pool;
+  sat::detail::CPool *pool = _satSolver->pool;
   Id probr;
   Id dep, source, target;
   sat::Solvable s, s2;
@@ -1060,8 +967,8 @@ string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreI
 
   // FIXME: solver_findallproblemrules to get all rules for this problem
   // (the 'most relevabt' one returned by solver_findproblemrule is embedded
-  probr = solver_findproblemrule(_solv, problem);
-  switch (solver_ruleinfo(_solv, probr, &source, &target, &dep))
+  probr = solver_findproblemrule(_satSolver, problem);
+  switch (solver_ruleinfo(_satSolver, probr, &source, &target, &dep))
   {
       case SOLVER_RULE_DISTUPGRADE:
          s = mapSolvable (source);
@@ -1190,8 +1097,8 @@ ResolverProblemList
 SATResolver::problems ()
 {
     ResolverProblemList resolverProblems;
-    if (_solv && solver_problem_count(_solv)) {
-       Pool *pool = _solv->pool;
+    if (_satSolver && solver_problem_count(_satSolver)) {
+       sat::detail::CPool *pool = _satSolver->pool;
        int pcnt;
        Id p, rp, what;
        Id problem, solution, element;
@@ -1203,7 +1110,7 @@ SATResolver::problems ()
        MIL << "Encountered problems! Here are the solutions:\n" << endl;
        pcnt = 1;
        problem = 0;
-       while ((problem = solver_next_problem(_solv, problem)) != 0) {
+       while ((problem = solver_next_problem(_satSolver, problem)) != 0) {
            MIL << "Problem " <<  pcnt++ << ":" << endl;
            MIL << "====================================" << endl;
            string detail;
@@ -1214,10 +1121,10 @@ SATResolver::problems ()
            ResolverProblem_Ptr resolverProblem = new ResolverProblem (whatString, detail);
 
            solution = 0;
-           while ((solution = solver_next_solution(_solv, problem, solution)) != 0) {
+           while ((solution = solver_next_solution(_satSolver, problem, solution)) != 0) {
                element = 0;
                ProblemSolutionCombi *problemSolution = new ProblemSolutionCombi;
-               while ((element = solver_next_solutionelement(_solv, problem, solution, element, &p, &rp)) != 0) {
+               while ((element = solver_next_solutionelement(_satSolver, problem, solution, element, &p, &rp)) != 0) {
                    if (p == SOLVER_SOLUTION_JOB) {
                        /* job, rp is index into job queue */
                        what = _jobQueue.elements[rp];
@@ -1402,7 +1309,7 @@ SATResolver::problems ()
                            PoolItem itemTo = _pool.find (sd);
                            if (itemFrom && itemTo) {
                                problemSolution->addSingleAction (itemTo, INSTALL);
-                               int illegal = policy_is_illegal(_solv, s.get(), sd.get(), 0);
+                               int illegal = policy_is_illegal(_satSolver, s.get(), sd.get(), 0);
 
                                if ((illegal & POLICY_ILLEGAL_DOWNGRADE) != 0)
                                {
@@ -1548,16 +1455,16 @@ void SATResolver::setSystemRequirements()
 sat::StringQueue SATResolver::autoInstalled() const
 {
   sat::StringQueue ret;
-  if ( _solv )
-    ::solver_get_userinstalled( _solv, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
+  if ( _satSolver )
+    ::solver_get_userinstalled( _satSolver, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
   return ret;
 }
 
 sat::StringQueue SATResolver::userInstalled() const
 {
   sat::StringQueue ret;
-  if ( _solv )
-    ::solver_get_userinstalled( _solv, ret, GET_USERINSTALLED_NAMES );
+  if ( _satSolver )
+    ::solver_get_userinstalled( _satSolver, ret, GET_USERINSTALLED_NAMES );
   return ret;
 }
 
index dc06f76..2eb5715 100644 (file)
@@ -77,9 +77,9 @@ class SATResolver : public base::ReferenceCounted, private base::NonCopyable, pr
 
   private:
     ResPool _pool;
-    Pool *_SATPool;
-    Solver *_solv;
-    Queue _jobQueue;
+    sat::detail::CPool *_satPool;
+    sat::detail::CSolver *_satSolver;
+    sat::detail::CQueue _jobQueue;
 
     // list of problematic items (orphaned)
     PoolItemList _problem_items;
@@ -141,7 +141,7 @@ class SATResolver : public base::ReferenceCounted, private base::NonCopyable, pr
 
   public:
 
-    SATResolver (const ResPool & pool, Pool *SATPool);
+    SATResolver (const ResPool & pool, sat::detail::CPool *satPool);
     virtual ~SATResolver();
 
     // ---------------------------------- I/O
@@ -169,15 +169,6 @@ class SATResolver : public base::ReferenceCounted, private base::NonCopyable, pr
     ResolverProblemList problems ();
     void applySolutions (const ProblemSolutionList &solutions);
 
-    void addPoolItemToInstall (PoolItem item);
-    void addPoolItemsToInstallFromList (PoolItemList & rl);
-
-    void addPoolItemToLock (PoolItem item);
-    void addPoolItemToKeep (PoolItem item);
-
-    void addPoolItemToRemove (PoolItem item);
-    void addPoolItemsToRemoveFromList (PoolItemList & rl);
-
     bool fixsystem () const {return _fixsystem;}
     void setFixsystem ( const bool fixsystem) { _fixsystem = fixsystem;}
 
@@ -221,10 +212,10 @@ class SATResolver : public base::ReferenceCounted, private base::NonCopyable, pr
     void setCleandepsOnRemove( bool state_r )  { _cleandepsOnRemove = state_r; }
 
     PoolItemList problematicUpdateItems( void ) const { return _problem_items; }
+    PoolItemList problematicUpdateItems() { return _problem_items; }
 
     PoolItemList resultItemsToInstall () { return _result_items_to_install; }
     PoolItemList resultItemsToRemove () { return _result_items_to_remove; }
-    PoolItemList problematicUpdateItems() { return _problem_items; }
 
     sat::StringQueue autoInstalled() const;
     sat::StringQueue userInstalled() const;
index e8ec637..97b23df 100644 (file)
 #include "zypp/base/PtrTypes.h"
 #include "zypp/ResPool.h"
 
-extern "C" {
-  struct _Queue;
-}
-
 /////////////////////////////////////////////////////////////////////////
 namespace zypp
 { ///////////////////////////////////////////////////////////////////////
@@ -113,7 +109,7 @@ class SolverQueueItem : public base::ReferenceCounted, private base::NonCopyable
 
 
     virtual SolverQueueItem_Ptr copy (void) const = 0;
-    virtual bool addRule (_Queue & q) =0 ;
+    virtual bool addRule (sat::detail::CQueue & q) =0 ;
     virtual int cmp (SolverQueueItem_constPtr item) const = 0;
     int compare (SolverQueueItem_constPtr item) const { return CMP(_type, item->_type); }
 
index 6ab9e3c..0ae7fbb 100644 (file)
@@ -70,7 +70,7 @@ SolverQueueItemDelete::~SolverQueueItemDelete()
 
 //---------------------------------------------------------------------------
 
-bool SolverQueueItemDelete::addRule (_Queue & q)
+bool SolverQueueItemDelete::addRule (sat::detail::CQueue & q)
 {
 #define MAYBE_CLEANDEPS (pool().resolver().cleandepsOnRemove()?SOLVER_CLEANDEPS:0)
 
index 3770ada..dbb9931 100644 (file)
@@ -67,7 +67,7 @@ class SolverQueueItemDelete : public SolverQueueItem {
 
     // ---------------------------------- methods
     
-    virtual bool addRule (_Queue & q);
+    virtual bool addRule (sat::detail::CQueue & q);
     virtual SolverQueueItem_Ptr copy (void) const;
     virtual int cmp (SolverQueueItem_constPtr item) const;
 };
index 20a5464..37d1194 100644 (file)
@@ -71,7 +71,7 @@ SolverQueueItemInstall::~SolverQueueItemInstall()
 
 //---------------------------------------------------------------------------
 
-bool SolverQueueItemInstall::addRule (_Queue & q)
+bool SolverQueueItemInstall::addRule (sat::detail::CQueue & q)
 {
     ::Id id = IdString(_name).id();
     if (_soft) {
index 9d5df4f..85fac5a 100644 (file)
@@ -66,7 +66,7 @@ class SolverQueueItemInstall : public SolverQueueItem {
 
     // ---------------------------------- methods
 
-    virtual bool addRule (_Queue & q);    
+    virtual bool addRule (sat::detail::CQueue & q);
     virtual SolverQueueItem_Ptr copy (void) const;
     virtual int cmp (SolverQueueItem_constPtr item) const;
 };
index 319c3b6..576476c 100644 (file)
@@ -74,7 +74,7 @@ SolverQueueItemInstallOneOf::~SolverQueueItemInstallOneOf()
 
 //---------------------------------------------------------------------------
 
-bool SolverQueueItemInstallOneOf::addRule (_Queue & q)
+bool SolverQueueItemInstallOneOf::addRule (sat::detail::CQueue & q)
 {
     bool ret = true;
     MIL << "Install one of " << (_soft ? "(soft):" : ":")<< endl;
index bd1f502..74d5b7a 100644 (file)
@@ -68,7 +68,7 @@ class SolverQueueItemInstallOneOf : public SolverQueueItem {
     
     // ---------------------------------- methods
 
-    virtual bool addRule (_Queue & q);    
+    virtual bool addRule (sat::detail::CQueue & q);
     virtual SolverQueueItem_Ptr copy (void) const;
     virtual int cmp (SolverQueueItem_constPtr item) const;
 };
index e0a912e..e4386b6 100644 (file)
@@ -69,7 +69,7 @@ SolverQueueItemLock::~SolverQueueItemLock()
 
 //---------------------------------------------------------------------------
 
-bool SolverQueueItemLock::addRule (_Queue & q)
+bool SolverQueueItemLock::addRule (sat::detail::CQueue & q)
 {
     ::Id id = _item.satSolvable().id();
     if (id == ID_NULL) {
index 55f5104..998cd33 100644 (file)
@@ -66,7 +66,7 @@ class SolverQueueItemLock : public SolverQueueItem {
 
     // ---------------------------------- methods
     
-    virtual bool addRule (_Queue & q);
+    virtual bool addRule (sat::detail::CQueue & q);
     virtual SolverQueueItem_Ptr copy (void) const;
     virtual int cmp (SolverQueueItem_constPtr item) const;
 };
index 483162f..482c766 100644 (file)
@@ -69,7 +69,7 @@ SolverQueueItemUpdate::~SolverQueueItemUpdate()
 
 //---------------------------------------------------------------------------
 
-bool SolverQueueItemUpdate::addRule (_Queue & q)
+bool SolverQueueItemUpdate::addRule (sat::detail::CQueue & q)
 {
     ::Id id = _item.satSolvable().id();
     if (id == ID_NULL) {
index ff00306..c13e313 100644 (file)
@@ -66,7 +66,7 @@ class SolverQueueItemUpdate : public SolverQueueItem {
 
     // ---------------------------------- methods
     
-    virtual bool addRule (_Queue & q);
+    virtual bool addRule (sat::detail::CQueue & q);
     virtual SolverQueueItem_Ptr copy (void) const;
     virtual int cmp (SolverQueueItem_constPtr item) const;
 };
index 2cf6220..d92233e 100644 (file)
@@ -74,8 +74,8 @@ namespace zypp
       /** Download(commit) sequence of solvables to compute read ahead. */
       void setCommitList( std::vector<sat::Solvable> commitList_r );
       /** \overload */
-      template <class _Iterator>
-      void setCommitList( _Iterator begin_r, _Iterator end_r )
+      template <class TIterator>
+      void setCommitList( TIterator begin_r, TIterator end_r )
       { setCommitList( std::vector<sat::Solvable>( begin_r, end_r  ) ); }
 
       /** Provide a package. */
index 8aba984..6801755 100644 (file)
@@ -50,12 +50,12 @@ namespace zypp
       /** libsolv::pool_findfileconflicts callback providing package header. */
       struct FileConflictsCB
       {
-       FileConflictsCB( ::_Pool * pool_r, ProgressData & progress_r )
+       FileConflictsCB( sat::detail::CPool * pool_r, ProgressData & progress_r )
        : _progress( progress_r )
        , _state( ::rpm_state_create( pool_r, ::pool_get_rootdir(pool_r) ), ::rpm_state_free )
        {}
 
-       void * operator()( ::_Pool * pool_r, sat::detail::IdType id_r )
+       void * operator()( sat::detail::CPool * pool_r, sat::detail::IdType id_r )
        {
          void * ret = lookup( id_r );
 
@@ -79,7 +79,7 @@ namespace zypp
        const sat::Queue & noFilelist() const
        { return _noFilelist; }
 
-       static void * invoke( ::_Pool * pool_r, sat::detail::IdType id_r, void * cbdata_r )
+       static void * invoke( sat::detail::CPool * pool_r, sat::detail::IdType id_r, void * cbdata_r )
        { return (*reinterpret_cast<FileConflictsCB*>(cbdata_r))( pool_r, id_r ); }
 
       private:
index fe8889b..76fe7f6 100644 (file)
@@ -51,7 +51,7 @@ extern "C"
 #include "zypp/ZYppFactory.h"
 #include "zypp/ZConfig.h"
 
-using namespace std;
+using std::endl;
 using namespace zypp::filesystem;
 
 #define WARNINGMAILPATH                "/var/log/YaST2/"
@@ -77,11 +77,11 @@ const char* quoteInFilename_m = "\'\"";
 #else
 const char* quoteInFilename_m = " \t\'\"";
 #endif
-inline string rpmQuoteFilename( const Pathname & path_r )
+inline std::string rpmQuoteFilename( const Pathname & path_r )
 {
-  string path( path_r.asString() );
-  for ( string::size_type pos = path.find_first_of( quoteInFilename_m );
-        pos != string::npos;
+  std::string path( path_r.asString() );
+  for ( std::string::size_type pos = path.find_first_of( quoteInFilename_m );
+        pos != std::string::npos;
         pos = path.find_first_of( quoteInFilename_m, pos ) )
   {
     path.insert( pos, "\\" );
@@ -157,7 +157,7 @@ struct KeyRingSignalReceiver : callback::ReceiveReport<KeyRingSignals>
 
 static shared_ptr<KeyRingSignalReceiver> sKeyRingReceiver;
 
-unsigned diffFiles(const string file1, const string file2, string& out, int maxlines)
+unsigned diffFiles(const std::string file1, const std::string file2, std::string& out, int maxlines)
 {
   const char* argv[] =
     {
@@ -172,7 +172,7 @@ unsigned diffFiles(const string file1, const string file2, string& out, int maxl
   //if(!prog)
   //return 2;
 
-  string line;
+  std::string line;
   int count = 0;
   for (line = prog.receiveLine(), count=0;
        !line.empty();
@@ -191,9 +191,9 @@ unsigned diffFiles(const string file1, const string file2, string& out, int maxl
  **
  **
  **    FUNCTION NAME : stringPath
- **    FUNCTION TYPE : inline string
+ **    FUNCTION TYPE : inline std::string
 */
-inline string stringPath( const Pathname & root_r, const Pathname & sub_r )
+inline std::string stringPath( const Pathname & root_r, const Pathname & sub_r )
 {
   return librpmDb::stringPath( root_r, sub_r );
 }
@@ -202,9 +202,9 @@ inline string stringPath( const Pathname & root_r, const Pathname & sub_r )
  **
  **
  **    FUNCTION NAME : operator<<
- **    FUNCTION TYPE : ostream &
+ **    FUNCTION TYPE : std::ostream &
 */
-ostream & operator<<( ostream & str, const RpmDb::DbStateInfoBits & obj )
+std::ostream & operator<<( std::ostream & str, const RpmDb::DbStateInfoBits & obj )
 {
   if ( obj == RpmDb::DbSI_NO_INIT )
   {
@@ -297,9 +297,9 @@ Date RpmDb::timestamp() const
 //
 //
 //     METHOD NAME : RpmDb::dumpOn
-//     METHOD TYPE : ostream &
+//     METHOD TYPE : std::ostream &
 //
-ostream & RpmDb::dumpOn( ostream & str ) const
+std::ostream & RpmDb::dumpOn( std::ostream & str ) const
 {
   str << "RpmDb[";
 
@@ -818,8 +818,8 @@ void RpmDb::doRebuildDatabase(callback::SendReport<RebuildDBReport> & report)
                                                     process?process->getpid():0) )
                       + "Packages" );
 
-  string       line;
-  string       errmsg;
+  std::string       line;
+  std::string       errmsg;
 
   while ( systemReadLine( line ) )
   {
@@ -847,8 +847,7 @@ void RpmDb::doRebuildDatabase(callback::SendReport<RebuildDBReport> & report)
   if ( rpm_status != 0 )
   {
     //TranslatorExplanation after semicolon is error message
-    ZYPP_THROW(RpmSubprocessException(string(_("RPM failed: ") +
-               (errmsg.empty() ? error_message: errmsg))));
+    ZYPP_THROW(RpmSubprocessException(std::string(_("RPM failed: ")) + (errmsg.empty() ? error_message: errmsg) ) );
   }
   else
   {
@@ -984,12 +983,12 @@ void RpmDb::syncTrustedKeys( SyncTrustedKeyBits mode_r )
 
     TmpFile tmpfile( getZYpp()->tmpPath() );
     {
-      ofstream tmpos( tmpfile.path().c_str() );
+      std::ofstream tmpos( tmpfile.path().c_str() );
       for_( it, rpmKeys.begin(), rpmKeys.end() )
       {
        // we export the rpm key into a file
        RpmHeader::constPtr result;
-       getData( string("gpg-pubkey"), *it, result );
+       getData( "gpg-pubkey", *it, result );
        tmpos << result->tag_description() << endl;
       }
     }
@@ -1048,7 +1047,7 @@ void RpmDb::importPubkey( const PublicKey & pubkey_r )
 
   // check if the key is already in the rpm database
   Edition keyEd( pubkey_r.gpgPubkeyVersion(), pubkey_r.gpgPubkeyRelease() );
-  set<Edition> rpmKeys = pubkeyEditions();
+  std::set<Edition> rpmKeys = pubkeyEditions();
   bool hasOldkeys = false;
 
   for_( it, rpmKeys.begin(), rpmKeys.end() )
@@ -1088,7 +1087,7 @@ void RpmDb::importPubkey( const PublicKey & pubkey_r )
     // rpm3 database, if the current database is a temporary one.
     run_rpm( opts, ExternalProgram::Stderr_To_Stdout );
 
-    string line;
+    std::string line;
     while ( systemReadLine( line ) )
     {
       ( str::startsWith( line, "error:" ) ? WAR : DBG ) << line << endl;
@@ -1115,7 +1114,7 @@ void RpmDb::importPubkey( const PublicKey & pubkey_r )
   // rpm3 database, if the current database is a temporary one.
   run_rpm( opts, ExternalProgram::Stderr_To_Stdout );
 
-  string line;
+  std::string line;
   while ( systemReadLine( line ) )
   {
     ( str::startsWith( line, "error:" ) ? WAR : DBG ) << line << endl;
@@ -1146,8 +1145,8 @@ void RpmDb::removePubkey( const PublicKey & pubkey_r )
 
   // check if the key is in the rpm database and just
   // return if it does not.
-  set<Edition> rpm_keys = pubkeyEditions();
-  set<Edition>::const_iterator found_edition = rpm_keys.end();
+  std::set<Edition> rpm_keys = pubkeyEditions();
+  std::set<Edition>::const_iterator found_edition = rpm_keys.end();
   std::string pubkeyVersion( pubkey_r.gpgPubkeyVersion() );
 
   for_( it, rpm_keys.begin(), rpm_keys.end() )
@@ -1166,7 +1165,7 @@ void RpmDb::removePubkey( const PublicKey & pubkey_r )
       return;
   }
 
-  string rpm_name("gpg-pubkey-" + found_edition->asString());
+  std::string rpm_name("gpg-pubkey-" + found_edition->asString());
 
   RpmArgVec opts;
   opts.push_back ( "-e" );
@@ -1177,7 +1176,7 @@ void RpmDb::removePubkey( const PublicKey & pubkey_r )
   // rpm3 database, if the current database is a temporary one.
   run_rpm( opts, ExternalProgram::Stderr_To_Stdout );
 
-  string line;
+  std::string line;
   while ( systemReadLine( line ) )
   {
     if ( line.substr( 0, 6 ) == "error:" )
@@ -1209,23 +1208,23 @@ void RpmDb::removePubkey( const PublicKey & pubkey_r )
 //
 //
 //     METHOD NAME : RpmDb::pubkeys
-//     METHOD TYPE : set<Edition>
+//     METHOD TYPE : std::set<Edition>
 //
-list<PublicKey> RpmDb::pubkeys() const
+std::list<PublicKey> RpmDb::pubkeys() const
 {
-  list<PublicKey> ret;
+  std::list<PublicKey> ret;
 
   librpmDb::db_const_iterator it;
-  for ( it.findByName( string( "gpg-pubkey" ) ); *it; ++it )
+  for ( it.findByName( "gpg-pubkey" ); *it; ++it )
   {
     Edition edition = it->tag_edition();
     if (edition != Edition::noedition)
     {
       // we export the rpm key into a file
       RpmHeader::constPtr result;
-      getData( string("gpg-pubkey"), edition, result );
+      getData( "gpg-pubkey", edition, result );
       TmpFile file(getZYpp()->tmpPath());
-      ofstream os;
+      std::ofstream os;
       try
       {
         os.open(file.path().asString().c_str());
@@ -1239,7 +1238,7 @@ list<PublicKey> RpmDb::pubkeys() const
         PublicKey key(file);
         ret.push_back(key);
       }
-      catch (exception &e)
+      catch ( std::exception & e )
       {
         ERR << "Could not dump key " << edition.asString() << " in tmp file " << file.path() << endl;
         // just ignore the key
@@ -1249,12 +1248,12 @@ list<PublicKey> RpmDb::pubkeys() const
   return ret;
 }
 
-set<Edition> RpmDb::pubkeyEditions() const
+std::set<Edition> RpmDb::pubkeyEditions() const
   {
-    set<Edition> ret;
+    std::set<Edition> ret;
 
     librpmDb::db_const_iterator it;
-    for ( it.findByName( string( "gpg-pubkey" ) ); *it; ++it )
+    for ( it.findByName( "gpg-pubkey" ); *it; ++it )
     {
       Edition edition = it->tag_edition();
       if (edition != Edition::noedition)
@@ -1272,10 +1271,10 @@ set<Edition> RpmDb::pubkeyEditions() const
 //
 //     DESCRIPTION :
 //
-list<FileInfo>
-RpmDb::fileList( const string & name_r, const Edition & edition_r ) const
+std::list<FileInfo>
+RpmDb::fileList( const std::string & name_r, const Edition & edition_r ) const
 {
-  list<FileInfo> result;
+  std::list<FileInfo> result;
 
   librpmDb::db_const_iterator it;
   bool found;
@@ -1302,7 +1301,7 @@ RpmDb::fileList( const string & name_r, const Edition & edition_r ) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasFile( const string & file_r, const string & name_r ) const
+bool RpmDb::hasFile( const std::string & file_r, const std::string & name_r ) const
 {
   librpmDb::db_const_iterator it;
   bool res;
@@ -1324,11 +1323,11 @@ bool RpmDb::hasFile( const string & file_r, const string & name_r ) const
 //
 //
 //     METHOD NAME : RpmDb::whoOwnsFile
-//     METHOD TYPE : string
+//     METHOD TYPE : std::string
 //
 //     DESCRIPTION :
 //
-string RpmDb::whoOwnsFile( const string & file_r) const
+std::string RpmDb::whoOwnsFile( const std::string & file_r) const
 {
   librpmDb::db_const_iterator it;
   if (it.findByFile( file_r ))
@@ -1346,7 +1345,7 @@ string RpmDb::whoOwnsFile( const string & file_r) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasProvides( const string & tag_r ) const
+bool RpmDb::hasProvides( const std::string & tag_r ) const
 {
   librpmDb::db_const_iterator it;
   return it.findByProvides( tag_r );
@@ -1360,7 +1359,7 @@ bool RpmDb::hasProvides( const string & tag_r ) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasRequiredBy( const string & tag_r ) const
+bool RpmDb::hasRequiredBy( const std::string & tag_r ) const
 {
   librpmDb::db_const_iterator it;
   return it.findByRequiredBy( tag_r );
@@ -1374,7 +1373,7 @@ bool RpmDb::hasRequiredBy( const string & tag_r ) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasConflicts( const string & tag_r ) const
+bool RpmDb::hasConflicts( const std::string & tag_r ) const
 {
   librpmDb::db_const_iterator it;
   return it.findByConflicts( tag_r );
@@ -1388,7 +1387,7 @@ bool RpmDb::hasConflicts( const string & tag_r ) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasPackage( const string & name_r ) const
+bool RpmDb::hasPackage( const std::string & name_r ) const
 {
   librpmDb::db_const_iterator it;
   return it.findPackage( name_r );
@@ -1402,7 +1401,7 @@ bool RpmDb::hasPackage( const string & name_r ) const
 //
 //     DESCRIPTION :
 //
-bool RpmDb::hasPackage( const string & name_r, const Edition & ed_r ) const
+bool RpmDb::hasPackage( const std::string & name_r, const Edition & ed_r ) const
 {
   librpmDb::db_const_iterator it;
   return it.findPackage( name_r, ed_r );
@@ -1416,7 +1415,7 @@ bool RpmDb::hasPackage( const string & name_r, const Edition & ed_r ) const
 //
 //     DESCRIPTION :
 //
-void RpmDb::getData( const string & name_r,
+void RpmDb::getData( const std::string & name_r,
                      RpmHeader::constPtr & result_r ) const
 {
   librpmDb::db_const_iterator it;
@@ -1434,7 +1433,7 @@ void RpmDb::getData( const string & name_r,
 //
 //     DESCRIPTION :
 //
-void RpmDb::getData( const string & name_r, const Edition & ed_r,
+void RpmDb::getData( const std::string & name_r, const Edition & ed_r,
                      RpmHeader::constPtr & result_r ) const
 {
   librpmDb::db_const_iterator it;
@@ -1579,7 +1578,7 @@ RpmDb::CheckPackageResult RpmDb::checkPackage( const Pathname & path_r )
 
 // determine changed files of installed package
 bool
-RpmDb::queryChangedFiles(FileList & fileList, const string& packageName)
+RpmDb::queryChangedFiles(FileList & fileList, const std::string& packageName)
 {
   bool ok = true;
 
@@ -1612,7 +1611,7 @@ RpmDb::queryChangedFiles(FileList & fileList, const string& packageName)
    M      Mode (includes permissions and file type)
   */
 
-  string line;
+  std::string line;
   while (systemReadLine(line))
   {
     if (line.length() > 12 &&
@@ -1620,7 +1619,7 @@ RpmDb::queryChangedFiles(FileList & fileList, const string& packageName)
          (line[0] == '.' && line[7] == 'T')))
     {
       // file has been changed
-      string filename;
+      std::string filename;
 
       filename.assign(line, 11, line.length() - 11);
       fileList.insert(filename);
@@ -1691,7 +1690,7 @@ RpmDb::run_rpm (const RpmArgVec& opts,
 /*--------------------------------------------------------------*/
 /* Read a line from the rpm process                            */
 /*--------------------------------------------------------------*/
-bool RpmDb::systemReadLine( string & line )
+bool RpmDb::systemReadLine( std::string & line )
 {
   line.erase();
 
@@ -1740,7 +1739,7 @@ bool RpmDb::systemReadLine( string & line )
          {
            if ( linebuffer[nread-1] == '\n' )
              --nread;
-           line += string( linebuffer, nread );
+           line += std::string( linebuffer, nread );
          }
 
          if ( ! ::ferror( inputfile ) || ::feof( inputfile ) )
@@ -1795,19 +1794,19 @@ RpmDb::systemKill()
 
 
 // generate diff mails for config files
-void RpmDb::processConfigFiles(const string& line, const string& name, const char* typemsg, const char* difffailmsg, const char* diffgenmsg)
+void RpmDb::processConfigFiles(const std::string& line, const std::string& name, const char* typemsg, const char* difffailmsg, const char* diffgenmsg)
 {
-  string msg = line.substr(9);
-  string::size_type pos1 = string::npos;
-  string::size_type pos2 = string::npos;
-  string file1s, file2s;
+  std::string msg = line.substr(9);
+  std::string::size_type pos1 = std::string::npos;
+  std::string::size_type pos2 = std::string::npos;
+  std::string file1s, file2s;
   Pathname file1;
   Pathname file2;
 
   pos1 = msg.find (typemsg);
   for (;;)
   {
-    if ( pos1 == string::npos )
+    if ( pos1 == std::string::npos )
       break;
 
     pos2 = pos1 + strlen (typemsg);
@@ -1827,7 +1826,7 @@ void RpmDb::processConfigFiles(const string& line, const string& name, const cha
       file2 = _root + file2;
     }
 
-    string out;
+    std::string out;
     int ret = diffFiles (file1.asString(), file2.asString(), out, 25);
     if (ret)
     {
@@ -1838,7 +1837,7 @@ void RpmDb::processConfigFiles(const string& line, const string& name, const cha
         break;
       }
       file += Date(Date::now()).form("config_diff_%Y_%m_%d.log");
-      ofstream notify(file.asString().c_str(), ios::out|ios::app);
+      std::ofstream notify(file.asString().c_str(), std::ios::out|std::ios::app);
       if (!notify)
       {
         ERR << "Could not open " <<  file << endl;
@@ -1866,8 +1865,8 @@ void RpmDb::processConfigFiles(const string& line, const string& name, const cha
           {
             out.replace(4, file1.asString().length(), file1s);
           }
-          string::size_type pos = out.find("\n+++ ");
-          if (pos != string::npos)
+          std::string::size_type pos = out.find("\n+++ ");
+          if (pos != std::string::npos)
           {
             out.replace(pos+5, file2.asString().length(), file2s);
           }
@@ -1980,15 +1979,15 @@ void RpmDb::doInstallPackage( const Pathname & filename, RpmInstFlags flags, cal
   opts.push_back("--");
 
   // rpm requires additional quoting of special chars:
-  string quotedFilename( rpmQuoteFilename( workaroundRpmPwdBug( filename ) ) );
+  std::string quotedFilename( rpmQuoteFilename( workaroundRpmPwdBug( filename ) ) );
   opts.push_back ( quotedFilename.c_str() );
 
   modifyDatabase(); // BEFORE run_rpm
   run_rpm( opts, ExternalProgram::Stderr_To_Stdout );
 
-  string line;
-  string rpmmsg;
-  vector<string> configwarnings;
+  std::string line;
+  std::string rpmmsg;
+  std::vector<std::string> configwarnings;
 
   unsigned linecnt = 0;
   while (systemReadLine(line))
@@ -2018,7 +2017,7 @@ void RpmDb::doInstallPackage( const Pathname & filename, RpmInstFlags flags, cal
   int rpm_status = systemStatus();
 
   // evaluate result
-  for (vector<string>::iterator it = configwarnings.begin();
+  for (std::vector<std::string>::iterator it = configwarnings.begin();
        it != configwarnings.end(); ++it)
   {
     processConfigFiles(*it, Pathname::basename(filename), " saved as ",
@@ -2038,19 +2037,18 @@ void RpmDb::doInstallPackage( const Pathname & filename, RpmInstFlags flags, cal
     historylog.comment(
         str::form("%s install failed", Pathname::basename(filename).c_str()),
         true /*timestamp*/);
-    ostringstream sstr;
+    std::ostringstream sstr;
     sstr << "rpm output:" << endl << rpmmsg << endl;
     historylog.comment(sstr.str());
     // TranslatorExplanation the colon is followed by an error message
-    ZYPP_THROW(RpmSubprocessException(string(_("RPM failed: ")) +
-               (rpmmsg.empty() ? error_message : rpmmsg)));
+    ZYPP_THROW(RpmSubprocessException(_("RPM failed: ") + (rpmmsg.empty() ? error_message : rpmmsg) ));
   }
   else if ( ! rpmmsg.empty() )
   {
     historylog.comment(
         str::form("%s installed ok", Pathname::basename(filename).c_str()),
         true /*timestamp*/);
-    ostringstream sstr;
+    std::ostringstream sstr;
     sstr << "Additional rpm output:" << endl << rpmmsg << endl;
     historylog.comment(sstr.str());
 
@@ -2081,7 +2079,7 @@ void RpmDb::removePackage( Package::constPtr package, RpmInstFlags flags )
 //     METHOD NAME : RpmDb::removePackage
 //     METHOD TYPE : PMError
 //
-void RpmDb::removePackage( const string & name_r, RpmInstFlags flags )
+void RpmDb::removePackage( const std::string & name_r, RpmInstFlags flags )
 {
   callback::SendReport<RpmRemoveReport> report;
 
@@ -2112,7 +2110,7 @@ void RpmDb::removePackage( const string & name_r, RpmInstFlags flags )
 }
 
 
-void RpmDb::doRemovePackage( const string & name_r, RpmInstFlags flags, callback::SendReport<RpmRemoveReport> & report )
+void RpmDb::doRemovePackage( const std::string & name_r, RpmInstFlags flags, callback::SendReport<RpmRemoveReport> & report )
 {
   FAILIFNOTINITIALIZED;
   HistoryLog historylog;
@@ -2159,8 +2157,8 @@ void RpmDb::doRemovePackage( const string & name_r, RpmInstFlags flags, callback
   modifyDatabase(); // BEFORE run_rpm
   run_rpm (opts, ExternalProgram::Stderr_To_Stdout);
 
-  string line;
-  string rpmmsg;
+  std::string line;
+  std::string rpmmsg;
 
   // got no progress from command, so we fake it:
   // 5  - command started
@@ -2185,19 +2183,18 @@ void RpmDb::doRemovePackage( const string & name_r, RpmInstFlags flags, callback
   {
     historylog.comment(
         str::form("%s remove failed", name_r.c_str()), true /*timestamp*/);
-    ostringstream sstr;
+    std::ostringstream sstr;
     sstr << "rpm output:" << endl << rpmmsg << endl;
     historylog.comment(sstr.str());
     // TranslatorExplanation the colon is followed by an error message
-    ZYPP_THROW(RpmSubprocessException(string(_("RPM failed: ")) +
-               (rpmmsg.empty() ? error_message: rpmmsg)));
+    ZYPP_THROW(RpmSubprocessException(_("RPM failed: ") + (rpmmsg.empty() ? error_message: rpmmsg) ));
   }
   else if ( ! rpmmsg.empty() )
   {
     historylog.comment(
         str::form("%s removed ok", name_r.c_str()), true /*timestamp*/);
 
-    ostringstream sstr;
+    std::ostringstream sstr;
     sstr << "Additional rpm output:" << endl << rpmmsg << endl;
     historylog.comment(sstr.str());
 
@@ -2228,7 +2225,7 @@ bool RpmDb::backupPackage( const Pathname & filename )
 //     METHOD NAME : RpmDb::backupPackage
 //     METHOD TYPE : bool
 //
-bool RpmDb::backupPackage(const string& packageName)
+bool RpmDb::backupPackage(const std::string& packageName)
 {
   HistoryLog progresslog;
   bool ret = true;
@@ -2286,7 +2283,7 @@ bool RpmDb::backupPackage(const string& packageName)
       return false;
     }
 
-    ofstream fp ( filestobackupfile.asString().c_str(), ios::out|ios::trunc );
+    std::ofstream fp ( filestobackupfile.asString().c_str(), std::ios::out|std::ios::trunc );
 
     if (!fp)
     {
@@ -2297,7 +2294,7 @@ bool RpmDb::backupPackage(const string& packageName)
     for (FileList::const_iterator cit = fileList.begin();
          cit != fileList.end(); ++cit)
     {
-      string name = *cit;
+      std::string name = *cit;
       if ( name[0] == '/' )
       {
         // remove slash, file must be relative to -C parameter of tar
@@ -2325,11 +2322,11 @@ bool RpmDb::backupPackage(const string& packageName)
     // execute tar in inst-sys (we dont know if there is a tar below _root !)
     ExternalProgram tar(argv, ExternalProgram::Stderr_To_Stdout, false, -1, true);
 
-    string tarmsg;
+    std::string tarmsg;
 
     // TODO: its probably possible to start tar with -v and watch it adding
     // files to report progress
-    for (string output = tar.receiveLine(); output.length() ;output = tar.receiveLine())
+    for (std::string output = tar.receiveLine(); output.length() ;output = tar.receiveLine())
     {
       tarmsg+=output;
     }
index 4119326..654d117 100644 (file)
@@ -192,9 +192,9 @@ namespace zypp
        *   Package::constPtr p( mySelectable.installedAsKind<Package>() );
        * \endcode
       */
-      template<class _Res>
-      typename ResTraits<_Res>::constPtrType installedAsKind() const
-      { return asKind<_Res>( candidateObj() ); }
+      template<class TRes>
+      typename ResTraits<TRes>::constPtrType installedAsKind() const
+      { return asKind<TRes>( candidateObj() ); }
 
       /** Return the \ref candidateObj resolvable casted to a specific kind.
        * \code
@@ -202,9 +202,9 @@ namespace zypp
        *   Package::constPtr p( mySelectable.candidateAsKind<Package>() );
        * \endcode
       */
-      template<class _Res>
-      typename ResTraits<_Res>::constPtrType candidateAsKind() const
-      { return asKind<_Res>( candidateObj() ); }
+      template<class TRes>
+      typename ResTraits<TRes>::constPtrType candidateAsKind() const
+      { return asKind<TRes>( candidateObj() ); }
 
       /** Set a candidate (out of available objects).
        * \return The new candidate, or NULL if choice was invalid
index 6e1ae88..5d2a9d6 100644 (file)
@@ -128,8 +128,8 @@ namespace zypp
         typedef bool (StatusBackup::*Action)( const PoolItem &, Causer );
 
         /** Highlevel action on range of items. */
-        template <class _Iter>
-        bool forEach( _Iter begin_r, _Iter end_r, Action action_r, Causer causer_r )
+        template <class TIter>
+        bool forEach( TIter begin_r, TIter end_r, Action action_r, Causer causer_r )
         {
           for_( it, begin_r, end_r )
             if ( ! (this->*action_r)( *it, causer_r ) )
index 4577469..9bdf405 100644 (file)
@@ -56,11 +56,11 @@ namespace zypp
       typedef SelectableTraits::PickList               PickList;
 
     public:
-      template <class _Iterator>
+      template <class TIterator>
       Impl( const ResKind & kind_r,
             const std::string & name_r,
-            _Iterator begin_r,
-            _Iterator end_r )
+            TIterator begin_r,
+            TIterator end_r )
       : _ident( sat::Solvable::SplitIdent( kind_r, name_r ).ident() )
       , _kind( kind_r )
       , _name( name_r )