• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-26152/rpm/BUILD/pegasus/src/Pegasus/Common/CIMClass.h

00001 //%LICENSE////////////////////////////////////////////////////////////////
00002 //
00003 // Licensed to The Open Group (TOG) under one or more contributor license
00004 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
00005 // this work for additional information regarding copyright ownership.
00006 // Each contributor licenses this file to you under the OpenPegasus Open
00007 // Source License; you may not use this file except in compliance with the
00008 // License.
00009 //
00010 // Permission is hereby granted, free of charge, to any person obtaining a
00011 // copy of this software and associated documentation files (the "Software"),
00012 // to deal in the Software without restriction, including without limitation
00013 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014 // and/or sell copies of the Software, and to permit persons to whom the
00015 // Software is furnished to do so, subject to the following conditions:
00016 //
00017 // The above copyright notice and this permission notice shall be included
00018 // in all copies or substantial portions of the Software.
00019 //
00020 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00024 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00025 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00026 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00027 //
00029 //
00030 //%/////////////////////////////////////////////////////////////////////////////
00031 
00032 #ifndef Pegasus_CIMClass_h
00033 #define Pegasus_CIMClass_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/CIMName.h>
00038 #include <Pegasus/Common/CIMObject.h>
00039 #include <Pegasus/Common/CIMMethod.h>
00040 #include <Pegasus/Common/CIMInstance.h>
00041 #include <Pegasus/Common/CIMPropertyList.h>
00042 
00043 PEGASUS_NAMESPACE_BEGIN
00044 
00045 class CIMConstClass;
00046 class CIMClassRep;
00047 class Resolver;
00048 
00049 
00061 class PEGASUS_COMMON_LINKAGE CIMClass
00062 {
00063 public:
00064 
00072     CIMClass();
00073 
00080     CIMClass(const CIMClass& x);
00081 
00090     explicit CIMClass(const CIMObject& x);
00091 
00103     CIMClass(
00104         const CIMName& className,
00105         const CIMName& superClassName = CIMName());
00106 
00114     CIMClass& operator=(const CIMClass& x);
00115 
00119     ~CIMClass();
00120 
00130     Boolean isAssociation() const;
00131 
00139     Boolean isAbstract() const;
00140 
00147     const CIMName& getClassName() const;
00148 
00155     const CIMObjectPath& getPath() const;
00156 
00163     void setPath (const CIMObjectPath & path);
00164 
00171     const CIMName& getSuperClassName() const;
00172 
00179     void setSuperClassName(const CIMName& superClassName);
00180 
00190     CIMClass& addQualifier(const CIMQualifier& qualifier);
00191 
00199     Uint32 findQualifier(const CIMName& name) const;
00200 
00210     CIMQualifier getQualifier(Uint32 index);
00211 
00221     CIMConstQualifier getQualifier(Uint32 index) const;
00222 
00231     void removeQualifier(Uint32 index);
00232 
00239     Uint32 getQualifierCount() const;
00240 
00250     CIMClass& addProperty(const CIMProperty& x);
00251 
00259     Uint32 findProperty(const CIMName& name) const;
00260 
00270     CIMProperty getProperty(Uint32 index);
00271 
00281     CIMConstProperty getProperty(Uint32 index) const;
00282 
00291     void removeProperty(Uint32 index);
00292 
00299     Uint32 getPropertyCount() const;
00300 
00310     CIMClass& addMethod(const CIMMethod& x);
00311 
00319     Uint32 findMethod(const CIMName& name) const;
00320 
00330     CIMMethod getMethod(Uint32 index);
00331 
00341     CIMConstMethod getMethod(Uint32 index) const;
00342 
00351     void removeMethod(Uint32 index);
00352 
00359     Uint32 getMethodCount() const;
00360 
00369     void getKeyNames(Array<CIMName>& keyNames) const;
00370 
00378     Boolean hasKeys() const;
00379 
00387     CIMClass clone() const;
00388 
00397     Boolean identical(const CIMConstClass& x) const;
00398 
00403     Boolean isUninitialized() const;
00404 
00405 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
00406 
00452     CIMInstance buildInstance(Boolean includeQualifiers,
00453         Boolean includeClassOrigin,
00454         const CIMPropertyList & propertyList) const;
00455 #endif
00456 
00457 private:
00458 
00459     CIMClassRep* _rep;
00460 
00461     CIMClass(CIMClassRep* rep);
00462 
00463     friend class CIMConstClass;
00464     friend class CIMObject;
00465     friend class CIMConstObject;
00466     friend class Resolver;
00467     friend class XmlWriter;
00468     friend class MofWriter;
00469     friend class BinaryStreamer;
00470     friend class SCMOClass;
00471 };
00472 
00473 #define PEGASUS_ARRAY_T CIMClass
00474 #include <Pegasus/Common/ArrayInter.h>
00475 #undef PEGASUS_ARRAY_T
00476 
00477 
00485 class PEGASUS_COMMON_LINKAGE CIMConstClass
00486 {
00487 public:
00488 
00496     CIMConstClass();
00497 
00504     CIMConstClass(const CIMConstClass& x);
00505 
00512     CIMConstClass(const CIMClass& x);
00513 
00522     explicit CIMConstClass(const CIMObject& x);
00523 
00533     explicit CIMConstClass(const CIMConstObject& x);
00534 
00541     CIMConstClass(
00542         const CIMName& className,
00543         const CIMName& superClassName = CIMName());
00544 
00552     CIMConstClass& operator=(const CIMConstClass& x);
00553 
00561     CIMConstClass& operator=(const CIMClass& x);
00562 
00566     ~CIMConstClass();
00567 
00577     Boolean isAssociation() const;
00578 
00586     Boolean isAbstract() const;
00587 
00594     const CIMName& getClassName() const;
00595 
00602     const CIMObjectPath& getPath() const;
00603 
00610     const CIMName& getSuperClassName() const;
00611 
00619     Uint32 findQualifier(const CIMName& name) const;
00620 
00630     CIMConstQualifier getQualifier(Uint32 index) const;
00631 
00638     Uint32 getQualifierCount() const;
00639 
00647     Uint32 findProperty(const CIMName& name) const;
00648 
00658     CIMConstProperty getProperty(Uint32 index) const;
00659 
00666     Uint32 getPropertyCount() const;
00667 
00675     Uint32 findMethod(const CIMName& name) const;
00676 
00686     CIMConstMethod getMethod(Uint32 index) const;
00687 
00694     Uint32 getMethodCount() const;
00695 
00704     void getKeyNames(Array<CIMName>& keyNames) const;
00705 
00714     Boolean hasKeys() const;
00715 
00724     CIMClass clone() const;
00725 
00734     Boolean identical(const CIMConstClass& x) const;
00735 
00740     Boolean isUninitialized() const;
00741 
00742 private:
00743 
00744     CIMClassRep* _rep;
00745 
00746     friend class CIMClassRep;
00747     friend class CIMClass;
00748     friend class CIMInstanceRep;
00749     friend class CIMObject;
00750     friend class CIMConstObject;
00751     friend class XmlWriter;
00752     friend class MofWriter;
00753     friend class BinaryStreamer;
00754     friend class SCMOClass;
00755 };
00756 
00757 PEGASUS_NAMESPACE_END
00758 
00759 #endif /* Pegasus_CIMClass_h */