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