00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ 00002 /* ResolverInfoNeededBy.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_RESOLVERINFONEEDEDBY_H 00023 #define ZYPP_SOLVER_DETAIL_RESOLVERINFONEEDEDBY_H 00024 00025 #include "zypp/solver/detail/Types.h" 00026 #include "zypp/solver/detail/ResolverInfoContainer.h" 00027 00029 namespace zypp 00030 { 00031 00032 namespace solver 00033 { 00034 00035 namespace detail 00036 { 00037 00039 // 00040 // CLASS NAME : ResolverInfoNeededBy 00041 00042 class ResolverInfoNeededBy : public ResolverInfoContainer { 00043 00044 00045 00046 private: 00047 Capability _cap; 00048 Dep _capKind; 00049 bool _initialInstallation; 00050 00051 public: 00052 00053 ResolverInfoNeededBy (PoolItem_Ref item); 00054 virtual ~ResolverInfoNeededBy(); 00055 00056 // ---------------------------------- I/O 00057 00058 virtual std::ostream & dumpOn( std::ostream & str ) const; 00059 friend std::ostream& operator<<(std::ostream & str, const ResolverInfoNeededBy & obj) 00060 { return obj.dumpOn (str); } 00061 00062 // ---------------------------------- accessors 00063 00064 // ---------------------------------- methods 00065 00066 virtual std::string message (void) const; 00067 virtual ResolverInfo_Ptr copy (void) const; 00068 void setCapability (const Capability & cap, const Dep & capKind) { _cap = cap; _capKind = capKind; } 00069 void setInitialInstallation (const bool initial) { _initialInstallation = initial; } 00070 Dep capKind() const {return _capKind;} 00071 Capability capability() const {return _cap;}; 00072 bool initialInstallation() const {return _initialInstallation;}; 00073 }; 00074 00076 };// namespace detail 00079 };// namespace solver 00082 };// namespace zypp 00084 #endif // ZYPP_SOLVER_DETAIL_RESOLVERINFONEEDEDBY_H 00085
1.5.3