• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-11697/rpm/BUILD/pegasus/src/Pegasus/Common/CIMObject.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_Object_h
00033 #define Pegasus_Object_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/String.h>
00038 #include <Pegasus/Common/CIMName.h>
00039 #include <Pegasus/Common/Array.h>
00040 #include <Pegasus/Common/CIMProperty.h>
00041 #include <Pegasus/Common/CIMQualifier.h>
00042 #include <Pegasus/Common/CIMPropertyList.h>
00043 
00044 PEGASUS_NAMESPACE_BEGIN
00045 
00046 class CIMConstObject;
00047 class CIMObjectRep;
00048 class CIMClass;
00049 class CIMConstClass;
00050 class CIMInstance;
00051 class CIMConstInstance;
00052 class CIMProperty;
00053 class CIMConstProperty;
00054 class CIMQualifier;
00055 class CIMConstQualifier;
00056 
00058 //
00059 // CIMObject
00060 //
00062 
00075 class PEGASUS_COMMON_LINKAGE CIMObject
00076 {
00077 public:
00078 
00086     CIMObject();
00087 
00094     CIMObject(const CIMObject& x);
00095 
00102     CIMObject(const CIMClass& x);
00103 
00110     CIMObject(const CIMInstance& x);
00111 
00119     CIMObject& operator=(const CIMObject& x);
00120 
00124     ~CIMObject();
00125 
00132     const CIMName& getClassName() const;
00133 
00140     const CIMObjectPath& getPath() const;
00141 
00148     void setPath (const CIMObjectPath & path);
00149 
00159     CIMObject& addQualifier(const CIMQualifier& qualifier);
00160 
00168     Uint32 findQualifier(const CIMName& name) const;
00169 
00179     CIMQualifier getQualifier(Uint32 index);
00180 
00190     CIMConstQualifier getQualifier(Uint32 index) const;
00191 
00200     void removeQualifier(Uint32 index);
00201 
00208     Uint32 getQualifierCount() const;
00209 
00219     CIMObject& addProperty(const CIMProperty& x);
00220 
00228     Uint32 findProperty(const CIMName& name) const;
00229 
00239     CIMProperty getProperty(Uint32 index);
00240 
00250     CIMConstProperty getProperty(Uint32 index) const;
00251 
00260     void removeProperty(Uint32 index);
00261 
00268     Uint32 getPropertyCount() const;
00269 
00277     CIMObject clone() const;
00278 
00287     Boolean identical(const CIMConstObject& x) const;
00288 
00293     Boolean isUninitialized() const;
00294 
00303     String toString() const;
00304 
00309     Boolean isClass() const;
00310 
00315     Boolean isInstance() const;
00316 
00317     void instanceFilter(
00318         Boolean includeQualifiers,
00319         Boolean includeClassOrigin,
00320         const CIMPropertyList & propertyList);
00321 
00322 private:
00323 
00324     CIMObjectRep* _rep;
00325 
00326     CIMObject(CIMObjectRep* rep);
00327 
00328     friend class CIMConstObject;
00329     friend class CIMClass;
00330     friend class CIMConstClass;
00331     friend class CIMInstance;
00332     friend class CIMConstInstance;
00333 };
00334 
00335 #define PEGASUS_ARRAY_T CIMObject
00336 # include <Pegasus/Common/ArrayInter.h>
00337 #undef PEGASUS_ARRAY_T
00338 
00339 
00341 //
00342 // CIMConstObject
00343 //
00345 
00353 class PEGASUS_COMMON_LINKAGE CIMConstObject
00354 {
00355 public:
00356 
00364     CIMConstObject();
00365 
00373     CIMConstObject(const CIMConstObject& x);
00374 
00381     CIMConstObject(const CIMObject& x);
00382 
00389     CIMConstObject(const CIMClass& x);
00390 
00397     CIMConstObject(const CIMInstance& x);
00398 
00405     CIMConstObject(const CIMConstClass& x);
00406 
00414     CIMConstObject(const CIMConstInstance& x);
00415 
00423     CIMConstObject& operator=(const CIMConstObject& x);
00424 
00428     ~CIMConstObject();
00429 
00436     const CIMName& getClassName() const;
00437 
00444     const CIMObjectPath& getPath() const;
00445 
00453     Uint32 findQualifier(const CIMName& name) const;
00454 
00464     CIMConstQualifier getQualifier(Uint32 index) const;
00465 
00472     Uint32 getQualifierCount() const;
00473 
00481     Uint32 findProperty(const CIMName& name) const;
00482 
00492     CIMConstProperty getProperty(Uint32 index) const;
00493 
00500     Uint32 getPropertyCount() const;
00501 
00510     CIMObject clone() const;
00511 
00520     Boolean identical(const CIMConstObject& x) const;
00521 
00526     Boolean isUninitialized() const;
00527 
00536     String toString () const;
00537 
00542     Boolean isClass() const;
00543 
00549     Boolean isInstance() const;
00550 
00551 private:
00552 
00553     CIMObjectRep* _rep;
00554 
00555     friend class CIMObject;
00556     friend class CIMClass;
00557     friend class CIMConstClass;
00558     friend class CIMInstance;
00559     friend class CIMConstInstance;
00560 };
00561 
00562 PEGASUS_NAMESPACE_END
00563 
00564 #endif /* Pegasus_Object_h */