CIMParameter.h
1 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31 
32 #ifndef Pegasus_Parameter_h
33 #define Pegasus_Parameter_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/CIMName.h>
37 #include <Pegasus/Common/CIMQualifier.h>
38 #include <Pegasus/Common/CIMType.h>
39 #include <Pegasus/Common/Linkage.h>
40 
41 PEGASUS_NAMESPACE_BEGIN
42 
44 //
45 // CIMParameter
46 //
48 
49 class Resolver;
50 class CIMConstParameter;
51 class CIMParameterRep;
52 
77 class PEGASUS_COMMON_LINKAGE CIMParameter
78 {
79 public:
80 
88  CIMParameter();
89 
96  CIMParameter(const CIMParameter& x);
97 
115  CIMParameter(
116  const CIMName& name,
117  CIMType type,
118  Boolean isArray = false,
119  Uint32 arraySize = 0,
120  const CIMName& referenceClassName = CIMName());
121 
125  ~CIMParameter();
126 
134  CIMParameter& operator=(const CIMParameter& x);
135 
142  const CIMName& getName() const;
143 
151  void setName(const CIMName& name);
152 
159  Boolean isArray() const;
160 
167  Uint32 getArraySize() const;
168 
177  const CIMName& getReferenceClassName() const;
178 
185  CIMType getType() const;
186 
196  CIMParameter& addQualifier(const CIMQualifier& x);
197 
205  Uint32 findQualifier(const CIMName& name) const;
206 
216  CIMQualifier getQualifier(Uint32 index);
217 
226  void removeQualifier (Uint32 index);
227 
237  CIMConstQualifier getQualifier(Uint32 index) const;
238 
252  Uint32 getQualifierCount() const;
253 
258  Boolean isUninitialized() const;
259 
268  Boolean identical(const CIMConstParameter& x) const;
269 
277  CIMParameter clone() const;
278 
279 private:
280 
281  CIMParameter(CIMParameterRep* rep);
282 
283  CIMParameterRep* _rep;
284 
285  friend class CIMConstParameter;
286  friend class Resolver;
287  friend class XmlWriter;
288  friend class MofWriter;
289  friend class BinaryStreamer;
290 };
291 
292 
294 //
295 // CIMConstParameter
296 //
298 
306 class PEGASUS_COMMON_LINKAGE CIMConstParameter
307 {
308 public:
309 
318 
327 
336 
353  const CIMName& name,
354  CIMType type,
355  Boolean isArray = false,
356  Uint32 arraySize = 0,
357  const CIMName& referenceClassName = CIMName());
358 
363 
371  CIMConstParameter& operator=(const CIMConstParameter& x);
372 
380  CIMConstParameter& operator=(const CIMParameter& x);
381 
388  const CIMName& getName() const;
389 
396  Boolean isArray() const;
397 
404  Uint32 getArraySize() const;
405 
414  const CIMName& getReferenceClassName() const;
415 
422  CIMType getType() const;
423 
431  Uint32 findQualifier(const CIMName& name) const;
432 
442  CIMConstQualifier getQualifier(Uint32 index) const;
443 
450  Uint32 getQualifierCount() const;
451 
456  Boolean isUninitialized() const;
457 
466  Boolean identical(const CIMConstParameter& x) const;
467 
476  CIMParameter clone() const;
477 
478 private:
479 
480  CIMParameterRep* _rep;
481  friend class CIMParameter;
482  friend class XmlWriter;
483  friend class MofWriter;
484 };
485 
486 #define PEGASUS_ARRAY_T CIMParameter
487 # include <Pegasus/Common/ArrayInter.h>
488 #undef PEGASUS_ARRAY_T
489 
490 PEGASUS_NAMESPACE_END
491 
492 #endif /* Pegasus_Parameter_h */
Definition: CIMParameter.h:306
Definition: CIMQualifier.h:273
Definition: CIMQualifier.h:68
Definition: CIMName.h:64
Definition: CIMParameter.h:77