libzypp: zypp/solver/detail/SolverQueueItem.cc Source File

libzypp 17.38.14

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 */
20extern "C"
21{
22#include <solv/solver.h>
23}
24
25#define ZYPP_USE_RESOLVER_INTERNALS
26
27#include <zypp-core/base/Logger.h>
28#include <zypp/solver/detail/SolverQueueItem.h>
29
30#include <utility>
31
32using std::endl;
33
35namespace zypp
36{
38 namespace solver
39 {
41 namespace detail
42 {
43
44
45 IMPL_PTR_TYPE(SolverQueueItem);
46
47//---------------------------------------------------------------------------
48
49std::ostream &
50SolverQueueItem::dumpOn( std::ostream & os ) const
51{
52 switch (_type) {
53 case QUEUE_ITEM_TYPE_UNKNOWN : os << "unknown"; break;
54 case QUEUE_ITEM_TYPE_UPDATE : os << "update"; break;
55 case QUEUE_ITEM_TYPE_LOCK : os << "lock"; break;
56 case QUEUE_ITEM_TYPE_INSTALL : os << "install"; break;
57 case QUEUE_ITEM_TYPE_DELETE : os << "delete"; break;
58 case QUEUE_ITEM_TYPE_INSTALL_ONE_OF: os << "install one of"; break;
59 default: os << "?solverqueueitem?"; break;
60 }
61 return os;
62}
63
64
65std::ostream&
66 operator<<( std::ostream & os, const SolverQueueItemList & itemlist )
67{
68 for (SolverQueueItemList::const_iterator iter = itemlist.begin(); iter != itemlist.end(); ++iter) {
69 if (iter != itemlist.begin())
70 os << "," << endl << "\t";
71 os << **iter;
72 }
73 return os;
74}
75
76//---------------------------------------------------------------------------
77
78SolverQueueItem::SolverQueueItem (SolverQueueItemType type, ResPool pool)
79 : _type (type)
80 , _pool (std::move(pool))
81{
82}
83
84
85SolverQueueItem::~SolverQueueItem()
86{
87}
88
89//---------------------------------------------------------------------------
90
91void
92SolverQueueItem::copy (const SolverQueueItem *from)
93{
94}
95
96
97//---------------------------------------------------------------------------
98
99
101 };// namespace detail
104 };// namespace solver
107};// namespace zypp
Logger.h
SolverQueueItem.h
SolverQueueItem
zypp::ResPool
Global ResObject pool.
Definition ResPool.h:62
std
Definition ansi.h:855
zypp::pool
Definition ByIdent.h:24
zypp::solver::detail::SolverQueueItemList
std::list< SolverQueueItem_Ptr > SolverQueueItemList
Definition Types.h:45
zypp::solver::detail::operator<<
std::ostream & operator<<(std::ostream &str, const SolutionActionList &actionlist)
Definition SolutionAction.cc:58
zypp::solver::detail::IMPL_PTR_TYPE
IMPL_PTR_TYPE(SATResolver)
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2