• Main Page
  • Classes
  • Files
  • File List

/root/rpmbuild/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_EXPERIMENTAL_INTERFACES
00298 
00327     void filter(
00328         Boolean includeQualifiers,
00329         Boolean includeClassOrigin,
00330         const CIMPropertyList & propertyList);
00331 #endif
00332 
00333 private:
00334 
00335     CIMInstanceRep* _rep;
00336 
00337     CIMInstance(CIMInstanceRep* rep);
00338 
00339     friend class CIMConstInstance;
00340     friend class CIMObject;
00341     friend class CIMConstObject;
00342     friend class Resolver;
00343     friend class XmlWriter;
00344     friend class MofWriter;
00345     friend class BinaryStreamer;
00346     friend class CIMClassRep;
00347 };
00348 
00350 //
00351 // CIMConstInstance
00352 //
00354 
00362 class PEGASUS_COMMON_LINKAGE CIMConstInstance
00363 {
00364 public:
00365 
00373     CIMConstInstance();
00374 
00382     CIMConstInstance(const CIMConstInstance& x);
00383 
00391     CIMConstInstance(const CIMInstance& x);
00392 
00401     explicit CIMConstInstance(const CIMObject& x);
00402 
00412     explicit CIMConstInstance(const CIMConstObject& x);
00413 
00418     CIMConstInstance(const CIMName& className);
00419 
00427     CIMConstInstance& operator=(const CIMConstInstance& x);
00428 
00436     CIMConstInstance& operator=(const CIMInstance& x);
00437 
00441     ~CIMConstInstance();
00442 
00449     const CIMName& getClassName() const;
00450 
00457     const CIMObjectPath& getPath() const;
00458 
00466     Uint32 findQualifier(const CIMName& name) const;
00467 
00477     CIMConstQualifier getQualifier(Uint32 index) const;
00478 
00485     Uint32 getQualifierCount() const;
00486 
00494     Uint32 findProperty(const CIMName& name) const;
00495 
00505     CIMConstProperty getProperty(Uint32 index) const;
00506 
00513     Uint32 getPropertyCount() const;
00514 
00526     CIMObjectPath buildPath(const CIMConstClass& cimClass) const;
00527 
00536     CIMInstance clone() const;
00537 
00546     Boolean identical(const CIMConstInstance& x) const;
00547 
00552     Boolean isUninitialized() const;
00553 
00554 private:
00555 
00556     CIMInstanceRep* _rep;
00557 
00558     friend class CIMInstance;
00559     friend class CIMObject;
00560     friend class CIMConstObject;
00561     friend class XmlWriter;
00562     friend class MofWriter;
00563     friend class BinaryStreamer;
00564 };
00565 
00566 #define PEGASUS_ARRAY_T CIMInstance
00567 # include <Pegasus/Common/ArrayInter.h>
00568 #undef PEGASUS_ARRAY_T
00569 
00570 PEGASUS_NAMESPACE_END
00571 
00572 #endif /* Pegasus_Instance_h */