(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.14 and 1.39

version 1.14, 2001/06/16 17:30:34 version 1.39, 2003/11/12 15:27:53
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2003////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 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 copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 22 
Line 25 
 // //
 // 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 30 
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. Functions are provided to manipulate the name.
           The name must be a legal name for a CIMProperty or Method {@link CIMName}.
     // ATTN: remove the classOrigin and propagated parameters.          <li>CIMType of the return value of the method, a CIMType.
           <li>Optional CIMQualifiers for the method. A method can contain zero or
           more CIMQualifiers and functions are provided to manipulate the
           list of CIMQualifiers
           <li>Optional CIMParameters for the method which are the parameters to be
           placed on a CIM Method operation.  A CIMMethod can contain zero or more
           CIMParameters and functions are provided in CIMMethod to manipulate the
           list of CIMParameters.
       </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
           completing the definition of objects (resolving) when they are placed in a
           repository and is NOT automatically set when creating a local object.  It
           is part of the context of the object within the repository.  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 set as part of
           resolving Class and instances in the context of other objects (i.e.  a
           repository).  This attribute is available from objects retrieved from the
           repository, for example and indicates the Class/Instance in the hiearchy
           (this object or a superclass or instance of a superclass)was originally
           defined.  Together the propagated and ClassOrigin attributes can be used
           to determine if methods originated with the current object or were
           inherited from higher levels in the hiearchy.
       </ul>
       Normally CIMMethods are defined in the context of CIMClasses. A CIMClass can include
       zero or more CIMMethods
       CIMMethod is a shared class so that assignment and copy operators do not
       create new copies of the data representing a CIMMethod object but point
       back to the original object and the lifecycle of the original object is
       controlled by the accumulative lifecycle of any copies and assigned
       objects.
       {@link Shared Classes}
       @see CIMConstMethod
       @see CIMParameters
       @see CIMQualifiers
       @see CIMType
 */ */
 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.  The only thing that can be done with this constructor
     {          is to copy another object into it.  Other methods such as setName, etc.
           will fail.  The object has the state unitialized which can be tested with
     }          the Unitialized method.
           @exception throws UninitializedObjectException() if any method except the copy
     /** Creates and instantiates a CIM method from another method instance          function is executed against.
         @return pointer to the new method instance          @see CIMConstMethod()
     */          @see Unitialized()
     CIMMethod(const CIMMethod& x)      */
     {      CIMMethod();
         Inc(_rep = x._rep);  
     }      /** Creates a new CIMMethod object from another CIMmethod instance. This method
           assigns the new object to the representation in the parameter and increments the
     /** Assignment operator */          representation count.  It does NOT create a new independent object but creates
     CIMMethod& operator=(const CIMMethod& x)          a reference from the assigned object to the representation of the object being
     {          assigned.
         if (x._rep != _rep)          @param x CIMMethod object from which to create CIMMethod object.
         {          <pre>
             Dec(_rep);              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
             Inc(_rep = x._rep);              const CIMMethod cm1(m1);
         }          </pre>
         return *this;      */
     }      CIMMethod(const CIMMethod& x);
   
     /**  Creates a CIM method with the specified name, type, and classOrigin      /** Creates a CIMMethod object with the specified name and other input parameters.
         @param name for the method          @param name CIMName defining the name for the method.
         @param type ATTN          @param type CIMType defining data type of method to create. See
         @param classOrigin  
         @param propagated          @param classOrigin (optional) CIMName representing the class origin. Note
         @return  Throws IllegalName if name argument not legal CIM identifier.              that this should normally not be used.  If not provided set to
               CIMName() (Null name).
           @param propagated Optional flag indicating whether the definition of the
               CIM Method is local to the CIM Class (respectively, Instance) in which
               it appears, or was propagated without modification from the a
               Superclass. Default is false.
           <pre>
               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 PEG_NOT_FOUND.  
     */  
     Uint32 findQualifier(const String& name)  
     {  
         _checkRep();  
         return _rep->findQualifier(name);  
     }  
   
     Uint32 findQualifier(const String& name) const  
     {  
         _checkRep();  
         return _rep->findQualifier(name);  
     }  
   
     /** existsQualifier - 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 PEG_NOT_FOUND.  
     */  
     Boolean existsQualifier(const String& name)  
     {  
         _checkRep();  
         return _rep->existsQualifier(name);  
     }  
   
     Boolean existsQualifier(const String& name) const  
     {  
         _checkRep();  
         return _rep->existsQualifier(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);  
     }  
   
     /** removeQualifier - Removes the CIMQualifier defined by the  
         position input as a parameter.  
         @param Position 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.  
     */  
     void removeQualifier(Uint32 pos)  
     {  
         _checkRep();  
         _rep->removeQualifier(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  
         to the CIMMethod  
     */  
     CIMMethod& addParameter(const CIMParameter& x)  
     {  
         _checkRep();  
         _rep->addParameter(x);  
         return *this;  
     }  
   
     /** CIMMethod findParameter - Finds the parameter whose name is given  
         by the name parameter.  
         @param name Name of parameter to be found.  
         @return index of the parameter if found; otherwise PEG_NOT_FOUND.  
     */  
     Uint32 findParameter(const String& name)  
     {  
         _checkRep();  
         return _rep->findParameter(name);  
     }  
   
     Uint32 findParameter(const String& name) const  
     {  
         _checkRep();  
         return _rep->findParameter(name);  
     }  
   
     /** CIMMethod getParameter - ATTN: */  
     CIMParameter getParameter(Uint32 pos)  
     {  
         _checkRep();  
         return _rep->getParameter(pos);  
     }  
   
     /** CIMMethod getParameter - Gets the parameter defined by the index  
         input as a parameter.  
         @param index for the parameter to be returned.  
         @return CIMParameter requested.  
         @Exception OutOfBounds exception is thrown if the index is outside the  
         range of available parameters  
     */  
     CIMConstParameter getParameter(Uint32 pos) const  
     {  
         _checkRep();  
         return _rep->getParameter(pos);  
     }  
   
     /** CIMMethod getParameterCount - Gets the count of the numbeer of  
         Parameters attached to the CIMMethod.  
         @retrun - count of the number of parameters attached to the CIMMethod.  
     */  
     Uint32 getParameterCount() const  
     {  
         _checkRep();  
         return _rep->getParameterCount();  
     }  
   
     /** method resolve - ATTN: */  
     void resolve(  
         DeclContext* declContext,  
         const String& nameSpace,  
         const CIMConstMethod& method)  
     {  
         _checkRep();  
         _rep->resolve(declContext, nameSpace, method);  
     }  
   
     /** CIMMethod resolve */  
     void resolve(  
         DeclContext* declContext,  
         const String& nameSpace)  
     {  
         _checkRep();  
         _rep->resolve(declContext, nameSpace);  
     }  
   
     /** Returns zero if CIMMethod refers to a null pointer */  
     operator int() const  
     {  
         return _rep != 0;  
     }  
  
     /** method toXML - placing XML encoding of this object into out arguemnt. */      /** Destructor for the CIMMethod. Since this is a shared class, the destructor
     void toXml(Array<Sint8>& out) const          is only releases when there are no more objects pointing to the representation of this
     {          object.
         _checkRep();      */
         _rep->toXml(out);      ~CIMMethod();
     }  
       /** Assignment operator. Assigns one CIM method to another.  This method performs
     /** method print - prints this method (in CIM encoded form). */          the assignment by incrementing the reference count for the representation of
     void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const          the CIMMethod, not by creating a deep copy of the object.
     {          <pre>
         _checkRep();              CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
         _rep->print(o);              CIMMethod m2 = m1;
     }          </pre>
       */
     /** CIMMethod identical - Returns true if this method is identical to the      CIMMethod& operator=(const CIMMethod& x);
         one given by the argument x.  
       /** Gets the name of the method.
           @return CIMName with the name of the method.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               assert(m1.getName() == CIMName ("getHostName"));
           </pre>
       */
       const CIMName& getName() const;
   
       /** Sets the method name.
           @param name - CIMName for the method name. Replaces any
               previously defined name for this method object.
           <pre>
               CIMMethod m2(CIMName ("test"), CIMTYPE_STRING);
               m2.setName(CIMName ("getVersion"));
           </pre>
       */
       void setName(const CIMName& name);
   
       /** Gets the method type.
           @return The CIMType containing the method type for this method.
           This is the type returned as the return value of a method operation.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               assert(m1.getType() == CIMTYPE_STRING);
           </pre>
       */
       CIMType getType() const;
   
       /** Sets the method type to the specified CIM method type
           as defined in CIMType. This is the type of the CIMValue
           that is returned on a CIMMethod operation
           @param type CIMType to be set into the method object.
           <pre>
               CIMMethod m1();
               m1.setName(CIMName ("getVersion"));
               assert(m1.setType(CIMTYPE_STRING));
           </pre>
       */
       void setType(CIMType type);
   
       /** Gets the class in which this method was defined. This information
           is available after the class containing the method has been
           resolved and is part of the class repository.
           @return CIMName containing the classOrigin field.
       */
       const CIMName& getClassOrigin() const;
   
       /** Sets the ClassOrigin attribute with the classname defined on
           the input parameter. Normally this function is used internally
           as part of the use objects containing methods (classes
           and instances) in a context such as a repository.
           @param classOrigin - CIMName parameter defining the name
           of the class origin.
       */
       void setClassOrigin(const CIMName& classOrigin);
   
       /** Tests the propagated qualifier.  The propagated attribute
           indicates if this method was propagated from a higher level
           class.  Normally this attribute is set as part of putting
           classes into the repository (resolving the class).  It is
           available on methods in classes read from the repository and
           on instances that are read from the instance repository.
           @return true if method is propagated, false otherwise.
       */
       Boolean getPropagated() const;
   
       /** Sets the Propagaged Qualifier. Normally this is used by the functions
           that resolve classes and instances as part of the installation into
           a repository.
           @param propagated Flag indicating propagation. True means that
           the method was propagated from a superclass.
       */
       void setPropagated(Boolean propagated);
   
       /** Adds the specified qualifier to the method and increments the
           qualifier count.
           @param x - CIMQualifier object representing the qualifier
           to be added.
           @return the CIMMethod object after adding the specified qualifier.
           @exception AlreadyExistsException if the qualifier already exists.
           <pre>
               CIMMethod m1(CIMName ("getHostName"), CIMTYPE_STRING);
               m1.addQualifier(CIMQualifier(CIMName ("stuff"), true));
           </pre>
       */
       CIMMethod& addQualifier(const CIMQualifier& 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);
     {  
     }  
  
     PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x);     PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x);
  
     void _checkRep() const      void _checkRep() const;
     {  
         if (!_rep)  
             ThrowUnitializedHandle();  
     }  
  
     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.
   */
 class PEGASUS_COMMON_LINKAGE CIMConstMethod class PEGASUS_COMMON_LINKAGE CIMConstMethod
 { {
 public: public:
  
     CIMConstMethod() : _rep(0)      /**  Creates a new default CIMConstMethod object.
     {          @see  CIMMethod()
       */
     }      CIMConstMethod();
   
     CIMConstMethod(const CIMConstMethod& x)  
     {  
         Inc(_rep = x._rep);  
     }  
   
     CIMConstMethod(const CIMMethod& x)  
     {  
         Inc(_rep = x._rep);  
     }  
   
     CIMConstMethod& operator=(const CIMConstMethod& x)  
     {  
         if (x._rep != _rep)  
         {  
             Dec(_rep);  
             Inc(_rep = x._rep);  
         }  
         return *this;  
     }  
  
     CIMConstMethod& operator=(const CIMMethod& x)      /// @see CIMMethod()
     {      CIMConstMethod(const CIMConstMethod& x);
         if (x._rep != _rep)  
         {  
             Dec(_rep);  
             Inc(_rep = x._rep);  
         }  
         return *this;  
     }  
  
     // Throws IllegalName if name argument not legal CIM identifier.      /** Creates a new CIMConstMethod object from an
           existing CIMMethod object.  Creates a pointer
           to the existing representation.
           @return CIMConstMethod object reference.
           @see CIMMethod()
       */
       CIMConstMethod(const CIMMethod& x);
  
       ///
     CIMConstMethod(     CIMConstMethod(
         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);  
     }  
  
     ~CIMConstMethod()      /// destructor. CIMMethod objects are destroyed when
     {      ~CIMConstMethod();
         Dec(_rep);  
     }  
  
     const String& getName() const      /** assigns one CIMMethod object to another. Because this
     {      is a shared class, an assignment does not create a copy to
         _checkRep();      the assigned object but sets a refernce in the assigned object
         return _rep->getName();      to the same object as the CIMMethod object that was assigned.
     }      Note that the return is really CIMConstMethod, not CIMMethod to
       prevent unplanned modification of the object
       @param x CIMMethod object that is to be assigned to another
       CIMMethod object.
       <pre>
       CIMMethod cm1("putthing");
       </pre>
       */
       CIMConstMethod& operator=(const CIMConstMethod& x);
  
     CIMType getType() const      /// assignment operator.
     {      CIMConstMethod& operator=(const CIMMethod& x);
         _checkRep();  
         return _rep->getType();  
     }  
  
     const String& getClassOrigin() const      /** gets CIMMethod name. Operation is the same as
     {          CIMMethod getName().
         _checkRep();          @see CIMMethod
         return _rep->getClassOrigin();      */
     }      const CIMName& getName() const;
  
     Boolean getPropagated() const      /** gets CIMMethod CIMType. Functions the same as
     {          CIMMethod getType();
         _checkRep();          @see CIMMethod
         return _rep->getPropagated();      */
     }      CIMType getType() const;
  
     Uint32 findQualifier(const String& name) const      /**  gets ClassOrigin attribute. Functions the same
     {           as CIMMethod getClassOrigin()
         _checkRep();           @see CIMMethod
         return _rep->findQualifier(name);      */
     }      const CIMName& getClassOrigin() const;
  
     Uint32 getQualifier(Uint32 pos) const      /**  gets Propagated attribute. Functions the same
     {           as CIMMethod getPropagated()
         _checkRep();           @see CIMMethod
         return _rep->getQualifier(pos);      */
     }      Boolean getPropagated() const;
  
     Uint32 getQualifierCount() const      /** finds qualifier based on name. Functions the
     {          same as the CIMMethod findQualifier() method.
         _checkRep();  
         return _rep->getQualifierCount();  
     }  
  
     Uint32 findParameter(const String& name) const          @see CIMMethod
     {      */
         _checkRep();      Uint32 findQualifier(const CIMName& name) const;
         return _rep->findParameter(name);  
     }  
  
     CIMConstParameter getParameter(Uint32 pos) const      /** gets qualifier based on index. Functions the
     {          same as the CIMMethod getQualifier() method.
         _checkRep();          @see CIMMethod
         return _rep->getParameter(pos);      */
     }      CIMConstQualifier getQualifier(Uint32 index) const;
  
     Uint32 getParameterCount() const      /** gets qualifier count based on name. Functions the
     {          same as the CIMMethod getQualifierCount() method.
         _checkRep();          @see CIMMethod
         return _rep->getParameterCount();      */
     }      Uint32 getQualifierCount() const;
  
     operator int() const { return _rep != 0; }      /** finds method parameter based on name. Functions the
           same as the CIMMethod findParameter() method.
           @see CIMMethod
       */
       Uint32 findParameter(const CIMName& name) const;
  
     void toXml(Array<Sint8>& out) const      /** gets method parameter based on index. Functions the
     {          same as the CIMMethod getParameter() method.
         _checkRep();          @see CIMMethod
         _rep->toXml(out);      */
     }      CIMConstParameter getParameter(Uint32 index) const;
  
     void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const      /** finds method parameter count based on name. Functions the
     {          same as the CIMMethod getParameterCount() method.
         _checkRep();          @see CIMMethod
         _rep->print(o);      */
     }      Uint32 getParameterCount() const;
  
     Boolean identical(const CIMConstMethod& x) const      /** Determines if CIMMethod is unitinitialized. Functions the
     {          same as corresponding funtion in CIMMethod class.
         x._checkRep();          @see CIMMethod
         _checkRep();      */
         return _rep->identical(x._rep);      Boolean isUninitialized() const;
     }  
  
     CIMMethod clone() const      /** Determines if CIMMethod is identical to object define in parameter.
     {          Functions the same as corresponding funtion in CIMMethod class.
         return CIMMethod(_rep->clone());          @see CIMMethod
     }      */
       Boolean identical(const CIMConstMethod& x) const;
   
       /** clones a CIMMethod object by making a deep copy. Functions the
           same as corresponding funtion in CIMMethod class.
           @see CIMMethod
       */
       CIMMethod clone() const;
  
 private: private:
  
     void _checkRep() const      void _checkRep() const;
     {  
         if (!_rep)  
             ThrowUnitializedHandle();  
     }  
  
     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 #define PEGASUS_ARRAY_T CIMMethod
 # include "ArrayInter.h"  # include <Pegasus/Common/ArrayInter.h>
 #undef PEGASUS_ARRAY_T #undef PEGASUS_ARRAY_T
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.14  
changed lines
  Added in v.1.39

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2