• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-24884/rpm/BUILD/pegasus/src/Pegasus/Common/CIMProperty.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_Property_h
00033 #define Pegasus_Property_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/CIMName.h>
00038 #include <Pegasus/Common/CIMValue.h>
00039 #include <Pegasus/Common/CIMQualifier.h>
00040 
00041 PEGASUS_NAMESPACE_BEGIN
00042 
00044 //
00045 // CIMProperty
00046 //
00048 
00049 class CIMConstProperty;
00050 class CIMPropertyRep;
00051 class CIMClassRep;
00052 class CIMInstanceRep;
00053 class CIMQualifier;
00054 class CIMConstQualifier;
00055 class Resolver;
00056 
00100 class PEGASUS_COMMON_LINKAGE CIMProperty
00101 {
00102 public:
00103 
00111     CIMProperty();
00112 
00119     CIMProperty(const CIMProperty& x);
00120 
00144     CIMProperty(
00145         const CIMName& name,
00146         const CIMValue& value,
00147         Uint32 arraySize = 0,
00148         const CIMName& referenceClassName = CIMName(),
00149         const CIMName& classOrigin = CIMName(),
00150         Boolean propagated = false);
00151 
00155     ~CIMProperty();
00156 
00164     CIMProperty& operator=(const CIMProperty& x);
00165 
00172     const CIMName& getName() const;
00173 
00182     void setName(const CIMName& name);
00183 
00190     const CIMValue& getValue() const;
00191 
00198     CIMType getType() const;
00199 
00206     Boolean isArray() const;
00207 
00214     void setValue(const CIMValue& value);
00215 
00222     Uint32 getArraySize() const;
00223 
00232     const CIMName& getReferenceClassName() const;
00233 
00242     const CIMName& getClassOrigin() const;
00243 
00253     void setClassOrigin(const CIMName& classOrigin);
00254 
00265     Boolean getPropagated() const;
00266 
00275     void setPropagated(Boolean propagated);
00276 
00286     CIMProperty& addQualifier(const CIMQualifier& x);
00287 
00295     Uint32 findQualifier(const CIMName& name) const;
00296 
00306     CIMQualifier getQualifier(Uint32 index);
00307 
00317     CIMConstQualifier getQualifier(Uint32 index) const;
00318 
00327     void removeQualifier(Uint32 index);
00328 
00335     Uint32 getQualifierCount() const;
00336 
00345     Boolean identical(const CIMConstProperty& x) const;
00346 
00354     CIMProperty clone() const;
00355 
00360     Boolean isUninitialized() const;
00361 
00362 private:
00363 
00364     CIMProperty(CIMPropertyRep* rep);
00365 
00366     friend class CIMConstProperty;
00367     friend class CIMClassRep;
00368     friend class CIMInstanceRep;
00369     friend class Resolver;
00370     friend class XmlWriter;
00371     friend class MofWriter;
00372     friend class BinaryStreamer;
00373     friend class CIMObjectRep;
00374     friend class CIMPropertyContainer;
00375     friend class CIMPropertyInternal;
00376     friend class SCMOClass;
00377     friend class SCMOInstance;
00378 
00379     CIMPropertyRep* _rep;
00380 };
00381 
00382 
00384 //
00385 // CIMConstProperty
00386 //
00388 
00396 class PEGASUS_COMMON_LINKAGE CIMConstProperty
00397 {
00398 public:
00399 
00407     CIMConstProperty();
00408 
00416     CIMConstProperty(const CIMConstProperty& x);
00417 
00424     CIMConstProperty(const CIMProperty& x);
00425 
00449     CIMConstProperty(
00450         const CIMName& name,
00451         const CIMValue& value,
00452         Uint32 arraySize = 0,
00453         const CIMName& referenceClassName = CIMName(),
00454         const CIMName& classOrigin = CIMName(),
00455         Boolean propagated = false);
00456 
00460     ~CIMConstProperty();
00461 
00469     CIMConstProperty& operator=(const CIMConstProperty& x);
00470 
00478     CIMConstProperty& operator=(const CIMProperty& x);
00479 
00486     const CIMName& getName() const;
00487 
00494     const CIMValue& getValue() const;
00495 
00502     CIMType getType() const;
00503 
00510     Boolean isArray() const;
00511 
00518     Uint32 getArraySize() const;
00519 
00528     const CIMName& getReferenceClassName() const;
00529 
00538     const CIMName& getClassOrigin() const;
00539 
00550     Boolean getPropagated() const;
00551 
00559     Uint32 findQualifier(const CIMName& name) const;
00560 
00570     CIMConstQualifier getQualifier(Uint32 index) const;
00571 
00578     Uint32 getQualifierCount() const;
00579 
00588     Boolean identical(const CIMConstProperty& x) const;
00589 
00598     CIMProperty clone() const;
00599 
00604     Boolean isUninitialized() const;
00605 
00606 private:
00607 
00608     CIMPropertyRep* _rep;
00609 
00610     friend class CIMProperty;
00611     friend class CIMPropertyRep;
00612     friend class XmlWriter;
00613     friend class MofWriter;
00614     friend class CIMPropertyInternal;
00615     friend class SCMOClass;
00616     friend class SCMOInstance;
00617 };
00618 
00619 #define PEGASUS_ARRAY_T CIMProperty
00620 # include <Pegasus/Common/ArrayInter.h>
00621 #undef PEGASUS_ARRAY_T
00622 
00623 PEGASUS_NAMESPACE_END
00624 
00625 #endif /* Pegasus_Property_h */