version 1.7, 2001/05/06 13:16:16
|
version 1.17, 2001/07/10 22:31:09
|
|
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM |
// | // |
// 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. |
// | // |
//============================================================================== | //============================================================================== |
// | // |
|
|
/** CIMMethod findQualifier - returns the position of the qualifier with | /** CIMMethod findQualifier - returns the position of the qualifier with |
the given name. | the given name. |
@param name Name of qualifier to be found. | @param name Name of qualifier to be found. |
@return index of the parameter if found; otherwise Uint32(-1). |
@return index of the parameter if found; otherwise PEG_NOT_FOUND. |
*/ | */ |
Uint32 findQualifier(const String& name) | Uint32 findQualifier(const String& name) |
{ | { |
|
|
return _rep->findQualifier(name); | 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 | /** CIMMethod getQualifier - Gets the CIMQualifier defined by the index |
input as a parameter. | input as a parameter. |
@param Index of the qualifier requested. | @param Index of the qualifier requested. |
|
|
return _rep->getQualifier(pos); | 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 | /** CIMMethod getQualifierCount - Returns the number of Qualifiers attached |
to this method. | to this method. |
@return integer representing number of Qualifiers. | @return integer representing number of Qualifiers. |
|
|
/** CIMMethod findParameter - Finds the parameter whose name is given | /** CIMMethod findParameter - Finds the parameter whose name is given |
by the name parameter. | by the name parameter. |
@param name Name of parameter to be found. | @param name Name of parameter to be found. |
@return index of the parameter if found; otherwise Uint32(-1). |
@return index of the parameter if found; otherwise PEG_NOT_FOUND. |
*/ | */ |
Uint32 findParameter(const String& name) | Uint32 findParameter(const String& name) |
{ | { |
|
|
} | } |
| |
/** method print - prints this method (in CIM encoded form). */ | /** method print - prints this method (in CIM encoded form). */ |
void print(std::ostream &o=std::cout) const |
void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const |
{ | { |
_checkRep(); | _checkRep(); |
_rep->print(o); | _rep->print(o); |
|
|
{ | { |
} | } |
| |
explicit CIMMethod(const CIMConstMethod& x); |
PEGASUS_EXPLICIT CIMMethod(const CIMConstMethod& x); |
| |
void _checkRep() const | void _checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
throw UnitializedHandle(); |
ThrowUnitializedHandle(); |
} | } |
| |
CIMMethodRep* _rep; | CIMMethodRep* _rep; |
|
|
_rep->toXml(out); | _rep->toXml(out); |
} | } |
| |
void print(std::ostream &o=std::cout) const |
void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const |
{ | { |
_checkRep(); | _checkRep(); |
_rep->print(o); | _rep->print(o); |
|
|
void _checkRep() const | void _checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
throw UnitializedHandle(); |
ThrowUnitializedHandle(); |
} | } |
| |
CIMMethodRep* _rep; | CIMMethodRep* _rep; |
|
|
friend class CIMMethodRep; | friend class CIMMethodRep; |
}; | }; |
| |
|
#define PEGASUS_ARRAY_T CIMMethod |
|
# include "ArrayInter.h" |
|
#undef PEGASUS_ARRAY_T |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif /* Pegasus_Method_h */ | #endif /* Pegasus_Method_h */ |