• Main Page
  • Classes
  • Files
  • File List

/builddir/build/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 
00450     CIMInstance buildInstance(Boolean includeQualifiers,
00451         Boolean includeClassOrigin,
00452         const CIMPropertyList & propertyList) const;
00453 
00454 private:
00455 
00456     CIMClassRep* _rep;
00457 
00458     CIMClass(CIMClassRep* rep);
00459 
00460     friend class CIMConstClass;
00461     friend class CIMObject;
00462     friend class CIMConstObject;
00463     friend class Resolver;
00464     friend class XmlWriter;
00465     friend class MofWriter;
00466     friend class BinaryStreamer;
00467     friend class SCMOClass;
00468 };
00469 
00470 #define PEGASUS_ARRAY_T CIMClass
00471 #include <Pegasus/Common/ArrayInter.h>
00472 #undef PEGASUS_ARRAY_T
00473 
00474 
00482 class PEGASUS_COMMON_LINKAGE CIMConstClass
00483 {
00484 public:
00485 
00493     CIMConstClass();
00494 
00501     CIMConstClass(const CIMConstClass& x);
00502 
00509     CIMConstClass(const CIMClass& x);
00510 
00519     explicit CIMConstClass(const CIMObject& x);
00520 
00530     explicit CIMConstClass(const CIMConstObject& x);
00531 
00538     CIMConstClass(
00539         const CIMName& className,
00540         const CIMName& superClassName = CIMName());
00541 
00549     CIMConstClass& operator=(const CIMConstClass& x);
00550 
00558     CIMConstClass& operator=(const CIMClass& x);
00559 
00563     ~CIMConstClass();
00564 
00574     Boolean isAssociation() const;
00575 
00583     Boolean isAbstract() const;
00584 
00591     const CIMName& getClassName() const;
00592 
00599     const CIMObjectPath& getPath() const;
00600 
00607     const CIMName& getSuperClassName() const;
00608 
00616     Uint32 findQualifier(const CIMName& name) const;
00617 
00627     CIMConstQualifier getQualifier(Uint32 index) const;
00628 
00635     Uint32 getQualifierCount() const;
00636 
00644     Uint32 findProperty(const CIMName& name) const;
00645 
00655     CIMConstProperty getProperty(Uint32 index) const;
00656 
00663     Uint32 getPropertyCount() const;
00664 
00672     Uint32 findMethod(const CIMName& name) const;
00673 
00683     CIMConstMethod getMethod(Uint32 index) const;
00684 
00691     Uint32 getMethodCount() const;
00692 
00701     void getKeyNames(Array<CIMName>& keyNames) const;
00702 
00711     Boolean hasKeys() const;
00712 
00721     CIMClass clone() const;
00722 
00731     Boolean identical(const CIMConstClass& x) const;
00732 
00737     Boolean isUninitialized() const;
00738 
00739 private:
00740 
00741     CIMClassRep* _rep;
00742 
00743     friend class CIMClassRep;
00744     friend class CIMClass;
00745     friend class CIMInstanceRep;
00746     friend class CIMObject;
00747     friend class CIMConstObject;
00748     friend class XmlWriter;
00749     friend class MofWriter;
00750     friend class BinaryStreamer;
00751     friend class SCMOClass;
00752 };
00753 
00754 PEGASUS_NAMESPACE_END
00755 
00756 #endif /* Pegasus_CIMClass_h */