version 1.35, 2002/08/21 00:15:44
|
version 1.37.14.1, 2003/08/13 19:39:50
|
|
|
#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 |
| |
|
|
if (x.isUninitialized()) | if (x.isUninitialized()) |
throw UninitializedObjectException(); | throw UninitializedObjectException(); |
| |
if (findParameter(x.getName()) != PEG_NOT_FOUND) |
if (findParameter(x.getName()) != PEG_NOT_FOUND){ |
throw AlreadyExistsException("parameter \"" + x.getName() + "\""); |
//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); |
} | } |
|
|
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 IndexOutOfBoundsException(); | 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 IndexOutOfBoundsException(); | throw IndexOutOfBoundsException(); |
| |
_parameters.remove (pos); |
_parameters.remove (index); |
} | } |
| |
Uint32 CIMMethodRep::getParameterCount() const | Uint32 CIMMethodRep::getParameterCount() const |
|
|
| |
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) |