version 1.35, 2002/08/21 00:15:44
|
version 1.39, 2003/10/22 14:26:02
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2003//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// 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 |
|
|
#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) |