libzypp: zypp/solver/detail/SolverQueueItemInstallOneOf.h Source File

libzypp 17.38.15

SolverQueueItemInstallOneOf.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* QueueItem.h
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
21#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALLONEOF_H
22#define ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALLONEOF_H
23
24#include <iosfwd>
25#include <string>
26
27#include <zypp/solver/detail/SolverQueueItem.h>
28
30namespace zypp
31{
33 namespace solver
34 {
36 namespace detail
37 {
38
40//
41// CLASS NAME : SolverQueueItemInstallOneOf
42
43 class ZYPP_API_DEPTESTOMATIC SolverQueueItemInstallOneOf : public SolverQueueItem {
44
45 public:
46 typedef std::list<PoolItem> PoolItemList;
47
48 private:
49
50 PoolItemList _oneOfList; // List of candidates
51 bool _soft; // if triggered by a soft requirement (a recommends)
52
53 public:
54
55 SolverQueueItemInstallOneOf (const ResPool & pool, PoolItemList itemList, bool soft = false);
56 virtual ~SolverQueueItemInstallOneOf();
57
58 // ---------------------------------- I/O
59
60 virtual std::ostream & dumpOn( std::ostream & str ) const;
61
62 friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemInstallOneOf & obj)
63 { return obj.dumpOn (str); }
64
65 // ---------------------------------- accessors
66
67 bool isSoft (void) const { return _soft; }
68
69 // ---------------------------------- methods
70
71 virtual bool addRule (sat::detail::CQueue & q);
72 virtual SolverQueueItem_Ptr copy (void) const;
73 virtual int cmp (SolverQueueItem_constPtr item) const;
74};
75
77 };// namespace detail
80 };// namespace solver
83};// namespace zypp
85
86#endif // ZYPP_SOLVER_DETAIL_QUEUEITEMINSTALLONEOF_H
ZYPP_API_DEPTESTOMATIC
#define ZYPP_API_DEPTESTOMATIC
Definition Globals.h:82
SolverQueueItem.h
SolverQueueItem
zypp::ResPool
Global ResObject pool.
Definition ResPool.h:62
zypp::solver::detail::SolverQueueItemInstallOneOf::_soft
bool _soft
Definition SolverQueueItemInstallOneOf.h:51
zypp::solver::detail::SolverQueueItemInstallOneOf::PoolItemList
std::list< PoolItem > PoolItemList
Definition SolverQueueItemInstallOneOf.h:46
zypp::solver::detail::SolverQueueItemInstallOneOf::operator<<
friend std::ostream & operator<<(std::ostream &str, const SolverQueueItemInstallOneOf &obj)
Definition SolverQueueItemInstallOneOf.h:62
zypp::solver::detail::SolverQueueItemInstallOneOf::SolverQueueItemInstallOneOf
SolverQueueItemInstallOneOf(const ResPool &pool, PoolItemList itemList, bool soft=false)
Definition SolverQueueItemInstallOneOf.cc:65
zypp::solver::detail::SolverQueueItemInstallOneOf::isSoft
bool isSoft(void) const
Definition SolverQueueItemInstallOneOf.h:67
zypp::solver::detail::SolverQueueItemInstallOneOf::dumpOn
virtual std::ostream & dumpOn(std::ostream &str) const
Definition SolverQueueItemInstallOneOf.cc:51
zypp::solver::detail::SolverQueueItemInstallOneOf::_oneOfList
PoolItemList _oneOfList
Definition SolverQueueItemInstallOneOf.h:50
str
String related utilities and Regular expression matching.
zypp::pool
Definition ByIdent.h:24
zypp::sat::detail::CQueue
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Definition PoolDefines.h:37
zypp::solver::detail
Definition PoolImpl.h:110
zypp::solver
Definition PoolImpl.h:109
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2