libzypp
10.5.0
|
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* QueueItem.h 00003 * 00004 * Copyright (C) 2008 SUSE Linux Products GmbH 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License, 00008 * version 2, as published by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, but 00011 * WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00018 * 02111-1307, USA. 00019 */ 00020 00021 #ifndef ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H 00022 #define ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H 00023 00024 #include <iosfwd> 00025 #include <string> 00026 00027 #include "zypp/solver/detail/SolverQueueItem.h" 00028 #include "zypp/PoolItem.h" 00029 00031 namespace zypp 00032 { 00033 00034 namespace solver 00035 { 00036 00037 namespace detail 00038 { 00039 00041 // 00042 // CLASS NAME : SolverQueueItemUpdate 00043 00044 class SolverQueueItemUpdate : public SolverQueueItem { 00045 00046 private: 00047 00048 PoolItem _item; // the item to-be-updated 00049 bool _soft; // if triggered by a soft requirement (a recommends) 00050 00051 public: 00052 00053 SolverQueueItemUpdate (const ResPool & pool, const PoolItem & item, bool soft = false); 00054 virtual ~SolverQueueItemUpdate(); 00055 00056 // ---------------------------------- I/O 00057 00058 virtual std::ostream & dumpOn( std::ostream & str ) const; 00059 00060 friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemUpdate & obj) 00061 { return obj.dumpOn (str); } 00062 00063 // ---------------------------------- accessors 00064 00065 bool isSoft (void) const { return _soft; } 00066 00067 // ---------------------------------- methods 00068 00069 virtual bool addRule (_Queue & q); 00070 virtual SolverQueueItem_Ptr copy (void) const; 00071 virtual int cmp (SolverQueueItem_constPtr item) const; 00072 }; 00073 00075 };// namespace detail 00078 };// namespace solver 00081 };// namespace zypp 00083 00084 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMUPDATE_H