1 karl 1.12 //%2005////////////////////////////////////////////////////////////////////////
|
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 kumpf 1.1 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
|
18 chip 1.13 //
|
19 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Author: Chip Vincent (cvincent@us.ibm.com)
31 //
32 // Modified By:
33 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36 #include "OperationContextInternal.h"
37
38 PEGASUS_NAMESPACE_BEGIN
39
40 kumpf 1.1 //
41 // LocaleContainer
42 //
43
44 const String LocaleContainer::NAME = "LocaleContainer";
45
46 LocaleContainer::LocaleContainer(const OperationContext::Container & container)
47 {
48 const LocaleContainer * p = dynamic_cast<const LocaleContainer *>(&container);
49
50 if(p == 0)
51 {
52 throw DynamicCastFailedException();
53 }
54
55 *this = *p;
56 }
57
58 LocaleContainer::LocaleContainer(const String & languageId)
59 {
60 _languageId = languageId;
61 kumpf 1.1 }
62
63 LocaleContainer::~LocaleContainer(void)
64 {
65 }
66
|
67 chip 1.11 LocaleContainer & LocaleContainer::operator=(const LocaleContainer &container)
|
68 brian.campbell 1.7 {
|
69 chip 1.11 if(this == &container)
70 {
71 return(*this);
72 }
|
73 brian.campbell 1.7
|
74 chip 1.11 _languageId = container._languageId;
75
76 return(*this);
|
77 brian.campbell 1.7 }
78
|
79 kumpf 1.1 String LocaleContainer::getName(void) const
80 {
81 return(NAME);
82 }
83
84 OperationContext::Container * LocaleContainer::clone(void) const
85 {
86 return(new LocaleContainer(*this));
87 }
88
89 void LocaleContainer::destroy(void)
90 {
91 delete this;
92 }
93
94 String LocaleContainer::getLanguageId(void) const
95 {
96 return(_languageId);
97 }
98
99 //
100 kumpf 1.1 // ProviderIdContainer
101 //
102
103 const String ProviderIdContainer::NAME = "ProviderIdContainer";
104
105 ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & container)
106 {
107 const ProviderIdContainer * p = dynamic_cast<const ProviderIdContainer *>(&container);
108
109 if(p == 0)
110 {
111 throw DynamicCastFailedException();
112 }
113
114 *this = *p;
115 }
116
|
117 chip 1.11 ProviderIdContainer::ProviderIdContainer(
118 const CIMInstance & module,
119 const CIMInstance & provider,
|
120 chip 1.14 Boolean isRemoteNameSpace,
|
121 chip 1.13 const String & remoteInfo)
122 : _module(module),
123 _provider(provider),
124 _isRemoteNameSpace(isRemoteNameSpace),
125 _remoteInfo(remoteInfo)
|
126 kumpf 1.1 {
127 }
128
129 ProviderIdContainer::~ProviderIdContainer(void)
130 {
131 }
132
|
133 chip 1.11 ProviderIdContainer & ProviderIdContainer::operator=(const ProviderIdContainer & container)
|
134 brian.campbell 1.7 {
|
135 chip 1.11 if(this == &container)
|
136 brian.campbell 1.7 {
|
137 chip 1.11 return(*this);
|
138 brian.campbell 1.7 }
139
140 _module = container._module;
141 _provider = container._provider;
|
142 chip 1.13 _isRemoteNameSpace = container._isRemoteNameSpace;
|
143 brian.campbell 1.7 _remoteInfo = container._remoteInfo;
144
|
145 chip 1.11 return(*this);
|
146 brian.campbell 1.7 }
147
|
148 kumpf 1.1 String ProviderIdContainer::getName(void) const
149 {
150 return(NAME);
151 }
152
153 OperationContext::Container * ProviderIdContainer::clone(void) const
154 {
155 return(new ProviderIdContainer(*this));
156 }
157
158 void ProviderIdContainer::destroy(void)
159 {
160 delete this;
161 }
162
163 CIMInstance ProviderIdContainer::getModule(void) const
164 {
165 return(_module);
166 }
167
168 CIMInstance ProviderIdContainer::getProvider(void) const
169 kumpf 1.1 {
170 return(_provider);
171 }
172
|
173 schuur 1.5 Boolean ProviderIdContainer::isRemoteNameSpace(void) const
174 {
|
175 chip 1.13 return(_isRemoteNameSpace);
|
176 schuur 1.5 }
177
|
178 chip 1.13 String ProviderIdContainer::getRemoteInfo(void) const
|
179 schuur 1.5 {
180 return(_remoteInfo);
181 }
182
|
183 chip 1.11 //
184 // CachedClassDefinitionContainer
185 //
186
187 const String CachedClassDefinitionContainer::NAME = "CachedClassDefinitionContainer";
188
189 CachedClassDefinitionContainer::CachedClassDefinitionContainer(const OperationContext::Container & container)
190 {
191 const CachedClassDefinitionContainer * p = dynamic_cast<const CachedClassDefinitionContainer *>(&container);
192
193 if(p == 0)
194 {
195 throw DynamicCastFailedException();
196 }
197
198 *this = *p;
199 }
200
201
202 CachedClassDefinitionContainer::CachedClassDefinitionContainer(const CIMClass & cimClass)
203 : _cimClass(cimClass)
204 chip 1.11 {
205 }
206
207 CachedClassDefinitionContainer::~CachedClassDefinitionContainer(void)
208 {
209 }
210
211 CachedClassDefinitionContainer & CachedClassDefinitionContainer::operator=(const CachedClassDefinitionContainer & container)
212 {
213 if(this == &container)
214 {
215 return(*this);
216 }
217
218 _cimClass = container._cimClass;
219
220 return(*this);
221 }
222
223 String CachedClassDefinitionContainer::getName(void) const
224 {
225 chip 1.11 return(NAME);
226 }
227
228 OperationContext::Container * CachedClassDefinitionContainer::clone(void) const
229 {
230 return(new CachedClassDefinitionContainer(*this));
231 }
232
233 void CachedClassDefinitionContainer::destroy(void)
234 {
235 delete this;
236 }
237
238 CIMClass CachedClassDefinitionContainer::getClass(void) const
239 {
240 return(_cimClass);
241 }
242
|
243 kumpf 1.1 PEGASUS_NAMESPACE_END
|