1 martin 1.25 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.26 //
|
3 martin 1.25 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.26 //
|
10 martin 1.25 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.26 //
|
17 martin 1.25 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.26 //
|
20 martin 1.25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.26 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.26 //
|
28 martin 1.25 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #include "OperationContextInternal.h"
33
|
34 kumpf 1.22 #if defined(PEGASUS_PLATFORM_LINUX_GENERIC_GNU) || \
35 defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU) || \
36 defined(PEGASUS_PLATFORM_DARWIN_IX86_GNU)
37 # define PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
38 #endif
39
|
40 kumpf 1.1 PEGASUS_NAMESPACE_BEGIN
41
42 //
43 // LocaleContainer
44 //
45
46 const String LocaleContainer::NAME = "LocaleContainer";
47
|
48 kumpf 1.19 LocaleContainer::LocaleContainer(const OperationContext::Container& container)
|
49 kumpf 1.1 {
|
50 kumpf 1.19 const LocaleContainer* p = dynamic_cast<const LocaleContainer*>(&container);
|
51 kumpf 1.1
|
52 kumpf 1.19 if (p == 0)
|
53 kumpf 1.1 {
54 throw DynamicCastFailedException();
55 }
56
57 *this = *p;
58 }
59
|
60 kumpf 1.19 LocaleContainer::LocaleContainer(const String& languageId)
|
61 kumpf 1.1 {
62 _languageId = languageId;
63 }
64
|
65 kumpf 1.19 LocaleContainer::~LocaleContainer()
|
66 kumpf 1.1 {
67 }
68
|
69 kumpf 1.19 LocaleContainer& LocaleContainer::operator=(const LocaleContainer&container)
|
70 brian.campbell 1.7 {
|
71 kumpf 1.19 if (this == &container)
|
72 chip 1.11 {
|
73 kumpf 1.19 return *this;
|
74 chip 1.11 }
|
75 brian.campbell 1.7
|
76 chip 1.11 _languageId = container._languageId;
77
|
78 kumpf 1.19 return *this;
|
79 brian.campbell 1.7 }
80
|
81 kumpf 1.19 String LocaleContainer::getName() const
|
82 kumpf 1.1 {
|
83 kumpf 1.19 return NAME;
|
84 kumpf 1.1 }
85
|
86 kumpf 1.19 OperationContext::Container* LocaleContainer::clone() const
|
87 kumpf 1.1 {
|
88 kumpf 1.19 return new LocaleContainer(*this);
|
89 kumpf 1.1 }
90
|
91 kumpf 1.19 void LocaleContainer::destroy()
|
92 kumpf 1.1 {
93 delete this;
94 }
95
|
96 kumpf 1.19 String LocaleContainer::getLanguageId() const
|
97 kumpf 1.1 {
|
98 kumpf 1.19 return _languageId;
|
99 kumpf 1.1 }
100
101 //
102 // ProviderIdContainer
103 //
104
105 const String ProviderIdContainer::NAME = "ProviderIdContainer";
106
|
107 kumpf 1.19 ProviderIdContainer::ProviderIdContainer(
108 const OperationContext::Container& container)
|
109 kumpf 1.1 {
|
110 kumpf 1.19 const ProviderIdContainer* p =
111 dynamic_cast<const ProviderIdContainer*>(&container);
|
112 kumpf 1.1
|
113 kumpf 1.19 if (p == 0)
|
114 kumpf 1.1 {
115 throw DynamicCastFailedException();
116 }
117
118 *this = *p;
119 }
120
|
121 chip 1.11 ProviderIdContainer::ProviderIdContainer(
|
122 kumpf 1.19 const CIMInstance& module,
123 const CIMInstance& provider,
|
124 chip 1.14 Boolean isRemoteNameSpace,
|
125 kumpf 1.19 const String& remoteInfo)
|
126 chip 1.13 : _module(module),
127 _provider(provider),
128 _isRemoteNameSpace(isRemoteNameSpace),
129 _remoteInfo(remoteInfo)
|
130 kumpf 1.1 {
131 }
132
|
133 kumpf 1.19 ProviderIdContainer::~ProviderIdContainer()
|
134 kumpf 1.1 {
135 }
136
|
137 kumpf 1.19 ProviderIdContainer& ProviderIdContainer::operator=(
138 const ProviderIdContainer& container)
|
139 brian.campbell 1.7 {
|
140 kumpf 1.19 if (this == &container)
|
141 brian.campbell 1.7 {
|
142 kumpf 1.19 return *this;
|
143 brian.campbell 1.7 }
144
145 _module = container._module;
146 _provider = container._provider;
|
147 chip 1.13 _isRemoteNameSpace = container._isRemoteNameSpace;
|
148 brian.campbell 1.7 _remoteInfo = container._remoteInfo;
|
149 b.whiteley 1.23 _provMgrPath = container._provMgrPath;
|
150 brian.campbell 1.7
|
151 kumpf 1.19 return *this;
|
152 brian.campbell 1.7 }
153
|
154 kumpf 1.19 String ProviderIdContainer::getName() const
|
155 kumpf 1.1 {
|
156 kumpf 1.19 return NAME;
|
157 kumpf 1.1 }
158
|
159 kumpf 1.19 OperationContext::Container* ProviderIdContainer::clone() const
|
160 kumpf 1.1 {
|
161 kumpf 1.19 return new ProviderIdContainer(*this);
|
162 kumpf 1.1 }
163
|
164 kumpf 1.19 void ProviderIdContainer::destroy()
|
165 kumpf 1.1 {
166 delete this;
167 }
168
|
169 kumpf 1.19 CIMInstance ProviderIdContainer::getModule() const
|
170 kumpf 1.1 {
|
171 kumpf 1.19 return _module;
|
172 kumpf 1.1 }
173
|
174 kumpf 1.19 CIMInstance ProviderIdContainer::getProvider() const
|
175 kumpf 1.1 {
|
176 kumpf 1.19 return _provider;
|
177 kumpf 1.1 }
178
|
179 kumpf 1.19 Boolean ProviderIdContainer::isRemoteNameSpace() const
|
180 schuur 1.5 {
|
181 kumpf 1.19 return _isRemoteNameSpace;
|
182 schuur 1.5 }
183
|
184 kumpf 1.19 String ProviderIdContainer::getRemoteInfo() const
|
185 schuur 1.5 {
|
186 kumpf 1.19 return _remoteInfo;
|
187 schuur 1.5 }
188
|
189 b.whiteley 1.23 String ProviderIdContainer::getProvMgrPath() const
190 {
191 return _provMgrPath;
192 }
193
194 void ProviderIdContainer::setProvMgrPath(String &path)
195 {
196 _provMgrPath = path;
197 }
198
|
199 chip 1.11 //
200 // CachedClassDefinitionContainer
201 //
202
|
203 kumpf 1.19 const String CachedClassDefinitionContainer::NAME =
204 "CachedClassDefinitionContainer";
|
205 chip 1.11
|
206 kumpf 1.19 CachedClassDefinitionContainer::CachedClassDefinitionContainer(
207 const OperationContext::Container& container)
|
208 chip 1.11 {
|
209 kumpf 1.19 const CachedClassDefinitionContainer* p =
210 dynamic_cast<const CachedClassDefinitionContainer*>(&container);
|
211 chip 1.11
|
212 kumpf 1.19 if (p == 0)
|
213 chip 1.11 {
214 throw DynamicCastFailedException();
215 }
216
217 *this = *p;
218 }
219
220
|
221 kumpf 1.19 CachedClassDefinitionContainer::CachedClassDefinitionContainer(
|
222 mike 1.24 const CIMConstClass& cimClass)
|
223 chip 1.11 : _cimClass(cimClass)
224 {
225 }
226
|
227 kumpf 1.19 CachedClassDefinitionContainer::~CachedClassDefinitionContainer()
|
228 chip 1.11 {
229 }
230
|
231 kumpf 1.19 CachedClassDefinitionContainer& CachedClassDefinitionContainer::operator=(
232 const CachedClassDefinitionContainer& container)
|
233 chip 1.11 {
|
234 kumpf 1.19 if (this == &container)
|
235 chip 1.11 {
|
236 kumpf 1.19 return *this;
|
237 chip 1.11 }
238
239 _cimClass = container._cimClass;
240
|
241 kumpf 1.19 return *this;
|
242 chip 1.11 }
243
|
244 kumpf 1.19 String CachedClassDefinitionContainer::getName() const
|
245 chip 1.11 {
|
246 kumpf 1.19 return NAME;
|
247 chip 1.11 }
248
|
249 kumpf 1.19 OperationContext::Container* CachedClassDefinitionContainer::clone() const
|
250 chip 1.11 {
|
251 kumpf 1.19 return new CachedClassDefinitionContainer(*this);
|
252 chip 1.11 }
253
|
254 kumpf 1.19 void CachedClassDefinitionContainer::destroy()
|
255 chip 1.11 {
256 delete this;
257 }
258
|
259 mike 1.24 CIMConstClass CachedClassDefinitionContainer::getClass() const
|
260 chip 1.11 {
|
261 kumpf 1.19 return _cimClass;
|
262 chip 1.11 }
263
|
264 a.dunfey 1.16 //
265 // NormalizerContextContainer
266 //
267
268 const String NormalizerContextContainer::NAME = "NormalizerContextContainer";
269
270 NormalizerContextContainer::NormalizerContextContainer(
|
271 kumpf 1.19 const OperationContext::Container& container)
|
272 a.dunfey 1.16 {
|
273 kumpf 1.19 const NormalizerContextContainer* p =
274 dynamic_cast<const NormalizerContextContainer*>(&container);
|
275 a.dunfey 1.16
|
276 kumpf 1.19 if (p == 0)
|
277 a.dunfey 1.16 {
278 throw DynamicCastFailedException();
279 }
280
281 *this = *p;
282 }
283
284
285 NormalizerContextContainer::NormalizerContextContainer(
|
286 kumpf 1.19 AutoPtr<NormalizerContext>& context) : normalizerContext(context.get())
|
287 a.dunfey 1.16 {
288 context.release();
289 }
290
|
291 kumpf 1.18 NormalizerContextContainer::NormalizerContextContainer(
|
292 kumpf 1.19 const NormalizerContextContainer& container)
|
293 kumpf 1.22 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
294 kumpf 1.18 : OperationContext::Container()
295 #endif
|
296 marek 1.17 {
|
297 kumpf 1.19 if (this != &container)
|
298 marek 1.17 {
|
299 kumpf 1.21 normalizerContext.reset(container.normalizerContext->clone());
|
300 marek 1.17 }
301 }
302
|
303 a.dunfey 1.16 NormalizerContextContainer::~NormalizerContextContainer()
304 {
305 }
306
|
307 kumpf 1.19 NormalizerContextContainer& NormalizerContextContainer::operator=(
308 const NormalizerContextContainer& container)
|
309 a.dunfey 1.16 {
|
310 kumpf 1.19 if (this == &container)
|
311 a.dunfey 1.16 {
|
312 kumpf 1.19 return *this;
|
313 a.dunfey 1.16 }
314
|
315 kumpf 1.21 normalizerContext.reset(container.normalizerContext->clone());
|
316 a.dunfey 1.16
|
317 kumpf 1.19 return *this;
|
318 a.dunfey 1.16 }
319
320 String NormalizerContextContainer::getName() const
321 {
|
322 kumpf 1.19 return NAME;
|
323 a.dunfey 1.16 }
324
|
325 kumpf 1.19 OperationContext::Container* NormalizerContextContainer::clone() const
|
326 a.dunfey 1.16 {
|
327 kumpf 1.19 return new NormalizerContextContainer(*this);
|
328 a.dunfey 1.16 }
329
330 void NormalizerContextContainer::destroy()
331 {
332 delete this;
333 }
334
|
335 kumpf 1.19 NormalizerContext* NormalizerContextContainer::getContext() const
|
336 a.dunfey 1.16 {
337 return normalizerContext.get();
338 }
339
|
340 kumpf 1.1 PEGASUS_NAMESPACE_END
|