libzypp 8.13.6
|
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* SolverQueueItem.cc 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 extern "C" 00021 { 00022 #include <satsolver/solver.h> 00023 } 00024 00025 #include "zypp/base/Logger.h" 00026 #include "zypp/solver/detail/SolverQueueItem.h" 00027 00029 namespace zypp 00030 { 00031 00032 namespace solver 00033 { 00034 00035 namespace detail 00036 { 00037 00038 using namespace std; 00039 00040 IMPL_PTR_TYPE(SolverQueueItem); 00041 00042 //--------------------------------------------------------------------------- 00043 00044 std::ostream & 00045 SolverQueueItem::dumpOn( std::ostream & os ) const 00046 { 00047 switch (_type) { 00048 case QUEUE_ITEM_TYPE_UNKNOWN : os << "unknown"; break; 00049 case QUEUE_ITEM_TYPE_UPDATE : os << "update"; break; 00050 case QUEUE_ITEM_TYPE_LOCK : os << "lock"; break; 00051 case QUEUE_ITEM_TYPE_INSTALL : os << "install"; break; 00052 case QUEUE_ITEM_TYPE_DELETE : os << "delete"; break; 00053 case QUEUE_ITEM_TYPE_INSTALL_ONE_OF: os << "install one of"; break; 00054 default: os << "?solverqueueitem?"; break; 00055 } 00056 return os; 00057 } 00058 00059 00060 ostream& 00061 operator<<( ostream & os, const SolverQueueItemList & itemlist ) 00062 { 00063 for (SolverQueueItemList::const_iterator iter = itemlist.begin(); iter != itemlist.end(); ++iter) { 00064 if (iter != itemlist.begin()) 00065 os << "," << endl << "\t"; 00066 os << **iter; 00067 } 00068 return os; 00069 } 00070 00071 //--------------------------------------------------------------------------- 00072 00073 SolverQueueItem::SolverQueueItem (SolverQueueItemType type, const ResPool & pool) 00074 : _type (type) 00075 , _pool (pool) 00076 { 00077 } 00078 00079 00080 SolverQueueItem::~SolverQueueItem() 00081 { 00082 } 00083 00084 //--------------------------------------------------------------------------- 00085 00086 void 00087 SolverQueueItem::copy (const SolverQueueItem *from) 00088 { 00089 } 00090 00091 00092 //--------------------------------------------------------------------------- 00093 00094 00096 };// namespace detail 00099 };// namespace solver 00102 };// namespace zypp