/srv/build/STABLE_8/pkgs/tog-pegasus/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 };
00471 
00472 #define PEGASUS_ARRAY_T CIMClass
00473 #include <Pegasus/Common/ArrayInter.h>
00474 #undef PEGASUS_ARRAY_T
00475 
00476 
00484 class PEGASUS_COMMON_LINKAGE CIMConstClass
00485 {
00486 public:
00487 
00495     CIMConstClass();
00496 
00503     CIMConstClass(const CIMConstClass& x);
00504 
00511     CIMConstClass(const CIMClass& x);
00512 
00521     explicit CIMConstClass(const CIMObject& x);
00522 
00532     explicit CIMConstClass(const CIMConstObject& x);
00533 
00540     CIMConstClass(
00541         const CIMName& className,
00542         const CIMName& superClassName = CIMName());
00543 
00551     CIMConstClass& operator=(const CIMConstClass& x);
00552 
00560     CIMConstClass& operator=(const CIMClass& x);
00561 
00565     ~CIMConstClass();
00566 
00576     Boolean isAssociation() const;
00577 
00585     Boolean isAbstract() const;
00586 
00593     const CIMName& getClassName() const;
00594 
00601     const CIMObjectPath& getPath() const;
00602 
00609     const CIMName& getSuperClassName() const;
00610 
00618     Uint32 findQualifier(const CIMName& name) const;
00619 
00629     CIMConstQualifier getQualifier(Uint32 index) const;
00630 
00637     Uint32 getQualifierCount() const;
00638 
00646     Uint32 findProperty(const CIMName& name) const;
00647 
00657     CIMConstProperty getProperty(Uint32 index) const;
00658 
00665     Uint32 getPropertyCount() const;
00666 
00674     Uint32 findMethod(const CIMName& name) const;
00675 
00685     CIMConstMethod getMethod(Uint32 index) const;
00686 
00693     Uint32 getMethodCount() const;
00694 
00703     void getKeyNames(Array<CIMName>& keyNames) const;
00704 
00713     Boolean hasKeys() const;
00714 
00723     CIMClass clone() const;
00724 
00733     Boolean identical(const CIMConstClass& x) const;
00734 
00739     Boolean isUninitialized() const;
00740 
00741 private:
00742 
00743     CIMClassRep* _rep;
00744 
00745     friend class CIMClassRep;
00746     friend class CIMClass;
00747     friend class CIMInstanceRep;
00748     friend class CIMObject;
00749     friend class CIMConstObject;
00750     friend class XmlWriter;
00751     friend class MofWriter;
00752     friend class BinaryStreamer;
00753 };
00754 
00755 PEGASUS_NAMESPACE_END
00756 
00757 #endif /* Pegasus_CIMClass_h */