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
|
152 kumpf 1.19 return *this;
|
153 brian.campbell 1.7 }
154
|
155 kumpf 1.19 String ProviderIdContainer::getName() const
|
156 kumpf 1.1 {
|
157 kumpf 1.19 return NAME;
|
158 kumpf 1.1 }
159
|
160 kumpf 1.19 OperationContext::Container* ProviderIdContainer::clone() const
|
161 kumpf 1.1 {
|
162 kumpf 1.19 return new ProviderIdContainer(*this);
|
163 kumpf 1.1 }
164
|
165 kumpf 1.19 void ProviderIdContainer::destroy()
|
166 kumpf 1.1 {
167 delete this;
168 }
169
|
170 kumpf 1.19 CIMInstance ProviderIdContainer::getModule() const
|
171 kumpf 1.1 {
|
172 kumpf 1.19 return _module;
|
173 kumpf 1.1 }
174
|
175 kumpf 1.19 CIMInstance ProviderIdContainer::getProvider() const
|
176 kumpf 1.1 {
|
177 kumpf 1.19 return _provider;
|
178 kumpf 1.1 }
179
|
180 kumpf 1.19 Boolean ProviderIdContainer::isRemoteNameSpace() const
|
181 schuur 1.5 {
|
182 kumpf 1.19 return _isRemoteNameSpace;
|
183 schuur 1.5 }
184
|
185 kumpf 1.19 String ProviderIdContainer::getRemoteInfo() const
|
186 schuur 1.5 {
|
187 kumpf 1.19 return _remoteInfo;
|
188 schuur 1.5 }
189
|
190 chip 1.11 //
191 // CachedClassDefinitionContainer
192 //
193
|
194 kumpf 1.19 const String CachedClassDefinitionContainer::NAME =
195 "CachedClassDefinitionContainer";
|
196 chip 1.11
|
197 kumpf 1.19 CachedClassDefinitionContainer::CachedClassDefinitionContainer(
198 const OperationContext::Container& container)
|
199 chip 1.11 {
|
200 kumpf 1.19 const CachedClassDefinitionContainer* p =
201 dynamic_cast<const CachedClassDefinitionContainer*>(&container);
|
202 chip 1.11
|
203 kumpf 1.19 if (p == 0)
|
204 chip 1.11 {
205 throw DynamicCastFailedException();
206 }
207
208 *this = *p;
209 }
210
211
|
212 kumpf 1.19 CachedClassDefinitionContainer::CachedClassDefinitionContainer(
213 const CIMClass& cimClass)
|
214 chip 1.11 : _cimClass(cimClass)
215 {
216 }
217
|
218 kumpf 1.19 CachedClassDefinitionContainer::~CachedClassDefinitionContainer()
|
219 chip 1.11 {
220 }
221
|
222 kumpf 1.19 CachedClassDefinitionContainer& CachedClassDefinitionContainer::operator=(
223 const CachedClassDefinitionContainer& container)
|
224 chip 1.11 {
|
225 kumpf 1.19 if (this == &container)
|
226 chip 1.11 {
|
227 kumpf 1.19 return *this;
|
228 chip 1.11 }
229
230 _cimClass = container._cimClass;
231
|
232 kumpf 1.19 return *this;
|
233 chip 1.11 }
234
|
235 kumpf 1.19 String CachedClassDefinitionContainer::getName() const
|
236 chip 1.11 {
|
237 kumpf 1.19 return NAME;
|
238 chip 1.11 }
239
|
240 kumpf 1.19 OperationContext::Container* CachedClassDefinitionContainer::clone() const
|
241 chip 1.11 {
|
242 kumpf 1.19 return new CachedClassDefinitionContainer(*this);
|
243 chip 1.11 }
244
|
245 kumpf 1.19 void CachedClassDefinitionContainer::destroy()
|
246 chip 1.11 {
247 delete this;
248 }
249
|
250 kumpf 1.19 CIMClass CachedClassDefinitionContainer::getClass() const
|
251 chip 1.11 {
|
252 kumpf 1.19 return _cimClass;
|
253 chip 1.11 }
254
|
255 a.dunfey 1.16 //
256 // NormalizerContextContainer
257 //
258
259 const String NormalizerContextContainer::NAME = "NormalizerContextContainer";
260
261 NormalizerContextContainer::NormalizerContextContainer(
|
262 kumpf 1.19 const OperationContext::Container& container)
|
263 a.dunfey 1.16 {
|
264 kumpf 1.19 const NormalizerContextContainer* p =
265 dynamic_cast<const NormalizerContextContainer*>(&container);
|
266 a.dunfey 1.16
|
267 kumpf 1.19 if (p == 0)
|
268 a.dunfey 1.16 {
269 throw DynamicCastFailedException();
270 }
271
272 *this = *p;
273 }
274
275
276 NormalizerContextContainer::NormalizerContextContainer(
|
277 kumpf 1.19 AutoPtr<NormalizerContext>& context) : normalizerContext(context.get())
|
278 a.dunfey 1.16 {
279 context.release();
280 }
281
|
282 kumpf 1.18 NormalizerContextContainer::NormalizerContextContainer(
|
283 kumpf 1.19 const NormalizerContextContainer& container)
|
284 kumpf 1.22 #ifdef PEGASUS_INCLUDE_SUPERCLASS_INITIALIZER
|
285 kumpf 1.18 : OperationContext::Container()
286 #endif
|
287 marek 1.17 {
|
288 kumpf 1.19 if (this != &container)
|
289 marek 1.17 {
|
290 kumpf 1.21 normalizerContext.reset(container.normalizerContext->clone());
|
291 marek 1.17 }
292 }
293
|
294 a.dunfey 1.16 NormalizerContextContainer::~NormalizerContextContainer()
295 {
296 }
297
|
298 kumpf 1.19 NormalizerContextContainer& NormalizerContextContainer::operator=(
299 const NormalizerContextContainer& container)
|
300 a.dunfey 1.16 {
|
301 kumpf 1.19 if (this == &container)
|
302 a.dunfey 1.16 {
|
303 kumpf 1.19 return *this;
|
304 a.dunfey 1.16 }
305
|
306 kumpf 1.21 normalizerContext.reset(container.normalizerContext->clone());
|
307 a.dunfey 1.16
|
308 kumpf 1.19 return *this;
|
309 a.dunfey 1.16 }
310
311 String NormalizerContextContainer::getName() const
312 {
|
313 kumpf 1.19 return NAME;
|
314 a.dunfey 1.16 }
315
|
316 kumpf 1.19 OperationContext::Container* NormalizerContextContainer::clone() const
|
317 a.dunfey 1.16 {
|
318 kumpf 1.19 return new NormalizerContextContainer(*this);
|
319 a.dunfey 1.16 }
320
321 void NormalizerContextContainer::destroy()
322 {
323 delete this;
324 }
325
|
326 kumpf 1.19 NormalizerContext* NormalizerContextContainer::getContext() const
|
327 a.dunfey 1.16 {
328 return normalizerContext.get();
329 }
330
|
331 kumpf 1.1 PEGASUS_NAMESPACE_END
|