2 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
5 * Easy-to use interface to the ZYPP dependency resolver
7 * Copyright (C) 2000-2002 Ximian, Inc.
8 * Copyright (C) 2005 SUSE Linux Products GmbH
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License,
12 * version 2, as published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 #include "zypp/base/String.h"
28 #include "zypp/base/Gettext.h"
30 #include "zypp/solver/detail/ProblemSolutionCombi.h"
34 /////////////////////////////////////////////////////////////////////////
36 { ///////////////////////////////////////////////////////////////////////
37 ///////////////////////////////////////////////////////////////////////
39 { /////////////////////////////////////////////////////////////////////
40 /////////////////////////////////////////////////////////////////////
42 { ///////////////////////////////////////////////////////////////////
44 IMPL_PTR_TYPE(ProblemSolutionCombi);
46 //---------------------------------------------------------------------------
48 ProblemSolutionCombi::ProblemSolutionCombi( ResolverProblem_Ptr parent)
49 : ProblemSolution (parent, "", "")
56 void ProblemSolutionCombi::addSingleAction( Capability capability, const TransactionKind action)
58 addAction (new TransactionSolutionAction(capability, action));
62 void ProblemSolutionCombi::addSingleAction( PoolItem item, const TransactionKind action)
64 addAction (new TransactionSolutionAction(item, action));
68 void ProblemSolutionCombi::addSingleAction( SolverQueueItem_Ptr item, const TransactionKind action)
70 addAction (new TransactionSolutionAction(item, action));
74 void ProblemSolutionCombi::addDescription( const std::string description)
76 if ( _description.size() == 0
77 && _details.size() == 0) {
79 _description = description;
81 if ( _description.size() > 0
82 && _details.size() == 0) {
84 _details = _description;
85 _description = _("Following actions will be done:");
89 _details += description;
93 void ProblemSolutionCombi::addFrontDescription( const std::string & description )
95 if ( _description.size() == 0
96 && _details.size() == 0) {
98 _description = description;
100 if ( _description.size() > 0
101 && _details.size() == 0) {
103 _details = _description;
104 _description = _("Following actions will be done:");
107 std::string tmp( _details );
108 _details = description;
114 ///////////////////////////////////////////////////////////////////
115 };// namespace detail
116 /////////////////////////////////////////////////////////////////////
117 /////////////////////////////////////////////////////////////////////
118 };// namespace solver
119 ///////////////////////////////////////////////////////////////////////
120 ///////////////////////////////////////////////////////////////////////
122 /////////////////////////////////////////////////////////////////////////