/scratch/rpmbuild.5425.Bj5455/pegasus/src/Pegasus/Common/CIMMethod.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_Method_h
00033 #define Pegasus_Method_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/CIMParameter.h>
00040 #include <Pegasus/Common/CIMQualifier.h>
00041 #include <Pegasus/Common/CIMType.h>
00042 
00043 PEGASUS_NAMESPACE_BEGIN
00044 
00045 class Resolver;
00046 class CIMConstMethod;
00047 class CIMMethodRep;
00048 
00086 class PEGASUS_COMMON_LINKAGE CIMMethod
00087 {
00088 public:
00089 
00097     CIMMethod();
00098 
00112     CIMMethod(const CIMMethod& x);
00113 
00130     CIMMethod(
00131         const CIMName& name,
00132         CIMType type,
00133         const CIMName& classOrigin = CIMName(),
00134         Boolean propagated = false);
00135 
00139     ~CIMMethod();
00140 
00156     CIMMethod& operator=(const CIMMethod& x);
00157 
00169     const CIMName& getName() const;
00170 
00183     void setName(const CIMName& name);
00184 
00196     CIMType getType() const;
00197 
00212     void setType(CIMType type);
00213 
00222     const CIMName& getClassOrigin() const;
00223 
00233     void setClassOrigin(const CIMName& classOrigin);
00234 
00245     Boolean getPropagated() const;
00246 
00255     void setPropagated(Boolean propagated);
00256 
00271     CIMMethod& addQualifier(const CIMQualifier& x);
00272 
00286     Uint32 findQualifier(const CIMName& name) const;
00287 
00307     CIMQualifier getQualifier(Uint32 index);
00308 
00329     CIMConstQualifier getQualifier(Uint32 index) const;
00330 
00346     void removeQualifier(Uint32 index);
00347 
00361     Uint32 getQualifierCount() const;
00362 
00377     CIMMethod& addParameter(const CIMParameter& x);
00378 
00393     Uint32 findParameter(const CIMName& name) const;
00394 
00413     CIMParameter getParameter(Uint32 index);
00414 
00433     CIMConstParameter getParameter(Uint32 index) const;
00434 
00443     void removeParameter (Uint32 index);
00444 
00451     Uint32 getParameterCount() const;
00452 
00462     Boolean isUninitialized() const;
00463 
00478     Boolean identical(const CIMConstMethod& x) const;
00479 
00487     CIMMethod clone() const;
00488 
00489 private:
00490 
00491     CIMMethod(CIMMethodRep* rep);
00492 
00493     CIMMethodRep* _rep;
00494     friend class CIMConstMethod;
00495     friend class Resolver;
00496     friend class XmlWriter;
00497     friend class MofWriter;
00498     friend class BinaryStreamer;
00499 };
00500 
00508 class PEGASUS_COMMON_LINKAGE CIMConstMethod
00509 {
00510 public:
00511 
00519     CIMConstMethod();
00520 
00535     CIMConstMethod(const CIMConstMethod& x);
00536 
00551     CIMConstMethod(const CIMMethod& x);
00552 
00573     CIMConstMethod(
00574         const CIMName& name,
00575         CIMType type,
00576         const CIMName& classOrigin = CIMName(),
00577         Boolean propagated = false);
00578 
00582     ~CIMConstMethod();
00583 
00599     CIMConstMethod& operator=(const CIMConstMethod& x);
00600 
00616     CIMConstMethod& operator=(const CIMMethod& x);
00617 
00629     const CIMName& getName() const;
00630 
00642     CIMType getType() const;
00643 
00652     const CIMName& getClassOrigin() const;
00653 
00664     Boolean getPropagated() const;
00665 
00680     Uint32 findQualifier(const CIMName& name) const;
00681 
00702     CIMConstQualifier getQualifier(Uint32 index) const;
00703 
00718     Uint32 getQualifierCount() const;
00719 
00734     Uint32 findParameter(const CIMName& name) const;
00735 
00754     CIMConstParameter getParameter(Uint32 index) const;
00755 
00762     Uint32 getParameterCount() const;
00763 
00773     Boolean isUninitialized() const;
00774 
00789     Boolean identical(const CIMConstMethod& x) const;
00790 
00799     CIMMethod clone() const;
00800 
00801 private:
00802 
00803     CIMMethodRep* _rep;
00804 
00805     friend class CIMMethod;
00806     friend class CIMMethodRep;
00807     friend class XmlWriter;
00808     friend class MofWriter;
00809 };
00810 
00811 #define PEGASUS_ARRAY_T CIMMethod
00812 # include <Pegasus/Common/ArrayInter.h>
00813 #undef PEGASUS_ARRAY_T
00814 
00815 PEGASUS_NAMESPACE_END
00816 
00817 #endif /* Pegasus_Method_h */