(file) Return to CIMMethod.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CIMMethod.h between version 1.7 and 1.38

version 1.7, 2001/05/06 13:16:16 version 1.38, 2003/10/30 14:43:48
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2003////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
   // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
   // IBM Corp.; EMC Corporation, The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a  // Permission is hereby granted, free of charge, to any person obtaining a copy
 // copy of this software and associated documentation files (the "Software"),  // of this software and associated documentation files (the "Software"), to
 // to deal in the Software without restriction, including without limitation  // deal in the Software without restriction, including without limitation the
 // the rights to use, copy, modify, merge, publish, distribute, sublicense,  // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 // and/or sell copies of the Software, and to permit persons to whom the  // sell copies of the Software, and to permit persons to whom the Software is
 // Software is furnished to do so, subject to the following conditions:  // furnished to do so, subject to the following conditions:
 // //
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 // DEALINGS IN THE SOFTWARE.  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
   // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By:  // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //              Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 29 
Line 35 
 #define Pegasus_Method_h #define Pegasus_Method_h
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/CIMMethodRep.h>  #include <Pegasus/Common/Linkage.h>
   #include <Pegasus/Common/String.h>
   #include <Pegasus/Common/CIMName.h>
   #include <Pegasus/Common/CIMParameter.h>
   #include <Pegasus/Common/CIMQualifier.h>
   #include <Pegasus/Common/CIMType.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   class Resolver;
 class CIMConstMethod; class CIMConstMethod;
   class CIMMethodRep;
  
 /** Class CIMMethod - This class defines the operations associated with  /** The CIMMethod class is used to represent CIM methods in Pegasus. A CIMMethod
     manipulation of the Pegasus implementation of the CIM CIMMethod. Within      consists of the following entities
     this class, methods are provides for creation, deletion, and manipulation      <ul>
     of method declarations.          <li>Name of the method, a CIMName
           <li>CIMType of the method, a CIMType
     // ATTN: remove the classOrigin and propagated parameters.          <li>Optional Qualifiers for the method
           <li>Optional Parameters for the method
       </ul>
       In addition, internally, there are the following additional attributes
       that are part of a CIMMethod.
       <ul>
           <li>propagated - attributed defining whether this CIMMethod is
           propagated from a superclass.  Note that this is normally set
           as part of resolving objects when they are placed in a repository
           and is NOT automatically set when creating a local object.  It
           can only logically be set in context of the superclass of which
           this CIMMethod is defined.
           <li>ClassOrigin - attribute defining the superclass in which this
           CIMMethod was originally defined.  This is normally se as part
           of resolving Class and instances.  It is available from objects
           retrieved from the repository.
       </ul>
       CIMMethod is a shared class and uses a representation object and reference
       counting to control the lifecycle of the objects.
       @see CIMConstMethod
 */ */
 class PEGASUS_COMMON_LINKAGE CIMMethod class PEGASUS_COMMON_LINKAGE CIMMethod
 { {
 public: public:
  
     /** Creates and instantiates a CIM method. */      /** Creates a new default CIMMethod object. The object created is
     CIMMethod() : _rep(0)          empty.  Other methods such as setName() or assign must be
     {          used to provide attributes for the object
           @see CIMConstMethod()
     }      */
       CIMMethod();
     /** Creates and instantiates a CIM method from another method instance  
         @return pointer to the new method instance      /** Creates a new CIMMethod object from another method instance. This method
     */          assigns the new object to the representation in the parameter and increments the
     CIMMethod(const CIMMethod& x)          representation count.  It does NOT create a new independent object.
     {          @param x - CIMMethod object from which to create CIMMethod object.
         Inc(_rep = x._rep);          <pre>
     }              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               const CIMMethod cm1(m1);
     /** Assignment operator */          </pre>
     CIMMethod& operator=(const CIMMethod& x)      */
     {      CIMMethod(const CIMMethod& x);
         if (x._rep != _rep)  
         {      /** Creates a CIMMethod object with the specified name and other input parameters.
             Dec(_rep);          @param name CIMName defining the name for the method.
             Inc(_rep = x._rep);          @param type CIMType defining data type of method to create. See
         }  
         return *this;          @param classOrigin (optional) CIMName representing the class origin. Note
     }              that this should normally not be used.  If not provided set to
               CIMName() (Null name).
     /**  Creates a CIM method with the specified name, type, and classOrigin          @param propagated Optional flag indicating whether the definition of the
         @param name for the method              CIM Method is local to the CIM Class (respectively, Instance) in which
         @param type ATTN              it appears, or was propagated without modification from the underlying
         @param classOrigin              Subclass (respectively, Class). Default is false.
         @param propagated          <pre>
         @return  Throws IllegalName if name argument not legal CIM identifier.              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING)
           </pre>
     */     */
     CIMMethod(     CIMMethod(
         const String& name,          const CIMName& name,
         CIMType type,         CIMType type,
         const String& classOrigin = String(),          const CIMName& classOrigin = CIMName(),
         Boolean propagated = false)          Boolean propagated = false);
     {  
         _rep = new CIMMethodRep(name, type, classOrigin, propagated);  
     }  
   
     /** Desctructor. */  
     ~CIMMethod()  
     {  
         Dec(_rep);  
     }  
   
     /** CIMMethod getName - Gets the name of the method  
         @return String with the name of the method  
     */  
     const String& getName() const  
     {  
         _checkRep();  
         return _rep->getName();  
     }  
   
     /** CIMMethod setName - Set the method name  
         @param name  
         @exception IllegalName if name argument not legal CIM identifier.  
     */  
     void setName(const String& name)  
     {  
         _checkRep();  
         _rep->setName(name);  
     }  
   
     /** CIMMethod getType - gets the method type  
         @return The CIM method type for this method.  
     */  
     CIMType getType() const  
     {  
         _checkRep();  
         return _rep->getType();  
     }  
   
     /** CIMMethod setType - Sets the method type to the specified CIM method  
         type as defined in CIMType /Ref{TYPE}  
     */  
     void setType(CIMType type)  
     {  
         _checkRep();  
         _rep->setType(type);  
     }  
   
     /** CIMMethod getClassOrigin - Returns the class in which this method  
         was defined.  
         @return ATTN:  
     */  
     const String& getClassOrigin() const  
     {  
         _checkRep();  
         return _rep->getClassOrigin();  
     }  
   
     /** CIMMethod setClassOrigin - ATTN: */  
     void setClassOrigin(const String& classOrigin)  
     {  
         _checkRep();  
         _rep->setClassOrigin(classOrigin);  
     }  
   
     /** method getPropagated - ATTN: */  
     Boolean getPropagated() const  
     {  
         _checkRep();  
         return _rep->getPropagated();  
     }  
   
     /** method setPropagated - ATTN: */  
     void setPropagated(Boolean propagated)  
     {  
         _checkRep();  
         _rep->setPropagated(propagated);  
     }  
   
     /** CIMMethod addQualifier - Adds a Qualifier to the method object.  
         @param CIMQualifier to be added  
         @return Throws AlreadyExists excetpion if the qualifier already exists  
         in the method  
         @exception AlreadyExists exception  
     */  
     CIMMethod& addQualifier(const CIMQualifier& x)  
     {  
         _checkRep();  
         _rep->addQualifier(x);  
         return *this;  
     }  
   
     /** CIMMethod findQualifier - returns the position of the qualifier with  
         the given name.  
         @param name Name of qualifier to be found.  
         @return index of the parameter if found; otherwise Uint32(-1).  
     */  
     Uint32 findQualifier(const String& name)  
     {  
         _checkRep();  
         return _rep->findQualifier(name);  
     }  
   
     Uint32 findQualifier(const String& name) const  
     {  
         _checkRep();  
         return _rep->findQualifier(name);  
     }  
   
     /** CIMMethod getQualifier - Gets the CIMQualifier defined by the index  
         input as a parameter.  
         @param Index of the qualifier requested.  
         @return CIMQualifier object or exception  
         @exception OutOfBounds exception if the index is outside the range of  
         parameters available from the CIMMethod.  
     */  
     CIMQualifier getQualifier(Uint32 pos)  
     {  
         _checkRep();  
         return _rep->getQualifier(pos);  
     }  
   
     CIMConstQualifier getQualifier(Uint32 pos) const  
     {  
         _checkRep();  
         return _rep->getQualifier(pos);  
     }  
   
     /** CIMMethod getQualifierCount - Returns the number of Qualifiers attached  
         to this method.  
         @return integer representing number of Qualifiers.  
     */  
     Uint32 getQualifierCount() const  
     {  
         _checkRep();  
         return _rep->getQualifierCount();  
     }  
  
     /** CIMMethod addParameter - Adds the parameter defined by the input      /** Destructor for the CIMMethod. Since this is a shared class, the destructor
         to the CIMMethod          is automatically executed when the representation reference count becomes
     */          zero
     CIMMethod& addParameter(const CIMParameter& x)      */
     {      ~CIMMethod();
         _checkRep();  
         _rep->addParameter(x);      /** Assignment operator. Assigns one CIM method to another.  This method performs
         return *this;          the assignment by incrementing the reference count for the representation of
     }          the CIMMethod, not by creating a deep copy of the object
       */
     /** CIMMethod findParameter - Finds the parameter whose name is given      CIMMethod& operator=(const CIMMethod& x);
         by the name parameter.  
         @param name Name of parameter to be found.      /** Gets the name of the method.
         @return index of the parameter if found; otherwise Uint32(-1).          @return CIMName with the name of the method.
     */          <pre>
     Uint32 findParameter(const String& name)              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING)
     {              assert(m1.getName() == CIMName ("getHostName"));
         _checkRep();          </pre>
         return _rep->findParameter(name);      */
     }      const CIMName& getName() const;
   
     Uint32 findParameter(const String& name) const      /** Sets the method name.
     {          @param name - CIMName for the method name. Replaces any
         _checkRep();              previously defined name for this method object.
         return _rep->findParameter(name);          <pre>
     }              CIMMethod m2(CIMName ("test"), CIMTYPE_STRING);
               m2.setName(CIMName ("getVersion"));
     /** CIMMethod getParameter - ATTN: */          </pre>
     CIMParameter getParameter(Uint32 pos)      */
     {      void setName(const CIMName& name);
         _checkRep();  
         return _rep->getParameter(pos);      /** Gets the method type.
     }          @return The CIMType containing the method type for this method.
           <pre>
     /** CIMMethod getParameter - Gets the parameter defined by the index              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING)
         input as a parameter.              assert(m1.getType() == CIMTYPE_STRING);
         @param index for the parameter to be returned.          </pre>
         @return CIMParameter requested.      */
         @Exception OutOfBounds exception is thrown if the index is outside the      CIMType getType() const;
         range of available parameters  
     */      /** Sets the method type to the specified CIM method type
     CIMConstParameter getParameter(Uint32 pos) const          as defined in CIMType.
     {          @param type CIMType to be set into the method object.
         _checkRep();          <pre>
         return _rep->getParameter(pos);              CIMMethod m1();
     }              m1.setName(CIMName ("getVersion"));
               assert(m1.setType(CIMTYPE_STRING));
     /** CIMMethod getParameterCount - Gets the count of the numbeer of          </pre>
         Parameters attached to the CIMMethod.      */
         @retrun - count of the number of parameters attached to the CIMMethod.      void setType(CIMType type);
     */  
     Uint32 getParameterCount() const      /** Gets the class in which this method was defined. This information
     {          is available after the class containing the method has been
         _checkRep();          resolved and is part of the class repository.
         return _rep->getParameterCount();          @return CIMName containing the classOrigin field.
     }      */
       const CIMName& getClassOrigin() const;
     /** method resolve - ATTN: */  
     void resolve(      /** Sets the ClassOrigin attribute with the classname defined on
         DeclContext* declContext,          the input parameter. Normally this function is used internally
         const String& nameSpace,          as part of resolving the objects containing methods (classes
         const CIMConstMethod& method)          and instances).
     {      @param classOrigin - CIMName parameter defining the name
         _checkRep();      of the class origin.
         _rep->resolve(declContext, nameSpace, method);      */
     }      void setClassOrigin(const CIMName& classOrigin);
   
     /** CIMMethod resolve */      /** Tests the propagated qualifier.  The propagated attribute
     void resolve(          indicates if this method was propagated from a higher level
         DeclContext* declContext,          class.  Normally this attribute is set as part of putting
         const String& nameSpace)          classes into the repository (resolving the class).  It is
     {          available on methods in classes read from the repository and
         _checkRep();          on instances that are read from the instance repository.
         _rep->resolve(declContext, nameSpace);          @return true if method is propagated, false otherwise.
     }      */
       Boolean getPropagated() const;
     /** Returns zero if CIMMethod refers to a null pointer */  
     operator int() const      /** Sets the Propagaged Qualifier. Normally this is used by the functions
     {          that resolve classes and instances as part of the installation into
         return _rep != 0;          a repository.
     }          @param propagated Flag indicating propagation. True means that
           the method was propagated from a superclass.
     /** method toXML - placing XML encoding of this object into out arguemnt. */      */
     void toXml(Array<Sint8>& out) const      void setPropagated(Boolean propagated);
     {  
         _checkRep();      /** Adds the specified qualifier to the method and increments the
         _rep->toXml(out);          qualifier count.
     }          @param x - CIMQualifier object representing the qualifier
           to be added.
     /** method print - prints this method (in CIM encoded form). */          @return the CIMMethod object after adding the specified qualifier.
     void print(std::ostream &o=std::cout) const          @exception AlreadyExistsException if the qualifier already exists.
     {          <pre>
         _checkRep();              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
         _rep->print(o);              m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
     }          </pre>
       */
     /** CIMMethod identical - Returns true if this method is identical to the      CIMMethod& addQualifier(const CIMQualifier& x);
         one given by the argument x.  
       /** Searches for a qualifier with the specified input name.
           @param name - CIMName of the qualifier to be found.
           @return Index of the qualifier found or PEG_NOT_FOUND
           if not found.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
               assert(m1.findQualifier(CIMName ("stuff")) != PEG_NOT_FOUND);
           </pre>
       */
       Uint32 findQualifier(const CIMName& name) const;
   
       /** Gets the CIMQualifier defined by the input parameter.
           @param index - Index of the qualifier requested.
           @return CIMQualifier object representing the qualifier found.
           @exception IndexOutOfBoundsException exception if the index is
           outside the range of parameters available from the CIMMethod.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
               Uint32 posQualifier;
               posQualifier = m1.findQualifier(CIMName ("stuff"));
               CIMQualifier q = m1.getQualifier(posQualifier);
           </pre>
       */
       CIMQualifier getQualifier(Uint32 index);
   
       /** Gets the CIMQualifier defined by the input parameter.
           @param index - Index of the qualifier requested.
           @return CIMConstQualifier object representing the qualifier found.
           @exception IndexOutOfBoundsException exception if the index is
           outside the range of parameters available from the CIMMethod.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
   
               Uint32 posQualifier;
               posQualifier = m1.findQualifier(CIMName ("stuff"));
               CIMQualifier q = m1.getQualifier(posQualifier);
           </pre>
       */
       CIMConstQualifier getQualifier(Uint32 index) const;
   
       /** Removes the specified CIMQualifier from this method.
           @param index - Index of the qualifier to remove.
           @exception IndexOutOfBoundsException exception if the index is
               outside the range of parameters available from the CIMMethod.
       */
       void removeQualifier(Uint32 index);
   
       /** Returns the number of Qualifiers attached to this CIMMethod object.
           @return the number of qualifiers in the CIM Method.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
               m1.addQualifier(CIMQualifier(CIMName ("stuff2"), true));
               assert(m1.getQualifierCount() == 2);
           </pre>
       */
       Uint32 getQualifierCount() const;
   
       /** Adds the parameter defined by the input to the CIMMethod.
           @param x - CIMParameter to be added to the CIM Method.
           @return CIMMethod object after the specified parameter is added.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addParameter(CIMParameter(CIMName ("ipaddress"), CIMTYPE_STRING));
           </pre>
       */
       CIMMethod& addParameter(const CIMParameter& x);
   
       /** Finds the parameter with the specified name.
           @param name - Name of parameter to be found.
           @return Index of the parameter object found or PEG_NOT_FOUND
           if the property is not found.
           <pre>
               Uint32 posParameter;
               posParameter = m1.findParameter(CIMName ("ipaddress"));
               if (posParameter != PEG_NOT_FOUND)
                   ...
           </pre>
       */
       Uint32 findParameter(const CIMName& name) const;
   
       /** Gets the parameter defined by the specified index.
           @param index - Index for the parameter to be returned.
           @return CIMParameter object requested.
           @exception IndexOutOfBoundsException if the index is outside
               the range of available parameters.
           <pre>
               CIMParameter cp = m1.getParameter(m1.findParameter(CIMName ("ipaddress")));
           </pre>
       */
       CIMParameter getParameter(Uint32 index);
   
       /** Gets the parameter defined for the specified index.
           @param index - Index for the parameter to be returned.
           @return CIMConstParameter object requested.
           @exception IndexOutOfBoundsException if the index is outside
               the range of available parameters
       */
       CIMConstParameter getParameter(Uint32 index) const;
   
       /** Removes the CIMParameter defined by the specified index.
           @param index - Index of the parameter to be removed.
           @exception IndexOutOfBoundsException if the index is outside the
               range of parameters available from the CIMMethod.
       */
       void removeParameter (Uint32 index);
   
       /** Gets the count of Parameters defined in the CIMMethod.
           @return - count of the number of parameters attached to the CIMMethod.
       */
       Uint32 getParameterCount() const;
   
       /** Determines if the object has not been initialized.
           @return  true if the object has not been initialized,
                    false otherwise false.
        */
       Boolean isUninitialized() const;
   
       /** Compares with another CIMConstMethod.
           @param x - CIMConstMethod object for the method to be compared.
           @return true if this method is identical to the one specified.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               CIMMethod m2(CIMName ("test"), CIMTYPE_STRING);
               assert(!m1.identical(m2));
           </pre>
     */     */
     Boolean identical(const CIMConstMethod& x) const;     Boolean identical(const CIMConstMethod& x) const;
  
     /** CIMMethod clone - makes a distinct replica of this method */      /** Makes a deep copy (clone) of this method.
     CIMMethod clone() const          @return copy of the CIMMethod object.
     {      */
         return CIMMethod(_rep->clone());      CIMMethod clone() const;
     }  
  
 private: private:
  
     CIMMethod(CIMMethodRep* rep) : _rep(rep)      CIMMethod(CIMMethodRep* rep);
     {  
     }  
  
     explicit CIMMethod(const CIMConstMethod& x);      PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x);
  
     void _checkRep() const      void _checkRep() const;
     {  
         if (!_rep)  
             throw UnitializedHandle();  
     }  
  
     CIMMethodRep* _rep;     CIMMethodRep* _rep;
     friend class CIMConstMethod;     friend class CIMConstMethod;
     friend class CIMClassRep;      friend class Resolver;
       friend class XmlWriter;
       friend class MofWriter;
 }; };
  
   /** The CIMConstMethod class is used to represent CIM methods in the
       same manner as the CIMMethod class except that the const attribute
       is applied to the objects created. This class includes equivalents
       to the methods from CIMMethod that are usable in a const object including
       constructors, (i.e. getter methods) and the destructor.
       The const form of the object is used TBD
       ATTN: Complete the explanation of why.
       @see CIMMethod
   */
 class PEGASUS_COMMON_LINKAGE CIMConstMethod class PEGASUS_COMMON_LINKAGE CIMConstMethod
 { {
 public: public:
  
     CIMConstMethod() : _rep(0)      /**  Creates a new default CIMConstMethod object.
     {          @see  CIMMethod()
       */
       CIMConstMethod();
  
     }      /// @see CIMMethod()
       CIMConstMethod(const CIMConstMethod& x);
  
     CIMConstMethod(const CIMConstMethod& x)      /** Creates a new CIMConstMethod object from an
     {          existing CIMMethod object.  Creates a pointer
         Inc(_rep = x._rep);          to the existing representation.
     }          @return CIMConstMethod object reference.
           @see CIMMethod()
       */
       CIMConstMethod(const CIMMethod& x);
  
     CIMConstMethod(const CIMMethod& x)      ///
     {      CIMConstMethod(
         Inc(_rep = x._rep);      const CIMName& name,
     }      CIMType type,
       const CIMName& classOrigin = CIMName(),
       Boolean propagated = false);
  
     CIMConstMethod& operator=(const CIMConstMethod& x)      /// destructor.
     {      ~CIMConstMethod();
         if (x._rep != _rep)  
         {  
             Dec(_rep);  
             Inc(_rep = x._rep);  
         }  
         return *this;  
     }  
  
     CIMConstMethod& operator=(const CIMMethod& x)      /// assignment operator.
     {      CIMConstMethod& operator=(const CIMConstMethod& x);
         if (x._rep != _rep)  
         {  
             Dec(_rep);  
             Inc(_rep = x._rep);  
         }  
         return *this;  
     }  
  
     // Throws IllegalName if name argument not legal CIM identifier.      /// assignment operator.
       CIMConstMethod& operator=(const CIMMethod& x);
  
     CIMConstMethod(      /** gets CIMMethod name. Operation is the same as
         const String& name,          CIMMethod getName().
         CIMType type,          @see CIMMethod
         const String& classOrigin = String(),  
         Boolean propagated = false)  
     {  
         _rep = new CIMMethodRep(name, type, classOrigin, propagated);  
     }  
  
     ~CIMConstMethod()      */
     {      const CIMName& getName() const;
         Dec(_rep);  
     }  
  
     const String& getName() const      /** gets CIMMethod CIMType. Functions the same as
     {          CIMMethod getType();
         _checkRep();          @see CIMMethod
         return _rep->getName();  
     }  
  
     CIMType getType() const      */
     {      CIMType getType() const;
         _checkRep();  
         return _rep->getType();  
     }  
  
     const String& getClassOrigin() const      /**  gets ClassOrigin attribute. Functions the same
     {           as CIMMethod getClassOrigin()
         _checkRep();           @see CIMMethod
         return _rep->getClassOrigin();  
     }  
  
     Boolean getPropagated() const      */
     {      const CIMName& getClassOrigin() const;
         _checkRep();  
         return _rep->getPropagated();  
     }  
  
     Uint32 findQualifier(const String& name) const      /**  gets Propagated attribute. Functions the same
     {           as CIMMethod getPropagated()
         _checkRep();           @see CIMMethod
         return _rep->findQualifier(name);      */
     }      Boolean getPropagated() const;
  
     Uint32 getQualifier(Uint32 pos) const      /** finds qualifier based on name. Functions the
     {          same as the CIMMethod findQualifier() method.
         _checkRep();  
         return _rep->getQualifier(pos);  
     }  
  
     Uint32 getQualifierCount() const          @see CIMMethod
     {      */
         _checkRep();      Uint32 findQualifier(const CIMName& name) const;
         return _rep->getQualifierCount();  
     }  
  
     Uint32 findParameter(const String& name) const      /** gets qualifier based on index. Functions the
     {          same as the CIMMethod getQualifier() method.
         _checkRep();          @see CIMMethod
         return _rep->findParameter(name);      */
     }      CIMConstQualifier getQualifier(Uint32 index) const;
  
     CIMConstParameter getParameter(Uint32 pos) const      /** gets qualifier count based on name. Functions the
     {          same as the CIMMethod getQualifierCount() method.
         _checkRep();          @see CIMMethod
         return _rep->getParameter(pos);      */
     }      Uint32 getQualifierCount() const;
  
     Uint32 getParameterCount() const      /** finds method parameter based on name. Functions the
     {          same as the CIMMethod findParameter() method.
         _checkRep();          @see CIMMethod
         return _rep->getParameterCount();      */
     }      Uint32 findParameter(const CIMName& name) const;
  
     operator int() const { return _rep != 0; }      /** gets method parameter based on index. Functions the
           same as the CIMMethod getParameter() method.
           @see CIMMethod
       */
       CIMConstParameter getParameter(Uint32 index) const;
  
     void toXml(Array<Sint8>& out) const      /** finds method parameter count based on name. Functions the
     {          same as the CIMMethod getParameterCount() method.
         _checkRep();          @see CIMMethod
         _rep->toXml(out);      */
     }      Uint32 getParameterCount() const;
  
     void print(std::ostream &o=std::cout) const      /** Determines if CIMMethod is unitinitialized. Functions the
     {          same as corresponding funtion in CIMMethod class.
         _checkRep();          @see CIMMethod
         _rep->print(o);      */
     }      Boolean isUninitialized() const;
  
     Boolean identical(const CIMConstMethod& x) const      /** Determines if CIMMethod is identical to object define in parameter.
     {          Functions the same as corresponding funtion in CIMMethod class.
         x._checkRep();          @see CIMMethod
         _checkRep();      */
         return _rep->identical(x._rep);      Boolean identical(const CIMConstMethod& x) const;
     }  
  
     CIMMethod clone() const      /** clones a CIMMethod object by making a deep copy. Functions the
     {          same as corresponding funtion in CIMMethod class.
         return CIMMethod(_rep->clone());          @see CIMMethod
     }      */
       CIMMethod clone() const;
  
 private: private:
  
     void _checkRep() const      void _checkRep() const;
     {  
         if (!_rep)  
             throw UnitializedHandle();  
     }  
  
     CIMMethodRep* _rep;     CIMMethodRep* _rep;
  
     friend class CIMMethod;     friend class CIMMethod;
     friend class CIMMethodRep;     friend class CIMMethodRep;
       friend class XmlWriter;
       friend class MofWriter;
 }; };
  
   #define PEGASUS_ARRAY_T CIMMethod
   # include <Pegasus/Common/ArrayInter.h>
   #undef PEGASUS_ARRAY_T
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
 #endif /* Pegasus_Method_h */ #endif /* Pegasus_Method_h */


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.38

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2