version 1.20, 2002/07/25 16:19:45
|
version 1.21, 2002/07/30 16:14:53
|
|
|
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
CIMParameterRep::CIMParameterRep( | CIMParameterRep::CIMParameterRep( |
const String& name, |
const CIMName& name, |
CIMType type, | CIMType type, |
Boolean isArray, | Boolean isArray, |
Uint32 arraySize, | Uint32 arraySize, |
const String& referenceClassName) |
const CIMName& referenceClassName) |
: _name(name), _type(type), | : _name(name), _type(type), |
_isArray(isArray), _arraySize(arraySize), | _isArray(isArray), _arraySize(arraySize), |
_referenceClassName(referenceClassName) | _referenceClassName(referenceClassName) |
|
|
if (_arraySize && !_isArray) | if (_arraySize && !_isArray) |
throw IncompatibleTypes(); | throw IncompatibleTypes(); |
| |
if (referenceClassName.size()) |
if (!referenceClassName.isNull()) |
{ | { |
if (!CIMName::legal(referenceClassName)) |
|
throw IllegalName(); |
|
|
|
if (_type != CIMTYPE_REFERENCE) | if (_type != CIMTYPE_REFERENCE) |
{ | { |
throw ExpectedReferenceValue(); | throw ExpectedReferenceValue(); |
|
|
} | } |
else | else |
{ | { |
|
|
// ATTN: revisit this later! | // ATTN: revisit this later! |
#if 0 | #if 0 |
if (_type == CIMTYPE_REFERENCE) | if (_type == CIMTYPE_REFERENCE) |
|
|
| |
} | } |
| |
void CIMParameterRep::setName(const String& name) |
void CIMParameterRep::setName(const CIMName& name) |
{ | { |
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
throw IllegalName(); | throw IllegalName(); |
|
|
| |
void CIMParameterRep::resolve( | void CIMParameterRep::resolve( |
DeclContext* declContext, | DeclContext* declContext, |
const String& nameSpace) |
const CIMNamespaceName& nameSpace) |
{ | { |
// Validate the qualifiers of the method (according to | // Validate the qualifiers of the method (according to |
// superClass's method with the same name). This method | // superClass's method with the same name). This method |
|
|
{ | { |
_type = type; | _type = type; |
| |
if (_referenceClassName.size() == 0 && _type == CIMTYPE_REFERENCE) |
if (_referenceClassName.isNull() && _type == CIMTYPE_REFERENCE) |
{ | { |
throw MissingReferenceClassName(); | throw MissingReferenceClassName(); |
} | } |