CIMProperty.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_Property_h
33 #define Pegasus_Property_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/CIMName.h>
38 #include <Pegasus/Common/CIMValue.h>
39 #include <Pegasus/Common/CIMQualifier.h>
40 
41 PEGASUS_NAMESPACE_BEGIN
42 
44 //
45 // CIMProperty
46 //
48 
49 class CIMConstProperty;
50 class CIMPropertyRep;
51 class CIMClassRep;
52 class CIMInstanceRep;
53 class CIMQualifier;
54 class CIMConstQualifier;
55 class Resolver;
56 
100 class PEGASUS_COMMON_LINKAGE CIMProperty
101 {
102 public:
103 
111  CIMProperty();
112 
119  CIMProperty(const CIMProperty& x);
120 
144  CIMProperty(
145  const CIMName& name,
146  const CIMValue& value,
147  Uint32 arraySize = 0,
148  const CIMName& referenceClassName = CIMName(),
149  const CIMName& classOrigin = CIMName(),
150  Boolean propagated = false);
151 
155  ~CIMProperty();
156 
164  CIMProperty& operator=(const CIMProperty& x);
165 
172  const CIMName& getName() const;
173 
182  void setName(const CIMName& name);
183 
190  const CIMValue& getValue() const;
191 
198  CIMType getType() const;
199 
206  Boolean isArray() const;
207 
214  void setValue(const CIMValue& value);
215 
222  Uint32 getArraySize() const;
223 
232  const CIMName& getReferenceClassName() const;
233 
242  const CIMName& getClassOrigin() const;
243 
253  void setClassOrigin(const CIMName& classOrigin);
254 
265  Boolean getPropagated() const;
266 
275  void setPropagated(Boolean propagated);
276 
286  CIMProperty& addQualifier(const CIMQualifier& x);
287 
295  Uint32 findQualifier(const CIMName& name) const;
296 
306  CIMQualifier getQualifier(Uint32 index);
307 
317  CIMConstQualifier getQualifier(Uint32 index) const;
318 
327  void removeQualifier(Uint32 index);
328 
335  Uint32 getQualifierCount() const;
336 
345  Boolean identical(const CIMConstProperty& x) const;
346 
354  CIMProperty clone() const;
355 
360  Boolean isUninitialized() const;
361 
362 private:
363 
364  CIMProperty(CIMPropertyRep* rep);
365 
366  friend class CIMConstProperty;
367  friend class CIMClassRep;
368  friend class CIMInstanceRep;
369  friend class Resolver;
370  friend class XmlWriter;
371  friend class MofWriter;
372  friend class BinaryStreamer;
373  friend class CIMObjectRep;
374  friend class CIMPropertyContainer;
375  friend class CIMPropertyInternal;
376  friend class SCMOClass;
377  friend class SCMOInstance;
378 
379  CIMPropertyRep* _rep;
380 };
381 
382 
384 //
385 // CIMConstProperty
386 //
388 
396 class PEGASUS_COMMON_LINKAGE CIMConstProperty
397 {
398 public:
399 
408 
417 
424  CIMConstProperty(const CIMProperty& x);
425 
450  const CIMName& name,
451  const CIMValue& value,
452  Uint32 arraySize = 0,
453  const CIMName& referenceClassName = CIMName(),
454  const CIMName& classOrigin = CIMName(),
455  Boolean propagated = false);
456 
460  ~CIMConstProperty();
461 
469  CIMConstProperty& operator=(const CIMConstProperty& x);
470 
478  CIMConstProperty& operator=(const CIMProperty& x);
479 
486  const CIMName& getName() const;
487 
494  const CIMValue& getValue() const;
495 
502  CIMType getType() const;
503 
510  Boolean isArray() const;
511 
518  Uint32 getArraySize() const;
519 
528  const CIMName& getReferenceClassName() const;
529 
538  const CIMName& getClassOrigin() const;
539 
550  Boolean getPropagated() const;
551 
559  Uint32 findQualifier(const CIMName& name) const;
560 
570  CIMConstQualifier getQualifier(Uint32 index) const;
571 
578  Uint32 getQualifierCount() const;
579 
588  Boolean identical(const CIMConstProperty& x) const;
589 
598  CIMProperty clone() const;
599 
604  Boolean isUninitialized() const;
605 
606 private:
607 
608  CIMPropertyRep* _rep;
609 
610  friend class CIMProperty;
611  friend class CIMPropertyRep;
612  friend class XmlWriter;
613  friend class MofWriter;
614  friend class CIMPropertyInternal;
615  friend class SCMOClass;
616  friend class SCMOInstance;
617 };
618 
619 #define PEGASUS_ARRAY_T CIMProperty
620 # include <Pegasus/Common/ArrayInter.h>
621 #undef PEGASUS_ARRAY_T
622 
623 PEGASUS_NAMESPACE_END
624 
625 #endif /* Pegasus_Property_h */
Definition: CIMProperty.h:100
Definition: CIMProperty.h:396
Definition: CIMQualifier.h:273
Definition: CIMValue.h:63
Definition: CIMQualifier.h:68
Definition: CIMName.h:64