libzypp  17.23.8
SolverQueueItemLock.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_QUEUEITEMLOCK_H
22 #define ZYPP_SOLVER_DETAIL_QUEUEITEMLOCK_H
23 
24 #include <iosfwd>
25 #include <string>
26 
28 #include <zypp/PoolItem.h>
29 
31 namespace zypp
32 {
33  namespace solver
35  {
36  namespace detail
38  {
39 
41 //
42 // CLASS NAME : SolverQueueItemLock
43 
45 
46  private:
47 
48  PoolItem _item; // the item to-be-locked
49  bool _soft; // if triggered by a soft requirement (a recommends)
50 
51  public:
52 
53  SolverQueueItemLock (const ResPool & pool, const PoolItem & item, bool soft = false);
54  virtual ~SolverQueueItemLock();
55 
56  // ---------------------------------- I/O
57 
58  virtual std::ostream & dumpOn( std::ostream & str ) const;
59 
60  friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemLock & obj)
61  { return obj.dumpOn (str); }
62 
63  // ---------------------------------- accessors
64 
65  bool isSoft (void) const { return _soft; }
66 
67  // ---------------------------------- methods
68 
69  virtual bool addRule (sat::detail::CQueue & q);
70  virtual SolverQueueItem_Ptr copy (void) const;
71  virtual int cmp (SolverQueueItem_constPtr item) const;
72 };
73 
75  };// namespace detail
78  };// namespace solver
81 };// namespace zypp
83 
84 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMLOCK_H
zypp::solver::detail::SolverQueueItemLock::addRule
virtual bool addRule(sat::detail::CQueue &q)
Definition: SolverQueueItemLock.cc:73
zypp::solver::detail::SolverQueueItemLock::~SolverQueueItemLock
virtual ~SolverQueueItemLock()
Definition: SolverQueueItemLock.cc:67
zypp::PoolItem
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
zypp::solver::detail::SolverQueueItemLock::operator<<
friend std::ostream & operator<<(std::ostream &str, const SolverQueueItemLock &obj)
Definition: SolverQueueItemLock.h:60
zypp::solver::detail::SolverQueueItemLock::_item
PoolItem _item
Definition: SolverQueueItemLock.h:48
SolverQueueItem.h
zypp::solver::detail::SolverQueueItemLock::dumpOn
virtual std::ostream & dumpOn(std::ostream &str) const
Definition: SolverQueueItemLock.cc:48
zypp::solver::detail::SolverQueueItemLock::copy
virtual SolverQueueItem_Ptr copy(void) const
Definition: SolverQueueItemLock.cc:99
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::solver::detail::SolverQueueItemLock::_soft
bool _soft
Definition: SolverQueueItemLock.h:49
SolverQueueItem
zypp::ResPool
Global ResObject pool.
Definition: ResPool.h:60
zypp::sat::detail::CQueue
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:62
PoolItem.h
zypp::solver::detail::SolverQueueItemLock::isSoft
bool isSoft(void) const
Definition: SolverQueueItemLock.h:65
str
String related utilities and Regular expression matching.
zypp::solver::detail::SolverQueueItemLock::SolverQueueItemLock
SolverQueueItemLock(const ResPool &pool, const PoolItem &item, bool soft=false)
Definition: SolverQueueItemLock.cc:58
zypp::solver::detail::SolverQueueItemLock::cmp
virtual int cmp(SolverQueueItem_constPtr item) const
Definition: SolverQueueItemLock.cc:109
zypp::solver::detail::SolverQueueItemLock
Definition: SolverQueueItemLock.h:44