• Main Page
  • Classes
  • Files
  • File List

/usr/src/startcom/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 
00377     CIMPropertyRep* _rep;
00378 };
00379 
00380 
00382 //
00383 // CIMConstProperty
00384 //
00386 
00394 class PEGASUS_COMMON_LINKAGE CIMConstProperty
00395 {
00396 public:
00397 
00405     CIMConstProperty();
00406 
00414     CIMConstProperty(const CIMConstProperty& x);
00415 
00422     CIMConstProperty(const CIMProperty& x);
00423 
00447     CIMConstProperty(
00448         const CIMName& name,
00449         const CIMValue& value,
00450         Uint32 arraySize = 0,
00451         const CIMName& referenceClassName = CIMName(),
00452         const CIMName& classOrigin = CIMName(),
00453         Boolean propagated = false);
00454 
00458     ~CIMConstProperty();
00459 
00467     CIMConstProperty& operator=(const CIMConstProperty& x);
00468 
00476     CIMConstProperty& operator=(const CIMProperty& x);
00477 
00484     const CIMName& getName() const;
00485 
00492     const CIMValue& getValue() const;
00493 
00500     CIMType getType() const;
00501 
00508     Boolean isArray() const;
00509 
00516     Uint32 getArraySize() const;
00517 
00526     const CIMName& getReferenceClassName() const;
00527 
00536     const CIMName& getClassOrigin() const;
00537 
00548     Boolean getPropagated() const;
00549 
00557     Uint32 findQualifier(const CIMName& name) const;
00558 
00568     CIMConstQualifier getQualifier(Uint32 index) const;
00569 
00576     Uint32 getQualifierCount() const;
00577 
00586     Boolean identical(const CIMConstProperty& x) const;
00587 
00596     CIMProperty clone() const;
00597 
00602     Boolean isUninitialized() const;
00603 
00604 private:
00605 
00606     CIMPropertyRep* _rep;
00607 
00608     friend class CIMProperty;
00609     friend class CIMPropertyRep;
00610     friend class XmlWriter;
00611     friend class MofWriter;
00612     friend class CIMPropertyInternal;
00613 };
00614 
00615 #define PEGASUS_ARRAY_T CIMProperty
00616 # include <Pegasus/Common/ArrayInter.h>
00617 #undef PEGASUS_ARRAY_T
00618 
00619 PEGASUS_NAMESPACE_END
00620 
00621 #endif /* Pegasus_Property_h */