• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-24884/rpm/BUILD/pegasus/src/Pegasus/Common/CIMInstance.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_Instance_h
00033 #define Pegasus_Instance_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/CIMPropertyList.h>
00040 
00041 PEGASUS_NAMESPACE_BEGIN
00042 
00044 //
00045 // CIMInstance
00046 //
00048 
00049 class CIMConstInstance;
00050 class CIMInstanceRep;
00051 class Resolver;
00052 
00064 class PEGASUS_COMMON_LINKAGE CIMInstance
00065 {
00066 public:
00067 
00075     CIMInstance();
00076 
00083     CIMInstance(const CIMInstance& x);
00084 
00093     explicit CIMInstance(const CIMObject& x);
00094 
00099     CIMInstance(const CIMName& className);
00100 
00108     CIMInstance& operator=(const CIMInstance& x);
00109 
00113     ~CIMInstance();
00114 
00121     const CIMName& getClassName() const;
00122 
00129     const CIMObjectPath& getPath() const;
00130 
00137     void setPath (const CIMObjectPath & path);
00138 
00148     CIMInstance& addQualifier(const CIMQualifier& qualifier);
00149 
00157     Uint32 findQualifier(const CIMName& name) const;
00158 
00168     CIMQualifier getQualifier(Uint32 index);
00169 
00179     CIMConstQualifier getQualifier(Uint32 index) const;
00180 
00189     void removeQualifier(Uint32 index);
00190 
00197     Uint32 getQualifierCount() const;
00198 
00208     CIMInstance& addProperty(const CIMProperty& x);
00209 
00217     Uint32 findProperty(const CIMName& name) const;
00218 
00228     CIMProperty getProperty(Uint32 index);
00229 
00239     CIMConstProperty getProperty(Uint32 index) const;
00240 
00249     void removeProperty(Uint32 index);
00250 
00257     Uint32 getPropertyCount() const;
00258 
00270     CIMObjectPath buildPath(const CIMConstClass& cimClass) const;
00271 
00279     CIMInstance clone() const;
00280 
00289     Boolean identical(const CIMConstInstance& x) const;
00290 
00295     Boolean isUninitialized() const;
00296 
00297 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
00298 
00299 // This function has been deprecated. Property filtering is now done by the 
00300 // CIMOM infrastructure.
00301     void filter(
00302         Boolean includeQualifiers,
00303         Boolean includeClassOrigin,
00304         const CIMPropertyList & propertyList);
00305 #endif
00306 
00307 //This is a replacement function for filter(), it has   
00308 //added for backward compatability and it is not optimized 
00309 //for performance.
00310 void instanceFilter(
00311     Boolean includeQualifiers,
00312     Boolean includeClassOrigin,
00313     const CIMPropertyList & propertyList);         
00314 
00315 private:
00316 
00317     CIMInstanceRep* _rep;
00318 
00319     CIMInstance(CIMInstanceRep* rep);
00320 
00321     friend class CIMConstInstance;
00322     friend class CIMObject;
00323     friend class CIMConstObject;
00324     friend class Resolver;
00325     friend class XmlWriter;
00326     friend class MofWriter;
00327     friend class BinaryStreamer;
00328     friend class CIMClassRep;
00329     friend class SCMOInstance;
00330     friend class SCMOClass;
00331 };
00332 
00334 //
00335 // CIMConstInstance
00336 //
00338 
00346 class PEGASUS_COMMON_LINKAGE CIMConstInstance
00347 {
00348 public:
00349 
00357     CIMConstInstance();
00358 
00366     CIMConstInstance(const CIMConstInstance& x);
00367 
00375     CIMConstInstance(const CIMInstance& x);
00376 
00385     explicit CIMConstInstance(const CIMObject& x);
00386 
00396     explicit CIMConstInstance(const CIMConstObject& x);
00397 
00402     CIMConstInstance(const CIMName& className);
00403 
00411     CIMConstInstance& operator=(const CIMConstInstance& x);
00412 
00420     CIMConstInstance& operator=(const CIMInstance& x);
00421 
00425     ~CIMConstInstance();
00426 
00433     const CIMName& getClassName() const;
00434 
00441     const CIMObjectPath& getPath() const;
00442 
00450     Uint32 findQualifier(const CIMName& name) const;
00451 
00461     CIMConstQualifier getQualifier(Uint32 index) const;
00462 
00469     Uint32 getQualifierCount() const;
00470 
00478     Uint32 findProperty(const CIMName& name) const;
00479 
00489     CIMConstProperty getProperty(Uint32 index) const;
00490 
00497     Uint32 getPropertyCount() const;
00498 
00510     CIMObjectPath buildPath(const CIMConstClass& cimClass) const;
00511 
00520     CIMInstance clone() const;
00521 
00530     Boolean identical(const CIMConstInstance& x) const;
00531 
00536     Boolean isUninitialized() const;
00537 
00538 private:
00539 
00540     CIMInstanceRep* _rep;
00541 
00542     friend class CIMInstance;
00543     friend class CIMObject;
00544     friend class CIMConstObject;
00545     friend class XmlWriter;
00546     friend class MofWriter;
00547     friend class BinaryStreamer;
00548     friend class SCMOInstance;
00549 };
00550 
00551 #define PEGASUS_ARRAY_T CIMInstance
00552 # include <Pegasus/Common/ArrayInter.h>
00553 #undef PEGASUS_ARRAY_T
00554 
00555 PEGASUS_NAMESPACE_END
00556 
00557 #endif /* Pegasus_Instance_h */