version 1.11, 2001/06/16 23:09:59
|
version 1.17, 2002/05/03 01:28:14
|
|
|
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
#include <Pegasus/Common/Config.h> |
#include <cassert> | #include <cassert> |
#include "CIMMethod.h" | #include "CIMMethod.h" |
#include "Indentor.h" | #include "Indentor.h" |
|
|
nameSpace, | nameSpace, |
CIMScope::METHOD, | CIMScope::METHOD, |
false, | false, |
inheritedMethod._rep->_qualifiers); |
inheritedMethod._rep->_qualifiers, |
|
true); |
| |
// Validate each of the parameters: | // Validate each of the parameters: |
| |
|
|
nameSpace, | nameSpace, |
CIMScope::METHOD, | CIMScope::METHOD, |
false, | false, |
dummy); |
dummy, |
|
true); |
| |
// Validate each of the parameters: | // Validate each of the parameters: |
| |
|
|
os << tmp.getData() << PEGASUS_STD(endl); | os << tmp.getData() << PEGASUS_STD(endl); |
} | } |
| |
|
/** |
|
The BNF for this is; |
|
methodDeclaration = [ qualifierList ] dataType methodName |
|
"(" [ parameterList ] ")" ";" |
|
|
|
parameterList = parameter *( "," parameter ) |
|
Format with qualifiers on one line and declaration on another. Start |
|
with newline but none at the end. |
|
*/ |
|
void CIMMethodRep::toMof(Array<Sint8>& out) const //ATTNKS: |
|
{ |
|
// Output the qualifier list starting on new line |
|
if (_qualifiers.getCount()) |
|
out << "\n"; |
|
|
|
_qualifiers.toMof(out); |
|
|
|
// output the type, MethodName and ParmeterList left enclosure |
|
out << "\n" << TypeToString(_type) << " " << _name << "("; |
|
|
|
// output the param list separated by commas. |
|
|
|
for (Uint32 i = 0, n = _parameters.size(); i < n; i++) |
|
{ |
|
// If not first, output comma separator |
|
if (i) |
|
out << ", "; |
|
|
|
_parameters[i].toMof(out); |
|
} |
|
|
|
// output the parameterlist and method terminator |
|
out << ");"; |
|
} |
|
|
|
|
CIMMethodRep::CIMMethodRep() | CIMMethodRep::CIMMethodRep() |
{ | { |
| |
|
|
_parameters.append(x._parameters[i].clone()); | _parameters.append(x._parameters[i].clone()); |
} | } |
| |
CIMMethodRep& CIMMethodRep::operator=(const CIMMethodRep& x) |
|
{ |
|
return *this; |
|
} |
|
|
|
Boolean CIMMethodRep::identical(const CIMMethodRep* x) const | Boolean CIMMethodRep::identical(const CIMMethodRep* x) const |
{ | { |
if (_name != x->_name) | if (_name != x->_name) |