CIMClass.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_CIMClass_h
33 #define Pegasus_CIMClass_h
34 
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/Linkage.h>
37 #include <Pegasus/Common/CIMName.h>
38 #include <Pegasus/Common/CIMObject.h>
39 #include <Pegasus/Common/CIMMethod.h>
40 #include <Pegasus/Common/CIMInstance.h>
41 #include <Pegasus/Common/CIMPropertyList.h>
42 
43 PEGASUS_NAMESPACE_BEGIN
44 
45 class CIMConstClass;
46 class CIMClassRep;
47 class Resolver;
48 
49 
61 class PEGASUS_COMMON_LINKAGE CIMClass
62 {
63 public:
64 
72  CIMClass();
73 
80  CIMClass(const CIMClass& x);
81 
90  explicit CIMClass(const CIMObject& x);
91 
103  CIMClass(
104  const CIMName& className,
105  const CIMName& superClassName = CIMName());
106 
114  CIMClass& operator=(const CIMClass& x);
115 
119  ~CIMClass();
120 
130  Boolean isAssociation() const;
131 
139  Boolean isAbstract() const;
140 
147  const CIMName& getClassName() const;
148 
155  const CIMObjectPath& getPath() const;
156 
163  void setPath (const CIMObjectPath & path);
164 
171  const CIMName& getSuperClassName() const;
172 
179  void setSuperClassName(const CIMName& superClassName);
180 
190  CIMClass& addQualifier(const CIMQualifier& qualifier);
191 
199  Uint32 findQualifier(const CIMName& name) const;
200 
210  CIMQualifier getQualifier(Uint32 index);
211 
221  CIMConstQualifier getQualifier(Uint32 index) const;
222 
231  void removeQualifier(Uint32 index);
232 
239  Uint32 getQualifierCount() const;
240 
250  CIMClass& addProperty(const CIMProperty& x);
251 
259  Uint32 findProperty(const CIMName& name) const;
260 
270  CIMProperty getProperty(Uint32 index);
271 
281  CIMConstProperty getProperty(Uint32 index) const;
282 
291  void removeProperty(Uint32 index);
292 
299  Uint32 getPropertyCount() const;
300 
310  CIMClass& addMethod(const CIMMethod& x);
311 
319  Uint32 findMethod(const CIMName& name) const;
320 
330  CIMMethod getMethod(Uint32 index);
331 
341  CIMConstMethod getMethod(Uint32 index) const;
342 
351  void removeMethod(Uint32 index);
352 
359  Uint32 getMethodCount() const;
360 
369  void getKeyNames(Array<CIMName>& keyNames) const;
370 
378  Boolean hasKeys() const;
379 
387  CIMClass clone() const;
388 
397  Boolean identical(const CIMConstClass& x) const;
398 
403  Boolean isUninitialized() const;
404 
450  CIMInstance buildInstance(Boolean includeQualifiers,
451  Boolean includeClassOrigin,
452  const CIMPropertyList & propertyList) const;
453 
454 private:
455 
456  CIMClassRep* _rep;
457 
458  CIMClass(CIMClassRep* rep);
459 
460  friend class CIMConstClass;
461  friend class CIMObject;
462  friend class CIMConstObject;
463  friend class Resolver;
464  friend class XmlWriter;
465  friend class MofWriter;
466  friend class BinaryStreamer;
467  friend class SCMOClass;
468 };
469 
470 #define PEGASUS_ARRAY_T CIMClass
471 #include <Pegasus/Common/ArrayInter.h>
472 #undef PEGASUS_ARRAY_T
473 
474 
482 class PEGASUS_COMMON_LINKAGE CIMConstClass
483 {
484 public:
485 
493  CIMConstClass();
494 
501  CIMConstClass(const CIMConstClass& x);
502 
509  CIMConstClass(const CIMClass& x);
510 
519  explicit CIMConstClass(const CIMObject& x);
520 
530  explicit CIMConstClass(const CIMConstObject& x);
531 
539  const CIMName& className,
540  const CIMName& superClassName = CIMName());
541 
549  CIMConstClass& operator=(const CIMConstClass& x);
550 
558  CIMConstClass& operator=(const CIMClass& x);
559 
563  ~CIMConstClass();
564 
574  Boolean isAssociation() const;
575 
583  Boolean isAbstract() const;
584 
591  const CIMName& getClassName() const;
592 
599  const CIMObjectPath& getPath() const;
600 
607  const CIMName& getSuperClassName() const;
608 
616  Uint32 findQualifier(const CIMName& name) const;
617 
627  CIMConstQualifier getQualifier(Uint32 index) const;
628 
635  Uint32 getQualifierCount() const;
636 
644  Uint32 findProperty(const CIMName& name) const;
645 
655  CIMConstProperty getProperty(Uint32 index) const;
656 
663  Uint32 getPropertyCount() const;
664 
672  Uint32 findMethod(const CIMName& name) const;
673 
683  CIMConstMethod getMethod(Uint32 index) const;
684 
691  Uint32 getMethodCount() const;
692 
701  void getKeyNames(Array<CIMName>& keyNames) const;
702 
711  Boolean hasKeys() const;
712 
721  CIMClass clone() const;
722 
731  Boolean identical(const CIMConstClass& x) const;
732 
737  Boolean isUninitialized() const;
738 
739 private:
740 
741  CIMClassRep* _rep;
742 
743  friend class CIMClassRep;
744  friend class CIMClass;
745  friend class CIMInstanceRep;
746  friend class CIMObject;
747  friend class CIMConstObject;
748  friend class XmlWriter;
749  friend class MofWriter;
750  friend class BinaryStreamer;
751  friend class SCMOClass;
752 };
753 
754 PEGASUS_NAMESPACE_END
755 
756 #endif /* Pegasus_CIMClass_h */
Definition: CIMProperty.h:100
Definition: CIMProperty.h:396
Definition: CIMObjectPath.h:388
Definition: CIMInstance.h:64
Definition: CIMQualifier.h:273
Definition: CIMClass.h:482
Definition: CIMQualifier.h:68
Definition: CIMPropertyList.h:61
Definition: CIMName.h:64
Definition: CIMMethod.h:508
Definition: CIMClass.h:61
Definition: CIMMethod.h:86
Definition: ArrayInter.h:44
Definition: CIMObject.h:75
Definition: CIMObject.h:376