CIMQualifier.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_Qualifier_h
33 #define Pegasus_Qualifier_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/CIMName.h>
38 #include <Pegasus/Common/CIMFlavor.h>
39 #include <Pegasus/Common/CIMType.h>
40 #include <Pegasus/Common/CIMValue.h>
41 
42 PEGASUS_NAMESPACE_BEGIN
43 
45 //
46 // CIMQualifier
47 //
49 
50 class CIMConstQualifier;
51 class CIMClassRep;
52 class Resolver;
53 class CIMQualifierRep;
54 
68 class PEGASUS_COMMON_LINKAGE CIMQualifier
69 {
70 public:
71 
79  CIMQualifier();
80 
87  CIMQualifier(const CIMQualifier& x);
88 
101  CIMQualifier(
102  const CIMName& name,
103  const CIMValue& value,
104  const CIMFlavor & flavor = CIMFlavor (CIMFlavor::NONE),
105  Boolean propagated = false);
106 
110  ~CIMQualifier();
111 
119  CIMQualifier& operator=(const CIMQualifier& x);
120 
127  const CIMName& getName() const;
128 
137  void setName(const CIMName& name);
138 
145  CIMType getType() const;
146 
153  Boolean isArray() const;
154 
161  const CIMValue& getValue() const;
162 
169  void setValue(const CIMValue& value);
170 
177  void setFlavor(const CIMFlavor & flavor);
178 
185  void unsetFlavor(const CIMFlavor & flavor);
186 
193  const CIMFlavor & getFlavor() const;
194 
207  Uint32 getPropagated() const;
208 
217  void setPropagated(Boolean propagated);
218 
223  Boolean isUninitialized() const;
224 
233  Boolean identical(const CIMConstQualifier& x) const;
234 
242  CIMQualifier clone() const;
243 
244 private:
245 
246  CIMQualifier(CIMQualifierRep* rep);
247 
248  CIMQualifierRep* _rep;
249 
250  friend class CIMConstQualifier;
251  friend class CIMClassRep;
252  friend class Resolver;
253  friend class XmlWriter;
254  friend class MofWriter;
255  friend class BinaryStreamer;
256  friend class CIMQualifierList;
257 };
258 
259 
261 //
262 // CIMConstQualifier
263 //
265 
273 class PEGASUS_COMMON_LINKAGE CIMConstQualifier
274 {
275 public:
276 
285 
294 
303 
317  const CIMName& name,
318  const CIMValue& value,
319  const CIMFlavor & flavor = CIMFlavor (CIMFlavor::NONE),
320  Boolean propagated = false);
321 
326 
334  CIMConstQualifier& operator=(const CIMConstQualifier& x);
335 
343  CIMConstQualifier& operator=(const CIMQualifier& x);
344 
351  const CIMName& getName() const;
352 
359  CIMType getType() const;
360 
367  Boolean isArray() const;
368 
375  const CIMValue& getValue() const;
376 
383  const CIMFlavor & getFlavor() const;
384 
397  Uint32 getPropagated() const;
398 
403  Boolean isUninitialized() const;
404 
413  Boolean identical(const CIMConstQualifier& x) const;
414 
423  CIMQualifier clone() const;
424 
425 private:
426 
427  CIMQualifierRep* _rep;
428 
429  friend class CIMQualifier;
430  friend class XmlWriter;
431  friend class MofWriter;
432 };
433 
434 #define PEGASUS_ARRAY_T CIMQualifier
435 # include <Pegasus/Common/ArrayInter.h>
436 #undef PEGASUS_ARRAY_T
437 
438 PEGASUS_NAMESPACE_END
439 
440 #endif /* Pegasus_Qualifier_h */
static const CIMFlavor NONE
Definition: CIMFlavor.h:127
Definition: CIMQualifier.h:273
Definition: CIMValue.h:63
Definition: CIMQualifier.h:68
Definition: CIMName.h:64
Definition: CIMFlavor.h:53