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

Diff for /pegasus/src/Pegasus/Common/CIMMethodRep.cpp between version 1.32 and 1.37.14.1

version 1.32, 2002/08/14 17:41:16 version 1.37.14.1, 2003/08/13 19:39:50
Line 37 
Line 37 
 #include "CIMScope.h" #include "CIMScope.h"
 #include "XmlWriter.h" #include "XmlWriter.h"
 #include "MofWriter.h" #include "MofWriter.h"
   #include <Pegasus/Common/MessageLoader.h> //l10n
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 48 
Line 49 
     : _name(name), _type(type),     : _name(name), _type(type),
     _classOrigin(classOrigin), _propagated(propagated)     _classOrigin(classOrigin), _propagated(propagated)
 { {
     if (type == CIMTYPE_NONE)  
         throw NullType();  
 } }
  
 CIMMethodRep::~CIMMethodRep() CIMMethodRep::~CIMMethodRep()
Line 70 
Line 69 
 void CIMMethodRep::addParameter(const CIMParameter& x) void CIMMethodRep::addParameter(const CIMParameter& x)
 { {
     if (x.isUninitialized())     if (x.isUninitialized())
         throw UninitializedObject();          throw UninitializedObjectException();
  
     if (findParameter(x.getName()) != PEG_NOT_FOUND)      if (findParameter(x.getName()) != PEG_NOT_FOUND){
         throw AlreadyExists();          //l10n
                   //throw AlreadyExistsException
               //("parameter \"" + x.getName().getString () + "\"");
           MessageLoaderParms parms("Common.CIMMethodRep.PARAMETER",
                                                            "parameter \"$0\"",
                                                            x.getName().getString());
           throw AlreadyExistsException(parms);
       }
  
     _parameters.append(x);     _parameters.append(x);
 } }
Line 89 
Line 95 
     return PEG_NOT_FOUND;     return PEG_NOT_FOUND;
 } }
  
 CIMParameter CIMMethodRep::getParameter(Uint32 pos)  CIMParameter CIMMethodRep::getParameter(Uint32 index)
 { {
     if (pos >= _parameters.size())      if (index >= _parameters.size())
         throw OutOfBounds();          throw IndexOutOfBoundsException();
  
     return _parameters[pos];      return _parameters[index];
 } }
  
 void CIMMethodRep::removeParameter (Uint32 pos)  void CIMMethodRep::removeParameter(Uint32 index)
 { {
     if (pos >= _parameters.size ())      if (index >= _parameters.size())
         throw OutOfBounds ();          throw IndexOutOfBoundsException();
  
     _parameters.remove (pos);      _parameters.remove (index);
 } }
  
 Uint32 CIMMethodRep::getParameterCount() const Uint32 CIMMethodRep::getParameterCount() const
Line 251 
Line 257 
  
 Boolean CIMMethodRep::identical(const CIMMethodRep* x) const Boolean CIMMethodRep::identical(const CIMMethodRep* x) const
 { {
     if (_name != x->_name)      if (!_name.equal (x->_name))
         return false;         return false;
  
     if (_type != x->_type)     if (_type != x->_type)
Line 275 
Line 281 
 void CIMMethodRep::setType(CIMType type) void CIMMethodRep::setType(CIMType type)
 { {
     _type = type;     _type = type;
   
     if (type == CIMTYPE_NONE)  
         throw NullType();  
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.32  
changed lines
  Added in v.1.37.14.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2