- fix compilation
[platform/upstream/libzypp.git] / zypp / solver / detail / SolverQueueItemDelete.h
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
28 #include "zypp/solver/detail/SolverQueueItem.h"
29
30 /////////////////////////////////////////////////////////////////////////
31 namespace zypp
32 { ///////////////////////////////////////////////////////////////////////
33   ///////////////////////////////////////////////////////////////////////
34   namespace solver
35   { /////////////////////////////////////////////////////////////////////
36     /////////////////////////////////////////////////////////////////////
37     namespace detail
38     { ///////////////////////////////////////////////////////////////////
39
40 DEFINE_PTR_TYPE(SolverQueueItemDelete);
41         
42
43 ///////////////////////////////////////////////////////////////////
44 //
45 //      CLASS NAME : SolverQueueItemDelete
46
47 class SolverQueueItemDelete : public SolverQueueItem {
48     
49   private:
50
51     std::string _name;
52     bool _soft;          // if triggered by a soft requirement (a recommends)
53
54   public:
55
56     SolverQueueItemDelete (const ResPool & pool, std::string name, bool soft = false);
57     virtual ~SolverQueueItemDelete();
58     
59     // ---------------------------------- I/O
60
61     virtual std::ostream & dumpOn( std::ostream & str ) const;
62
63     friend std::ostream& operator<<(std::ostream & str, const SolverQueueItemDelete & obj)
64     { return obj.dumpOn (str); }
65
66     // ---------------------------------- accessors
67
68     bool isSoft (void) const { return _soft; }    
69
70     // ---------------------------------- methods
71
72     virtual SolverQueueItem_Ptr copy (void) const;
73     //virtual int cmp (SolverQueueItem_constPtr item) const;
74 };
75
76 ///////////////////////////////////////////////////////////////////
77     };// namespace detail
78     /////////////////////////////////////////////////////////////////////
79     /////////////////////////////////////////////////////////////////////
80   };// namespace solver
81   ///////////////////////////////////////////////////////////////////////
82   ///////////////////////////////////////////////////////////////////////
83 };// namespace zypp
84 /////////////////////////////////////////////////////////////////////////
85
86 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMDELETE_H