1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
4 * Copyright (C) 2008 SUSE Linux Products GmbH
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.
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.
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
21 #ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H
22 #define ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H
27 #include "zypp/sat/SolverQueueItem.h"
28 #include "zypp/PoolItem.h"
30 /////////////////////////////////////////////////////////////////////////
32 { ///////////////////////////////////////////////////////////////////////
33 ///////////////////////////////////////////////////////////////////////
35 { /////////////////////////////////////////////////////////////////////
36 /////////////////////////////////////////////////////////////////////
38 { ///////////////////////////////////////////////////////////////////
40 DEFINE_PTR_TYPE(SolverQueueItemUpdate);
43 ///////////////////////////////////////////////////////////////////
45 // CLASS NAME : SolverQueueItemUpdate
47 class SolverQueueItemUpdate : public SolverQueueItem {
51 PoolItem _item; // the item to-be-updated
52 bool _soft; // if triggered by a soft requirement (a recommends)
56 SolverQueueItemUpdate (const ResPool & pool, const PoolItem & item, bool soft = false);
57 virtual ~SolverQueueItemUpdate();
59 // ---------------------------------- I/O
61 virtual std::ostream & dumpOn( std::ostream & str ) const;
63 friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemUpdate & obj)
64 { return obj.dumpOn (str); }
66 // ---------------------------------- accessors
68 bool isSoft (void) const { return _soft; }
70 // ---------------------------------- methods
72 virtual SolverQueueItem_Ptr copy (void) const;
73 virtual int cmp (SolverQueueItem_constPtr item) const;
76 ///////////////////////////////////////////////////////////////////
78 /////////////////////////////////////////////////////////////////////
79 /////////////////////////////////////////////////////////////////////
81 ///////////////////////////////////////////////////////////////////////
82 ///////////////////////////////////////////////////////////////////////
84 /////////////////////////////////////////////////////////////////////////
86 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H