1 karl 1.40 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.12 //
|
3 karl 1.38 // 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.36 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.38 // 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.39 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.40 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.12 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.22 // 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 mike 1.12 // 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 //
|
21 kumpf 1.22 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.12 // 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 kumpf 1.22 // 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 mike 1.12 // 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 #ifndef Pegasus_QualifierDecl_h
35 #define Pegasus_QualifierDecl_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.28 #include <Pegasus/Common/Linkage.h>
39 #include <Pegasus/Common/CIMName.h>
|
40 kumpf 1.17 #include <Pegasus/Common/Array.h>
41 #include <Pegasus/Common/CIMQualifierDecl.h>
42 #include <Pegasus/Common/CIMFlavor.h>
43 #include <Pegasus/Common/CIMScope.h>
44 #include <Pegasus/Common/CIMType.h>
45 #include <Pegasus/Common/CIMValue.h>
|
46 mike 1.12
47 PEGASUS_NAMESPACE_BEGIN
48
49 ////////////////////////////////////////////////////////////////////////////////
50 //
51 // CIMQualifierDecl
52 //
53 ////////////////////////////////////////////////////////////////////////////////
54
55 class CIMConstQualifierDecl;
56 class CIMClassRep;
|
57 sage 1.24 class CIMQualifierDeclRep;
|
58 kumpf 1.34
|
59 kumpf 1.41 /**
60 A CIMQualifierDecl represents a DMTF standard CIM qualifier declaration.
61 A CIMQualifierDecl differs from a CIMQualifier in that it has a scope
62 attribute. A CIMQualifierDecl defines a qualifier, whereas a CIMQualifier
63 applies the qualifier.
64
65 <p>The CIMQualifierDecl class uses a shared representation model, such
66 that multiple CIMQualifierDecl objects may refer to the same data copy.
67 Assignment and copy operators create new references to the same data, not
68 distinct copies. An update to a CIMQualifierDecl object affects all the
69 CIMQualifierDecl objects that refer to the same data copy. The data
70 remains valid until all the CIMQualifierDecl objects that refer to it are
71 destructed. A separate copy of the data may be created using the clone
72 method.
|
73 mike 1.12 */
74 class PEGASUS_COMMON_LINKAGE CIMQualifierDecl
75 {
76 public:
|
77 kumpf 1.41
78 /**
79 Constructs an uninitialized CIMQualifierDecl object. A method
80 invocation on an uninitialized object will result in the throwing
81 of an UninitializedObjectException. An uninitialized object may
82 be converted into an initialized object only by using the assignment
83 operator with an initialized object.
84 */
|
85 kumpf 1.17 CIMQualifierDecl();
|
86 mike 1.12
|
87 kumpf 1.41 /**
88 Constructs a CIMQualifierDecl object from the value of a specified
89 CIMQualifierDecl object, so that both objects refer to the same data
90 copy.
91 @param x The CIMQualifierDecl object from which to construct a new
92 CIMQualifierDecl object.
93 */
|
94 kumpf 1.17 CIMQualifierDecl(const CIMQualifierDecl& x);
|
95 mike 1.12
|
96 kumpf 1.41 /**
97 Constructs a CIMQualifierDecl object with the specified attributes.
98 @param name A CIMName specifying the name of the qualifier.
99 @param value A CIMValue specifying the default qualifier value, and
100 implicitly defining the qualifier type and whether the qualifier
101 is an Array qualifier.
102 @param scope A CIMScope indicating the qualifier scope.
103 @param flavor A CIMFlavor indicating the qualifier flavors.
104 @param arraySize A Uint32 indicating the size of the Array, if the
105 qualifier is an Array qualifier. The default value of zero
106 indicates a variable size array.
107 @exception UninitializedObjectException If the qualifier name is null.
|
108 mike 1.12 */
109 CIMQualifierDecl(
|
110 kumpf 1.42 const CIMName& name,
111 const CIMValue& value,
|
112 kumpf 1.32 const CIMScope & scope,
113 const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
|
114 kumpf 1.17 Uint32 arraySize = 0);
115
|
116 kumpf 1.41 /**
117 Destructs the CIMQualifierDecl object.
118 */
|
119 kumpf 1.17 ~CIMQualifierDecl();
120
|
121 kumpf 1.41 /**
122 Assigns the value of the specified CIMQualifierDecl object to this
123 object, so that both objects refer to the same data copy.
124 @param x The CIMQualifierDecl object from which to assign this
125 CIMQualifierDecl object.
126 @return A reference to this CIMQualifierDecl object.
127 */
|
128 kumpf 1.17 CIMQualifierDecl& operator=(const CIMQualifierDecl& x);
|
129 mike 1.12
|
130 kumpf 1.41 /**
131 Gets the name of the qualifier.
132 @return A CIMName containing the name of the qualifier.
133 @exception UninitializedObjectException If the object is not
134 initialized.
|
135 kumpf 1.17 */
|
136 kumpf 1.28 const CIMName& getName() const;
|
137 mike 1.12
|
138 kumpf 1.41 /**
139 Sets the qualifier name.
140 @param name A CIMName containing the new name of the qualifier.
141 @exception UninitializedObjectException If the object is not
142 initialized.
|
143 mike 1.12 */
|
144 kumpf 1.28 void setName(const CIMName& name);
|
145 mike 1.12
|
146 kumpf 1.41 /**
147 Gets the qualifier type.
148 @return A CIMType containing the qualifier type.
149 @exception UninitializedObjectException If the object is not
150 initialized.
|
151 mike 1.12 */
|
152 kumpf 1.17 CIMType getType() const;
153
|
154 kumpf 1.41 /**
155 Checks whether the qualifier is an Array qualifier.
156 @return True if the qualifier is an Array qualifier, false otherwise.
157 @exception UninitializedObjectException If the object is not
158 initialized.
|
159 mike 1.12 */
|
160 kumpf 1.17 Boolean isArray() const;
161
|
162 kumpf 1.41 /**
163 Gets the qualifier default value.
164 @return A CIMValue containing the qualifier default value.
165 @exception UninitializedObjectException If the object is not
166 initialized.
167 */
|
168 kumpf 1.17 const CIMValue& getValue() const;
169
|
170 kumpf 1.41 /**
171 Sets the qualifier default value.
172 @param name A CIMValue containing the new default value of the
173 qualifier.
174 @exception UninitializedObjectException If the object is not
175 initialized.
176 */
|
177 kumpf 1.17 void setValue(const CIMValue& value);
178
|
179 kumpf 1.41 /**
180 Gets the qualifier scope.
181 @return A CIMScope containing the qualifier scope.
182 @exception UninitializedObjectException If the object is not
183 initialized.
184 */
|
185 kumpf 1.31 const CIMScope & getScope() const;
|
186 kumpf 1.17
|
187 kumpf 1.41 /**
188 Gets the qualifier flavors.
189 @return A CIMFlavor containing the qualifier flavor settings.
190 @exception UninitializedObjectException If the object is not
191 initialized.
|
192 kumpf 1.17 */
|
193 kumpf 1.32 const CIMFlavor & getFlavor() const;
|
194 karl 1.14
|
195 kumpf 1.41 /**
196 Gets the array size for the qualifier.
197 @return Uint32 array size.
198 @exception UninitializedObjectException If the object is not
199 initialized.
200 */
|
201 kumpf 1.17 Uint32 getArraySize() const;
|
202 mike 1.12
|
203 kumpf 1.41 /**
204 Determines whether the object has been initialized.
205 @return True if the object has not been initialized, false otherwise.
|
206 kumpf 1.35 */
|
207 kumpf 1.30 Boolean isUninitialized() const;
|
208 kumpf 1.42
|
209 kumpf 1.41 /**
210 Compares the qualifier declaration with another qualifier declaration.
211 @param x The CIMConstQualifierDecl to be compared.
212 @return True if this qualifier declaration is identical to the one
213 specified, false otherwise.
214 @exception UninitializedObjectException If either of the objects
215 is not initialized.
216 */
|
217 mike 1.12 Boolean identical(const CIMConstQualifierDecl& x) const;
|
218 kumpf 1.17
|
219 kumpf 1.41 /**
220 Makes a deep copy of the qualifier declaration. This creates a new
221 copy of all the qualifier declaration attributes.
222 @return A new copy of the CIMQualifierDecl object.
223 @exception UninitializedObjectException If the object is not
224 initialized.
225 */
|
226 kumpf 1.17 CIMQualifierDecl clone() const;
|
227 mike 1.12
|
228 kumpf 1.17 private:
|
229 mike 1.12
|
230 kumpf 1.17 CIMQualifierDecl(CIMQualifierDeclRep* rep);
|
231 mike 1.12
|
232 kumpf 1.17 void _checkRep() const;
|
233 mike 1.12
234 CIMQualifierDeclRep* _rep;
|
235 kumpf 1.19
|
236 mike 1.12 friend class CIMConstQualifierDecl;
237 friend class CIMClassRep;
|
238 kumpf 1.19 friend class XmlWriter;
|
239 kumpf 1.20 friend class MofWriter;
|
240 mike 1.12 };
241
242 ////////////////////////////////////////////////////////////////////////////////
243 //
244 // CIMConstQualifierDecl
245 //
246 ////////////////////////////////////////////////////////////////////////////////
247
|
248 kumpf 1.41 /**
249 The CIMConstQualifierDecl class provides a const interface to a
250 CIMQualifierDecl object. This class is needed because the shared
251 representation model used by CIMQualifierDecl does not prevent
252 modification to a const CIMQualifierDecl object. Note that the value
253 of a CIMConstQualifierDecl object could still be modified by a
254 CIMQualifierDecl object that refers to the same data copy.
255 */
|
256 mike 1.12 class PEGASUS_COMMON_LINKAGE CIMConstQualifierDecl
257 {
258 public:
|
259 kumpf 1.41
260 /**
261 Constructs an uninitialized CIMConstQualifierDecl object. A method
262 invocation on an uninitialized object will result in the throwing
263 of an UninitializedObjectException. An uninitialized object may
264 be converted into an initialized object only by using the assignment
265 operator with an initialized object.
266 */
|
267 kumpf 1.17 CIMConstQualifierDecl();
268
|
269 kumpf 1.41 /**
270 Constructs a CIMConstQualifierDecl object from the value of a
271 specified CIMConstQualifierDecl object, so that both objects refer
272 to the same data copy.
273 @param x The CIMConstQualifierDecl object from which to construct a
274 new CIMConstQualifierDecl object.
275 */
|
276 kumpf 1.17 CIMConstQualifierDecl(const CIMConstQualifierDecl& x);
277
|
278 kumpf 1.41 /**
279 Constructs a CIMConstQualifierDecl object from the value of a
280 specified CIMQualifierDecl object, so that both objects refer
281 to the same data copy.
282 @param x The CIMQualifierDecl object from which to construct a
283 new CIMConstQualifierDecl object.
284 */
|
285 kumpf 1.17 CIMConstQualifierDecl(const CIMQualifierDecl& x);
286
|
287 kumpf 1.41 /**
288 Constructs a CIMConstQualifierDecl object with the specified
289 attributes.
290 @param name A CIMName specifying the name of the qualifier.
291 @param value A CIMValue specifying the default qualifier value, and
292 implicitly defining the qualifier type and whether the qualifier
293 is an Array qualifier.
294 @param scope A CIMScope indicating the qualifier scope.
295 @param flavor A CIMFlavor indicating the qualifier flavors.
296 @param arraySize A Uint32 indicating the size of the Array, if the
297 qualifier is an Array qualifier. The default value of zero
298 indicates a variable size array.
299 @exception UninitializedObjectException If the qualifier name is null.
|
300 kumpf 1.17 */
|
301 mike 1.12 CIMConstQualifierDecl(
|
302 kumpf 1.42 const CIMName& name,
303 const CIMValue& value,
|
304 kumpf 1.32 const CIMScope & scope,
305 const CIMFlavor & flavor = CIMFlavor (CIMFlavor::DEFAULTS),
|
306 kumpf 1.17 Uint32 arraySize = 0);
307
|
308 kumpf 1.41 /**
309 Destructs the CIMConstQualifierDecl object.
310 */
|
311 kumpf 1.17 ~CIMConstQualifierDecl();
312
|
313 kumpf 1.41 /**
314 Assigns the value of the specified CIMConstQualifierDecl object to
315 this object, so that both objects refer to the same data copy.
316 @param x The CIMConstQualifierDecl object from which to assign this
317 CIMConstQualifierDecl object.
318 @return A reference to this CIMConstQualifierDecl object.
319 */
|
320 kumpf 1.17 CIMConstQualifierDecl& operator=(const CIMConstQualifierDecl& x);
321
|
322 kumpf 1.41 /**
323 Assigns the value of the specified CIMQualifierDecl object to
324 this object, so that both objects refer to the same data copy.
325 @param x The CIMQualifierDecl object from which to assign this
326 CIMConstQualifierDecl object.
327 @return A reference to this CIMConstQualifierDecl object.
328 */
|
329 kumpf 1.17 CIMConstQualifierDecl& operator=(const CIMQualifierDecl& x);
330
|
331 kumpf 1.41 /**
332 Gets the name of the qualifier.
333 @return A CIMName containing the name of the qualifier.
334 @exception UninitializedObjectException If the object is not
335 initialized.
336 */
|
337 kumpf 1.28 const CIMName& getName() const;
|
338 kumpf 1.17
|
339 kumpf 1.41 /**
340 Gets the qualifier type.
341 @return A CIMType containing the qualifier type.
342 @exception UninitializedObjectException If the object is not
343 initialized.
344 */
|
345 kumpf 1.17 CIMType getType() const;
346
|
347 kumpf 1.41 /**
348 Checks whether the qualifier is an Array qualifier.
349 @return True if the qualifier is an Array qualifier, false otherwise.
350 @exception UninitializedObjectException If the object is not
351 initialized.
352 */
|
353 kumpf 1.17 Boolean isArray() const;
354
|
355 kumpf 1.41 /**
356 Gets the qualifier default value.
357 @return A CIMValue containing the qualifier default value.
358 @exception UninitializedObjectException If the object is not
359 initialized.
360 */
|
361 kumpf 1.17 const CIMValue& getValue() const;
362
|
363 kumpf 1.41 /**
364 Gets the qualifier scope.
365 @return A CIMScope containing the qualifier scope.
366 @exception UninitializedObjectException If the object is not
367 initialized.
368 */
|
369 kumpf 1.31 const CIMScope & getScope() const;
|
370 kumpf 1.17
|
371 kumpf 1.41 /**
372 Gets the qualifier flavors.
373 @return A CIMFlavor containing the qualifier flavor settings.
374 @exception UninitializedObjectException If the object is not
375 initialized.
376 */
|
377 kumpf 1.32 const CIMFlavor & getFlavor() const;
|
378 kumpf 1.17
|
379 kumpf 1.41 /**
380 Gets the array size for the qualifier.
381 @return Uint32 array size.
382 @exception UninitializedObjectException If the object is not
383 initialized.
384 */
|
385 kumpf 1.17 Uint32 getArraySize() const;
386
|
387 kumpf 1.41 /**
388 Determines whether the object has been initialized.
389 @return True if the object has not been initialized, false otherwise.
390 */
|
391 kumpf 1.30 Boolean isUninitialized() const;
|
392 kumpf 1.17
|
393 kumpf 1.41 /**
394 Compares the qualifier declaration with another qualifier declaration.
395 @param x The CIMConstQualifierDecl to be compared.
396 @return True if this qualifier declaration is identical to the one
397 specified, false otherwise.
398 @exception UninitializedObjectException If either of the objects
399 is not initialized.
400 */
|
401 kumpf 1.17 Boolean identical(const CIMConstQualifierDecl& x) const;
402
|
403 kumpf 1.41 /**
404 Makes a deep copy of the qualifier declaration. This creates a new
405 copy of all the qualifier declaration attributes.
406 @return A CIMQualifierDecl object with a separate copy of the
407 CIMConstQualifierDecl object.
408 @exception UninitializedObjectException If the object is not
409 initialized.
410 */
|
411 kumpf 1.17 CIMQualifierDecl clone() const;
|
412 mike 1.12
413 private:
414
|
415 kumpf 1.17 void _checkRep() const;
|
416 mike 1.12
417 CIMQualifierDeclRep* _rep;
|
418 kumpf 1.19
|
419 mike 1.12 friend class CIMQualifierDecl;
|
420 kumpf 1.19 friend class XmlWriter;
|
421 kumpf 1.20 friend class MofWriter;
|
422 mike 1.12 };
423
424 #define PEGASUS_ARRAY_T CIMQualifierDecl
|
425 kumpf 1.21 # include <Pegasus/Common/ArrayInter.h>
|
426 mike 1.12 #undef PEGASUS_ARRAY_T
427
428 PEGASUS_NAMESPACE_END
429
430 #endif /* Pegasus_QualifierDecl_h */
|