author | herrick |
Tue, 26 Feb 2019 12:08:20 -0500 | |
branch | JDK-8200758-branch |
changeset 57215 | 62db1c695d13 |
parent 57194 | 9d5fccd97421 |
child 57289 | 1a93286f0767 |
permissions | -rw-r--r-- |
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
1 |
/* |
57106
ea870b9ce89a
8216492: Update copyright of all new jpackage fils to 2019
kcr
parents:
57064
diff
changeset
|
2 |
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. |
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
4 |
* |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
10 |
* |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
15 |
* accompanied this code). |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
16 |
* |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
20 |
* |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
23 |
* questions. |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
24 |
*/ |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
25 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
26 |
#include "PropertyFile.h" |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
27 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
28 |
#include "Helpers.h" |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
29 |
#include "FilePath.h" |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
30 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
31 |
#include <string> |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
32 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
33 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
34 |
PropertyFile::PropertyFile(void) : IPropertyContainer() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
35 |
FReadOnly = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
36 |
FModified = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
37 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
38 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
39 |
PropertyFile::PropertyFile(const TString FileName) : IPropertyContainer() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
40 |
FReadOnly = true; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
41 |
FModified = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
42 |
LoadFromFile(FileName); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
43 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
44 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
45 |
PropertyFile::PropertyFile(OrderedMap<TString, TString> Value) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
46 |
FData.Append(Value); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
47 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
48 |
|
57194
9d5fccd97421
8212091: Move jpackage native code under platform specific folders and files
herrick
parents:
57106
diff
changeset
|
49 |
PropertyFile::PropertyFile(PropertyFile &Value) { |
57064
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
50 |
FData = Value.FData; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
51 |
FReadOnly = Value.FReadOnly; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
52 |
FModified = Value.FModified; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
53 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
54 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
55 |
PropertyFile::~PropertyFile(void) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
56 |
FData.Clear(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
57 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
58 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
59 |
void PropertyFile::SetModified(bool Value) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
60 |
FModified = Value; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
61 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
62 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
63 |
bool PropertyFile::IsModified() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
64 |
return FModified; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
65 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
66 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
67 |
bool PropertyFile::GetReadOnly() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
68 |
return FReadOnly; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
69 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
70 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
71 |
void PropertyFile::SetReadOnly(bool Value) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
72 |
FReadOnly = Value; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
73 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
74 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
75 |
bool PropertyFile::LoadFromFile(const TString FileName) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
76 |
bool result = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
77 |
Platform& platform = Platform::GetInstance(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
78 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
79 |
std::list<TString> contents = platform.LoadFromFile(FileName); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
80 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
81 |
if (contents.empty() == false) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
82 |
for (std::list<TString>::const_iterator iterator = contents.begin(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
83 |
iterator != contents.end(); iterator++) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
84 |
TString line = *iterator; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
85 |
TString name; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
86 |
TString value; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
87 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
88 |
if (Helpers::SplitOptionIntoNameValue(line, name, value) == true) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
89 |
FData.Append(name, value); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
90 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
91 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
92 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
93 |
SetModified(false); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
94 |
result = true; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
95 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
96 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
97 |
return result; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
98 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
99 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
100 |
bool PropertyFile::SaveToFile(const TString FileName, bool ownerOnly) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
101 |
bool result = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
102 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
103 |
if (GetReadOnly() == false && IsModified()) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
104 |
std::list<TString> contents; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
105 |
std::vector<TString> keys = FData.GetKeys(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
106 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
107 |
for (size_t index = 0; index < keys.size(); index++) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
108 |
TString name = keys[index]; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
109 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
110 |
try { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
111 |
TString value;// = FData[index]; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
112 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
113 |
if (FData.GetValue(name, value) == true) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
114 |
TString line = name + _T('=') + value; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
115 |
contents.push_back(line); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
116 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
117 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
118 |
catch (std::out_of_range) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
119 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
120 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
121 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
122 |
Platform& platform = Platform::GetInstance(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
123 |
platform.SaveToFile(FileName, contents, ownerOnly); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
124 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
125 |
SetModified(false); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
126 |
result = true; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
127 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
128 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
129 |
return result; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
130 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
131 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
132 |
bool PropertyFile::GetValue(const TString Key, TString& Value) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
133 |
return FData.GetValue(Key, Value); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
134 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
135 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
136 |
bool PropertyFile::SetValue(const TString Key, TString Value) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
137 |
bool result = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
138 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
139 |
if (GetReadOnly() == false) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
140 |
FData.SetValue(Key, Value); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
141 |
SetModified(true); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
142 |
result = true; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
143 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
144 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
145 |
return result; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
146 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
147 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
148 |
bool PropertyFile::RemoveKey(const TString Key) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
149 |
bool result = false; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
150 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
151 |
if (GetReadOnly() == false) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
152 |
result = FData.RemoveByKey(Key); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
153 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
154 |
if (result == true) { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
155 |
SetModified(true); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
156 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
157 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
158 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
159 |
return result; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
160 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
161 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
162 |
size_t PropertyFile::GetCount() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
163 |
return FData.Count(); |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
164 |
} |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
165 |
|
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
166 |
OrderedMap<TString, TString> PropertyFile::GetData() { |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
167 |
return FData; |
a7fdadf67a92
8214899: rename papplauncher and it's library and move src to appropriate places
herrick
parents:
diff
changeset
|
168 |
} |