libzypp
12.16.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
User data as transaction id
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
target
hal
modalias
rpm
CommitPackageCache.cc
CommitPackageCache.h
CommitPackageCacheImpl.cc
CommitPackageCacheImpl.h
CommitPackageCacheReadAhead.cc
CommitPackageCacheReadAhead.h
HardLocksFile.cc
HardLocksFile.h
RequestedLocalesFile.cc
RequestedLocalesFile.h
SoftLocksFile.cc
SoftLocksFile.h
TargetCallbackReceiver.cc
TargetCallbackReceiver.h
TargetException.cc
TargetException.h
TargetImpl.cc
TargetImpl.h
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
RequestedLocalesFile.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_TARGET_REQUESTEDLOCALESFILE_H
13
#define ZYPP_TARGET_REQUESTEDLOCALESFILE_H
14
15
#include <iosfwd>
16
17
#include "
zypp/base/PtrTypes.h
"
18
19
#include "
zypp/Pathname.h
"
20
#include "
zypp/Locale.h
"
21
23
namespace
zypp
24
{
25
26
namespace
target
27
{
28
30
//
31
// CLASS NAME : RequestedLocalesFile
32
//
35
class
RequestedLocalesFile
36
{
37
friend
std::ostream &
operator<<
( std::ostream & str,
const
RequestedLocalesFile
& obj );
38
39
public
:
41
RequestedLocalesFile
(
const
Pathname & file_r )
42
:
_file
( file_r )
43
{}
44
46
const
Pathname &
file
()
const
47
{
return
_file
; }
48
53
const
LocaleSet
&
locales
()
const
54
{
55
if
( !
_localesPtr
)
56
{
57
_localesPtr
.reset(
new
LocaleSet
);
58
LocaleSet
& ls( *
_localesPtr
);
59
load
(
_file
, ls );
60
}
61
return
*
_localesPtr
;
62
}
63
68
void
setLocales
(
const
LocaleSet
& locales_r )
69
{
70
if
( !
_localesPtr
)
71
_localesPtr
.reset(
new
LocaleSet
);
72
73
if
(
differs
( *
_localesPtr
, locales_r ) )
74
{
75
store
(
_file
, locales_r );
76
*
_localesPtr
= locales_r;
77
}
78
}
79
80
private
:
82
bool
differs
(
const
LocaleSet
& lhs,
const
LocaleSet
& rhs )
const
83
{
84
if
( lhs.size() != rhs.size() )
85
return
true
;
86
for_
( it, lhs.begin(), lhs.end() )
87
{
88
if
( rhs.find( *it ) == rhs.end() )
89
return
true
;
90
}
91
return
false
;
92
}
94
static
void
load
(
const
Pathname & file_r,
LocaleSet
& locales_r );
96
static
void
store
(
const
Pathname & file_r,
const
LocaleSet
& locales_r );
97
98
private
:
99
Pathname
_file
;
100
mutable
scoped_ptr<LocaleSet>
_localesPtr
;
101
};
103
105
std::ostream &
operator<<
( std::ostream & str,
const
RequestedLocalesFile
& obj );
106
108
}
// namespace target
111
}
// namespace zypp
113
#endif // ZYPP_TARGET_REQUESTEDLOCALESFILE_H
zypp
target
RequestedLocalesFile.h
Generated by
1.8.2