QueueItemEstablish.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* QueueItemEstablish.h
00003  *
00004  * Copyright (C) 2000-2002 Ximian, Inc.
00005  * Copyright (C) 2005 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_QUEUEITEMESTABLISH_H
00023 #define ZYPP_SOLVER_DETAIL_QUEUEITEMESTABLISH_H
00024 
00025 #include <iosfwd>
00026 #include <list>
00027 #include <string>
00028 
00029 #include "zypp/solver/detail/Types.h"
00030 #include "zypp/solver/detail/QueueItem.h"
00031 #include "zypp/CapSet.h"
00032 
00034 namespace zypp
00035 { 
00036 
00037   namespace solver
00038   { 
00039 
00040     namespace detail
00041     { 
00042 
00044 //
00045 //      CLASS NAME : QueueItemEstablish
00046 
00047 class QueueItemEstablish : public QueueItem {
00048 
00049   private:
00050     PoolItem_Ref _item;
00051     bool _soft;
00052     int _channel_priority;
00053     int _other_penalty;
00054 
00055     bool _explicitly_requested;
00056 
00057   public:
00058 
00059     QueueItemEstablish (const ResPool & pool, PoolItem_Ref item, bool soft = false);
00060     virtual ~QueueItemEstablish();
00061 
00062     // ---------------------------------- I/O
00063 
00064     virtual std::ostream & dumpOn( std::ostream & str ) const;
00065 
00066     friend std::ostream& operator<<(std::ostream & str, const QueueItemEstablish & obj)
00067     { return obj.dumpOn (str); }
00068 
00069     // ---------------------------------- accessors
00070 
00071     PoolItem_Ref item (void) const { return _item; }
00072 
00073     int channelPriority (void) const { return _channel_priority; }
00074     void setChannelPriority (int channel_priority) { _channel_priority = channel_priority; }
00075 
00076     int otherPenalty (void) { return _other_penalty; }
00077     void setOtherPenalty (int other_penalty) { _other_penalty = other_penalty; }
00078 
00079     void setExplicitlyRequested (void) { _explicitly_requested = true; }
00080 
00081     // ---------------------------------- methods
00082 
00083     virtual bool process (ResolverContext_Ptr context, QueueItemList & qil);
00084     virtual QueueItem_Ptr copy (void) const;
00085     virtual int cmp (QueueItem_constPtr item) const;
00086 
00087     virtual bool isRedundant (ResolverContext_Ptr context) const { return false; }
00088     virtual bool isSatisfied (ResolverContext_Ptr context) const;
00089 };
00090 
00092     };// namespace detail
00095   };// namespace solver
00098 };// namespace zypp
00100 
00101 #endif // ZYPP_SOLVER_DETAIL_QUEUEITEMESTABLISH_H

Generated on Thu Jul 6 00:07:23 2006 for zypp by  doxygen 1.4.6