libzypp  17.23.8
SolverQueueItemDelete.h
Go to the documentation of this file.
1 
2 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 /* QueueItem.h
4  *
5  * Copyright (C) 2008 SUSE Linux Products GmbH
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License,
9  * version 2, as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19  * 02111-1307, USA.
20  */
21 
22 #ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMDELETE_H
23 #define ZYPP_SOLVER_DETAIL_QUEUEITEMDELETE_H
24 
25 #include <iosfwd>
26 #include <string>
27 
29 
31 namespace zypp
32 {
33  namespace solver
35  {
36  namespace detail
38  {
39 
40 
42 //
43 // CLASS NAME : SolverQueueItemDelete
44 
46 
47  private:
48 
49  std::string _name;
50  bool _soft; // if triggered by a soft requirement (a recommends)
51 
52  public:
53 
54  SolverQueueItemDelete (const ResPool & pool, std::string name, bool soft = false);
55  virtual ~SolverQueueItemDelete();
56 
57  // ---------------------------------- I/O
58 
59  virtual std::ostream & dumpOn( std::ostream & str ) const;
60 
61  friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemDelete & obj)
62  { return obj.dumpOn (str); }
63 
64  // ---------------------------------- accessors
65 
66  bool isSoft (void) const { return _soft; }
67 
68  // ---------------------------------- methods
69 
70  virtual bool addRule (sat::detail::CQueue & q);
71  virtual SolverQueueItem_Ptr copy (void) const;
72  virtual int cmp (SolverQueueItem_constPtr item) const;
73 };
74 
76  };// namespace detail
79  };// namespace solver
82 };// namespace zypp
84 
85 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMDELETE_H
zypp::solver::detail::SolverQueueItemDelete::_soft
bool _soft
Definition: SolverQueueItemDelete.h:50
SolverQueueItem.h
zypp::solver::detail::SolverQueueItemDelete::addRule
virtual bool addRule(sat::detail::CQueue &q)
Definition: SolverQueueItemDelete.cc:74
zypp::solver::detail::SolverQueueItemDelete::cmp
virtual int cmp(SolverQueueItem_constPtr item) const
Definition: SolverQueueItemDelete.cc:102
zypp::solver::detail::SolverQueueItemDelete::SolverQueueItemDelete
SolverQueueItemDelete(const ResPool &pool, std::string name, bool soft=false)
Definition: SolverQueueItemDelete.cc:60
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::solver::detail::SolverQueueItemDelete::~SolverQueueItemDelete
virtual ~SolverQueueItemDelete()
Definition: SolverQueueItemDelete.cc:68
SolverQueueItem
zypp::ResPool
Global ResObject pool.
Definition: ResPool.h:60
zypp::solver::detail::SolverQueueItemDelete
Definition: SolverQueueItemDelete.h:45
zypp::solver::detail::SolverQueueItemDelete::copy
virtual SolverQueueItem_Ptr copy(void) const
Definition: SolverQueueItemDelete.cc:92
zypp::sat::detail::CQueue
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:62
zypp::solver::detail::SolverQueueItemDelete::isSoft
bool isSoft(void) const
Definition: SolverQueueItemDelete.h:66
zypp::solver::detail::SolverQueueItemDelete::operator<<
friend std::ostream & operator<<(std::ostream &str, const SolverQueueItemDelete &obj)
Definition: SolverQueueItemDelete.h:61
str
String related utilities and Regular expression matching.
zypp::solver::detail::SolverQueueItemDelete::dumpOn
virtual std::ostream & dumpOn(std::ostream &str) const
Definition: SolverQueueItemDelete.cc:50
zypp::solver::detail::SolverQueueItemDelete::_name
std::string _name
Definition: SolverQueueItemDelete.h:49