1 a.dunfey 1.14.16.2 //%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 a.dunfey 1.14.16.2 // 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 a.dunfey 1.14.16.2 //
|
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 // Author: Chip Vincent (cvincent@us.ibm.com)
33 //
34 // Modified By:
35 //
36 //%/////////////////////////////////////////////////////////////////////////////
37
38 #include "OperationContextInternal.h"
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 kumpf 1.1 //
43 // LocaleContainer
44 //
45
46 const String LocaleContainer::NAME = "LocaleContainer";
47
48 LocaleContainer::LocaleContainer(const OperationContext::Container & container)
49 {
50 const LocaleContainer * p = dynamic_cast<const LocaleContainer *>(&container);
51
52 if(p == 0)
53 {
54 throw DynamicCastFailedException();
55 }
56
57 *this = *p;
58 }
59
60 LocaleContainer::LocaleContainer(const String & languageId)
61 {
62 _languageId = languageId;
63 kumpf 1.1 }
64
65 LocaleContainer::~LocaleContainer(void)
66 {
67 }
68
|
69 chip 1.11 LocaleContainer & LocaleContainer::operator=(const LocaleContainer &container)
|
70 brian.campbell 1.7 {
|
71 chip 1.11 if(this == &container)
72 {
73 return(*this);
74 }
|
75 brian.campbell 1.7
|
76 chip 1.11 _languageId = container._languageId;
77
78 return(*this);
|
79 brian.campbell 1.7 }
80
|
81 kumpf 1.1 String LocaleContainer::getName(void) const
82 {
83 return(NAME);
84 }
85
86 OperationContext::Container * LocaleContainer::clone(void) const
87 {
88 return(new LocaleContainer(*this));
89 }
90
91 void LocaleContainer::destroy(void)
92 {
93 delete this;
94 }
95
96 String LocaleContainer::getLanguageId(void) const
97 {
98 return(_languageId);
99 }
100
101 //
102 kumpf 1.1 // ProviderIdContainer
103 //
104
105 const String ProviderIdContainer::NAME = "ProviderIdContainer";
106
107 ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & container)
108 {
109 const ProviderIdContainer * p = dynamic_cast<const ProviderIdContainer *>(&container);
110
111 if(p == 0)
112 {
113 throw DynamicCastFailedException();
114 }
115
116 *this = *p;
117 }
118
|
119 chip 1.11 ProviderIdContainer::ProviderIdContainer(
120 const CIMInstance & module,
121 const CIMInstance & provider,
|
122 chip 1.14 Boolean isRemoteNameSpace,
|
123 chip 1.13 const String & remoteInfo)
124 : _module(module),
125 _provider(provider),
126 _isRemoteNameSpace(isRemoteNameSpace),
127 _remoteInfo(remoteInfo)
|
128 kumpf 1.1 {
129 }
130
131 ProviderIdContainer::~ProviderIdContainer(void)
132 {
133 }
134
|
135 chip 1.11 ProviderIdContainer & ProviderIdContainer::operator=(const ProviderIdContainer & container)
|
136 brian.campbell 1.7 {
|
137 chip 1.11 if(this == &container)
|
138 brian.campbell 1.7 {
|
139 chip 1.11 return(*this);
|
140 brian.campbell 1.7 }
141
142 _module = container._module;
143 _provider = container._provider;
|
144 chip 1.13 _isRemoteNameSpace = container._isRemoteNameSpace;
|
145 brian.campbell 1.7 _remoteInfo = container._remoteInfo;
146
|
147 chip 1.11 return(*this);
|
148 brian.campbell 1.7 }
149
|
150 kumpf 1.1 String ProviderIdContainer::getName(void) const
151 {
152 return(NAME);
153 }
154
155 OperationContext::Container * ProviderIdContainer::clone(void) const
156 {
157 return(new ProviderIdContainer(*this));
158 }
159
160 void ProviderIdContainer::destroy(void)
161 {
162 delete this;
163 }
164
165 CIMInstance ProviderIdContainer::getModule(void) const
166 {
167 return(_module);
168 }
169
170 CIMInstance ProviderIdContainer::getProvider(void) const
171 kumpf 1.1 {
172 return(_provider);
173 }
174
|
175 schuur 1.5 Boolean ProviderIdContainer::isRemoteNameSpace(void) const
176 {
|
177 chip 1.13 return(_isRemoteNameSpace);
|
178 schuur 1.5 }
179
|
180 chip 1.13 String ProviderIdContainer::getRemoteInfo(void) const
|
181 schuur 1.5 {
182 return(_remoteInfo);
183 }
184
|
185 chip 1.11 //
186 // CachedClassDefinitionContainer
187 //
188
189 const String CachedClassDefinitionContainer::NAME = "CachedClassDefinitionContainer";
190
191 CachedClassDefinitionContainer::CachedClassDefinitionContainer(const OperationContext::Container & container)
192 {
193 const CachedClassDefinitionContainer * p = dynamic_cast<const CachedClassDefinitionContainer *>(&container);
194
195 if(p == 0)
196 {
197 throw DynamicCastFailedException();
198 }
199
200 *this = *p;
201 }
202
203
204 CachedClassDefinitionContainer::CachedClassDefinitionContainer(const CIMClass & cimClass)
205 : _cimClass(cimClass)
206 chip 1.11 {
207 }
208
209 CachedClassDefinitionContainer::~CachedClassDefinitionContainer(void)
210 {
211 }
212
213 CachedClassDefinitionContainer & CachedClassDefinitionContainer::operator=(const CachedClassDefinitionContainer & container)
214 {
215 if(this == &container)
216 {
217 return(*this);
218 }
219
220 _cimClass = container._cimClass;
221
222 return(*this);
223 }
224
225 String CachedClassDefinitionContainer::getName(void) const
226 {
227 chip 1.11 return(NAME);
228 }
229
230 OperationContext::Container * CachedClassDefinitionContainer::clone(void) const
231 {
232 return(new CachedClassDefinitionContainer(*this));
233 }
234
235 void CachedClassDefinitionContainer::destroy(void)
236 {
237 delete this;
238 }
239
240 CIMClass CachedClassDefinitionContainer::getClass(void) const
241 {
242 return(_cimClass);
243 }
244
|
245 a.dunfey 1.14.16.1
246 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
247 // Only needed if normalization is enabled
248 #ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION
249 //
|
250 a.dunfey 1.14.16.2 // NormalizerContextContainer
|
251 a.dunfey 1.14.16.1 //
252
|
253 a.dunfey 1.14.16.2 const String NormalizerContextContainer::NAME = "NormalizerContextContainer";
|
254 a.dunfey 1.14.16.1
|
255 a.dunfey 1.14.16.2 NormalizerContextContainer::NormalizerContextContainer(const OperationContext::Container & container)
|
256 a.dunfey 1.14.16.1 {
|
257 a.dunfey 1.14.16.2 const NormalizerContextContainer * p =
258 dynamic_cast<const NormalizerContextContainer *>(&container);
|
259 a.dunfey 1.14.16.1
260 if(p == 0)
261 {
262 throw DynamicCastFailedException();
263 }
264
|
265 a.dunfey 1.14.16.2 *this = *const_cast<NormalizerContextContainer *>(p);
|
266 a.dunfey 1.14.16.1 }
267
268
|
269 a.dunfey 1.14.16.2 NormalizerContextContainer::NormalizerContextContainer(AutoPtr<NormalizerContext> & context)
270 : _context(context)
|
271 a.dunfey 1.14.16.1 {
272 }
273
|
274 a.dunfey 1.14.16.2 NormalizerContextContainer::~NormalizerContextContainer(void)
|
275 a.dunfey 1.14.16.1 {
276 }
277
|
278 a.dunfey 1.14.16.2 NormalizerContextContainer & NormalizerContextContainer::operator=(NormalizerContextContainer & container)
|
279 a.dunfey 1.14.16.1 {
280 if(this == &container)
281 {
282 return(*this);
283 }
284
|
285 a.dunfey 1.14.16.2 _context = container._context;
|
286 a.dunfey 1.14.16.1
287 return(*this);
288 }
289
|
290 a.dunfey 1.14.16.2 String NormalizerContextContainer::getName(void) const
|
291 a.dunfey 1.14.16.1 {
292 return(NAME);
293 }
294
|
295 a.dunfey 1.14.16.2 OperationContext::Container * NormalizerContextContainer::clone(void) const
|
296 a.dunfey 1.14.16.1 {
|
297 a.dunfey 1.14.16.2 return(new NormalizerContextContainer(*this));
|
298 a.dunfey 1.14.16.1 }
299
|
300 a.dunfey 1.14.16.2 void NormalizerContextContainer::destroy(void)
|
301 a.dunfey 1.14.16.1 {
302 delete this;
303 }
304
|
305 a.dunfey 1.14.16.2 NormalizerContext * NormalizerContextContainer::getContext(void) const
|
306 a.dunfey 1.14.16.1 {
|
307 a.dunfey 1.14.16.2 return(_context.get());
|
308 a.dunfey 1.14.16.1 }
309 #endif // PEGASUS_ENABLE_OBJECT_NORMALIZATION
310 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
311
|
312 kumpf 1.1 PEGASUS_NAMESPACE_END
|