equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 #include "sisversionrange.h" |
|
26 #include "exception.h" |
|
27 |
|
28 void CSISVersionRange::Verify (const TUint32 aLanguages) const |
|
29 { |
|
30 CStructure <CSISFieldRoot::ESISVersionRange>::Verify (aLanguages); |
|
31 CSISException::ThrowIf (iFromVersion.Specified () && iToVersion.Specified () && (iToVersion < iFromVersion), |
|
32 CSISException::EVerification, |
|
33 "bad version range"); |
|
34 } |
|
35 |
|
36 |
|
37 bool CSISVersionRange::WasteOfSpace () const |
|
38 { |
|
39 return ! (Required () || iFromVersion.Specified () || iToVersion.Specified ()); |
|
40 } |
|
41 |
|
42 std::string CSISVersionRange::Name () const |
|
43 { |
|
44 return "Version Range"; |
|
45 } |
|
46 |
|
47 void CSISVersionRange::AddPackageEntry(std::wostream& aStream, bool aVerbose) const |
|
48 { |
|
49 iFromVersion.AddPackageEntry(aStream, aVerbose); |
|
50 if (iToVersion.Specified()) |
|
51 { |
|
52 aStream << L" ~ "; |
|
53 iToVersion.AddPackageEntry(aStream, aVerbose); |
|
54 } |
|
55 } |
|
56 |
|
57 |