libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
detail
Helper.cc
Helper.h
InstallOrder.cc
InstallOrder.h
ProblemSolutionCombi.cc
ProblemSolutionCombi.h
ProblemSolutionIgnore.cc
ProblemSolutionIgnore.h
Resolver.cc
Resolver.h
SATResolver.cc
SATResolver.h
SolutionAction.cc
SolutionAction.h
SolverQueueItem.cc
SolverQueueItem.h
SolverQueueItemDelete.cc
SolverQueueItemDelete.h
SolverQueueItemInstall.cc
SolverQueueItemInstall.h
SolverQueueItemInstallOneOf.cc
SolverQueueItemInstallOneOf.h
SolverQueueItemLock.cc
SolverQueueItemLock.h
SolverQueueItemUpdate.cc
SolverQueueItemUpdate.h
SystemCheck.cc
SystemCheck.h
Testcase.cc
Testcase.h
Types.h
libzypp_solver.h
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
SolverQueueItem.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* QueueItem.h
3
*
4
* Copyright (C) 2008 SUSE Linux Products GmbH
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18
* 02111-1307, USA.
19
*/
20
21
#ifndef ZYPP_SOLVER_DETAIL_QUEUEITEM_H
22
#define ZYPP_SOLVER_DETAIL_QUEUEITEM_H
23
24
#include <iosfwd>
25
#include <list>
26
#include <string>
27
28
#include "
zypp/solver/detail/Types.h
"
29
#include "
zypp/base/ReferenceCounted.h
"
30
#include "
zypp/base/NonCopyable.h
"
31
#include "
zypp/base/PtrTypes.h
"
32
#include "
zypp/ResPool.h
"
33
34
extern
"C"
{
35
struct
_Queue;
36
}
37
38
40
namespace
zypp
41
{
42
43
namespace
solver
44
{
45
46
namespace
detail
47
{
48
49
typedef
enum
{
50
QUEUE_ITEM_TYPE_UNKNOWN
= 0,
51
QUEUE_ITEM_TYPE_UPDATE
,
52
QUEUE_ITEM_TYPE_INSTALL
,
53
QUEUE_ITEM_TYPE_DELETE
,
54
QUEUE_ITEM_TYPE_INSTALL_ONE_OF
,
55
QUEUE_ITEM_TYPE_LOCK
56
}
SolverQueueItemType
;
57
58
59
typedef
std::list<SolverQueueItem_Ptr>
SolverQueueItemList
;
60
61
#define CMP(a,b) (((a) < (b)) - ((b) < (a)))
62
64
//
65
// CLASS NAME : SolverQueueItem
66
67
class
SolverQueueItem
:
public
base::ReferenceCounted
,
private
base::NonCopyable
{
68
69
private
:
70
71
SolverQueueItemType
_type
;
72
ResPool
_pool
;
73
74
protected
:
75
76
SolverQueueItem
(
SolverQueueItemType
type,
const
ResPool
&
pool
);
77
78
public
:
79
80
virtual
~SolverQueueItem
();
81
82
// ---------------------------------- I/O
83
84
virtual
std::ostream &
dumpOn
( std::ostream & str )
const
;
85
86
friend
std::ostream&
operator<<
(std::ostream & str,
const
SolverQueueItem
& obj)
87
{
return
obj.
dumpOn
(str); }
88
friend
std::ostream&
operator<<
(std::ostream & str,
const
SolverQueueItemList
& itemlist);
89
90
// ---------------------------------- accessors
91
92
ResPool
pool
(
void
)
const
{
return
_pool
; }
93
94
// ---------------------------------- methods
95
96
void
copy
(
const
SolverQueueItem
*from);
97
98
bool
isDelete
(
void
)
const
{
return
_type
==
QUEUE_ITEM_TYPE_DELETE
; }
99
bool
isInstall
(
void
)
const
{
return
_type
==
QUEUE_ITEM_TYPE_INSTALL
; }
100
bool
isUpdate
(
void
)
const
{
return
_type
==
QUEUE_ITEM_TYPE_UPDATE
; }
101
bool
isLock
(
void
)
const
{
return
_type
==
QUEUE_ITEM_TYPE_LOCK
; }
102
bool
isInstallOneOf
(
void
)
const
{
return
_type
==
QUEUE_ITEM_TYPE_INSTALL_ONE_OF
; }
103
104
105
virtual
SolverQueueItem_Ptr
copy
(
void
)
const
= 0;
106
virtual
bool
addRule
(_Queue & q) =0 ;
107
virtual
int
cmp
(SolverQueueItem_constPtr item)
const
= 0;
108
int
compare
(SolverQueueItem_constPtr item)
const
{
return
CMP
(
_type
, item->_type); }
109
110
};
111
113
};
// namespace detail
116
};
// namespace solver
119
};
// namespace zypp
121
122
#endif // ZYPP_SOLVER_DETAIL_QUEUEITEM_H
zypp
solver
detail
SolverQueueItem.h
Generated by
1.8.1