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
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
ResObject.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_RESOBJECT_H
13
#define ZYPP_RESOBJECT_H
14
15
#include "
zypp/APIConfig.h
"
16
17
#include "
zypp/Resolvable.h
"
18
#include "
zypp/Date.h
"
19
#include "
zypp/Locale.h
"
20
#include "
zypp/Vendor.h
"
21
#include "
zypp/ByteCount.h
"
22
#include "
zypp/DiskUsage.h
"
23
#include "
zypp/OnMediaLocation.h
"
24
#include "
zypp/Repository.h
"
25
26
#include "
zypp/sat/LookupAttr.h
"
27
#include "
zypp/sat/SolvableSet.h
"
28
30
namespace
zypp
31
{
32
34
//
35
// CLASS NAME : ResObject
36
//
44
class
ResObject
:
public
Resolvable
45
{
46
public
:
47
typedef
ResObject
Self
;
48
typedef
ResTraits<Self>
TraitsType
;
49
typedef
TraitsType::PtrType
Ptr
;
50
typedef
TraitsType::constPtrType
constPtr
;
51
52
public
:
53
66
template
<
class
_Res>
67
inline
typename
ResTraits<_Res>::constPtrType
asKind
()
const
;
68
69
template
<
class
_Res>
70
inline
typename
ResTraits<_Res>::PtrType
asKind
();
71
72
public
:
78
bool
supportsLocales
()
const
79
{
return
sat::Solvable::supportsLocales
(); }
80
82
bool
supportsLocale
(
const
Locale
& locale_r )
const
83
{
return
sat::Solvable::supportsLocale
( locale_r ); }
84
85
bool
supportsLocale
(
const
LocaleSet
& locales_r )
const
86
{
return
sat::Solvable::supportsLocale
( locales_r ); }
87
89
bool
supportsRequestedLocales
()
const
90
{
return
sat::Solvable::supportsRequestedLocales
(); }
91
93
LocaleSet
getSupportedLocales
()
const
94
{
return
sat::Solvable::getSupportedLocales
(); }
96
97
public
:
102
std::string
summary
(
const
Locale
& lang_r =
Locale
() )
const
;
103
107
std::string
description
(
const
Locale
& lang_r =
Locale
() )
const
;
108
115
std::string
insnotify
(
const
Locale
& lang_r =
Locale
() )
const
;
116
123
std::string
delnotify
(
const
Locale
& lang_r =
Locale
() )
const
;
124
131
std::string
licenseToConfirm
(
const
Locale
& lang_r =
Locale
() )
const
;
132
138
Vendor
vendor
()
const
139
{
return
Resolvable::vendor
().asString(); }
140
144
std::string
distribution
()
const
;
145
152
std::string
cpeId
()
const
;
153
155
ByteCount
installSize
()
const
;
156
158
ByteCount
downloadSize
()
const
;
159
161
Repository
repository
()
const
162
{
return
sat::Solvable::repository
(); }
163
167
RepoInfo
repoInfo
()
const
168
{
return
repository
().
info
(); }
169
174
unsigned
mediaNr
()
const
;
175
179
Date
buildtime
()
const
;
180
185
Date
installtime
()
const
;
186
193
const
DiskUsage
&
diskusage
()
const
;
194
195
protected
:
196
friend
ResObject::Ptr
makeResObject
(
const
sat::Solvable
& solvable_r );
198
ResObject
(
const
sat::Solvable
& solvable_r );
200
virtual
~ResObject
();
202
virtual
std::ostream &
dumpOn
( std::ostream & str )
const
;
203
};
205
222
ResObject::Ptr
makeResObject
(
const
sat::Solvable & solvable_r );
223
237
template
<
class
_Res>
238
inline
typename
ResTraits<_Res>::PtrType
make
(
const
sat::Solvable
& solvable_r )
239
{
return
( isKind<_Res>( solvable_r ) ?
new
_Res( solvable_r ) : 0 ); }
241
template
<>
242
inline
ResObject::Ptr
make<ResObject>
(
const
sat::Solvable
& solvable_r )
243
{
return
makeResObject
( solvable_r ); }
244
246
template
<
class
_Res>
247
inline
typename
ResTraits<_Res>::PtrType
asKind
(
const
sat::Solvable
& solvable_r )
248
{
return
make<_Res>( solvable_r ); }
249
258
template
<
class
_Res>
259
inline
typename
ResTraits<_Res>::PtrType
asKind
(
const
ResObject::Ptr
& p )
260
{
return
dynamic_pointer_cast<_Res>(p); }
261
262
template
<
class
_Res>
263
inline
typename
ResTraits<_Res>::constPtrType
asKind
(
const
ResObject::constPtr
& p )
264
{
return
dynamic_pointer_cast<
const
_Res>(p); }
265
266
template
<
class
_Res>
267
inline
typename
ResTraits<_Res>::constPtrType
ResObject::asKind
()
const
268
{
return
dynamic_cast<
const
_Res *
>
( this ); }
269
270
template
<
class
_Res>
271
inline
typename
ResTraits<_Res>::PtrType
ResObject::asKind
()
272
{
return
dynamic_cast<
_Res *
>
( this ); }
273
275
}
// namespace zypp
277
#endif // ZYPP_RESOBJECT_H
zypp
ResObject.h
Generated by
1.8.1