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