libzypp  17.23.8
SolverQueueItem.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* SolverQueueItem.cc
3  *
4  * Copyright (C) 2008 SUSE Linux Products GmbH
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  * 02111-1307, USA.
19  */
20 extern "C"
21 {
22 #include <solv/solver.h>
23 }
24 
25 #define ZYPP_USE_RESOLVER_INTERNALS
26 
27 #include <zypp/base/Logger.h>
29 
30 using std::endl;
31 
33 namespace zypp
34 {
35  namespace solver
37  {
38  namespace detail
40  {
41 
42 
44 
45 //---------------------------------------------------------------------------
46 
47 std::ostream &
48 SolverQueueItem::dumpOn( std::ostream & os ) const
49 {
50  switch (_type) {
51  case QUEUE_ITEM_TYPE_UNKNOWN : os << "unknown"; break;
52  case QUEUE_ITEM_TYPE_UPDATE : os << "update"; break;
53  case QUEUE_ITEM_TYPE_LOCK : os << "lock"; break;
54  case QUEUE_ITEM_TYPE_INSTALL : os << "install"; break;
55  case QUEUE_ITEM_TYPE_DELETE : os << "delete"; break;
56  case QUEUE_ITEM_TYPE_INSTALL_ONE_OF: os << "install one of"; break;
57  default: os << "?solverqueueitem?"; break;
58  }
59  return os;
60 }
61 
62 
63 std::ostream&
64 operator<<( std::ostream & os, const SolverQueueItemList & itemlist )
65 {
66  for (SolverQueueItemList::const_iterator iter = itemlist.begin(); iter != itemlist.end(); ++iter) {
67  if (iter != itemlist.begin())
68  os << "," << endl << "\t";
69  os << **iter;
70  }
71  return os;
72 }
73 
74 //---------------------------------------------------------------------------
75 
76 SolverQueueItem::SolverQueueItem (SolverQueueItemType type, const ResPool & pool)
77  : _type (type)
78  , _pool (pool)
79 {
80 }
81 
82 
83 SolverQueueItem::~SolverQueueItem()
84 {
85 }
86 
87 //---------------------------------------------------------------------------
88 
89 void
91 {
92 }
93 
94 
95 //---------------------------------------------------------------------------
96 
97 
99  };// namespace detail
102  };// namespace solver
105 };// namespace zypp
std::dumpOn
std::ostream & dumpOn(std::ostream &str, const zypp::shared_ptr< void > &obj)
Definition: PtrTypes.h:151
zypp::solver::detail::IMPL_PTR_TYPE
IMPL_PTR_TYPE(SATResolver)
SolverQueueItem.h
zypp::solver::detail::SolverQueueItemList
std::list< SolverQueueItem_Ptr > SolverQueueItemList
Definition: Types.h:45
Logger.h
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::solver::detail::operator<<
std::ostream & operator<<(std::ostream &os, const SolutionActionList &actionlist)
Definition: SolutionAction.cc:81
SolverQueueItem
zypp::ResPool
Global ResObject pool.
Definition: ResPool.h:60
zypp::iostr::copy
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
Definition: IOStream.h:50