version 1.19, 2002/07/19 23:40:13
|
version 1.28, 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 |
|
|
} | } |
| |
CIMProperty::CIMProperty( | CIMProperty::CIMProperty( |
const String& name, |
const CIMName& name, |
const CIMValue& value, | const CIMValue& value, |
Uint32 arraySize, | Uint32 arraySize, |
const String& referenceClassName, |
const CIMName& referenceClassName, |
const String& classOrigin, |
const CIMName& classOrigin, |
Boolean propagated) | Boolean propagated) |
{ | { |
_rep = new CIMPropertyRep(name, value, | _rep = new CIMPropertyRep(name, value, |
|
|
return *this; | return *this; |
} | } |
| |
const String& CIMProperty::getName() const |
const CIMName& CIMProperty::getName() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getName(); | return _rep->getName(); |
} | } |
| |
void CIMProperty::setName(const String& name) |
void CIMProperty::setName(const CIMName& name) |
{ | { |
_checkRep(); | _checkRep(); |
_rep->setName(name); | _rep->setName(name); |
|
|
return _rep->getArraySize(); | return _rep->getArraySize(); |
} | } |
| |
const String& CIMProperty::getReferenceClassName() const |
const CIMName& CIMProperty::getReferenceClassName() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getReferenceClassName(); | return _rep->getReferenceClassName(); |
} | } |
| |
const String& CIMProperty::getClassOrigin() const |
const CIMName& CIMProperty::getClassOrigin() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getClassOrigin(); | return _rep->getClassOrigin(); |
} | } |
| |
void CIMProperty::setClassOrigin(const String& classOrigin) |
void CIMProperty::setClassOrigin(const CIMName& classOrigin) |
{ | { |
_checkRep(); | _checkRep(); |
_rep->setClassOrigin(classOrigin); | _rep->setClassOrigin(classOrigin); |
|
|
return *this; | return *this; |
} | } |
| |
Uint32 CIMProperty::findQualifier(const String& name) const |
Uint32 CIMProperty::findQualifier(const CIMName& name) const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->findQualifier(name); | return _rep->findQualifier(name); |
} | } |
| |
CIMQualifier CIMProperty::getQualifier(Uint32 pos) |
CIMQualifier CIMProperty::getQualifier(Uint32 index) |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getQualifier(pos); |
return _rep->getQualifier(index); |
} | } |
| |
CIMConstQualifier CIMProperty::getQualifier(Uint32 pos) const |
CIMConstQualifier CIMProperty::getQualifier(Uint32 index) const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getQualifier(pos); |
return _rep->getQualifier(index); |
} | } |
| |
void CIMProperty::removeQualifier(Uint32 pos) |
void CIMProperty::removeQualifier(Uint32 index) |
{ | { |
_checkRep(); | _checkRep(); |
_rep->removeQualifier(pos); |
_rep->removeQualifier(index); |
} | } |
| |
Uint32 CIMProperty::getQualifierCount() const | Uint32 CIMProperty::getQualifierCount() const |
|
|
return _rep->getQualifierCount(); | return _rep->getQualifierCount(); |
} | } |
| |
void CIMProperty::resolve( |
Boolean CIMProperty::isUninitialized() const |
DeclContext* declContext, |
|
const String& nameSpace, |
|
Boolean isInstancePart, |
|
const CIMConstProperty& property, |
|
Boolean propagateQualifiers) |
|
{ |
|
_checkRep(); |
|
_rep->resolve(declContext, |
|
nameSpace, isInstancePart, property, propagateQualifiers); |
|
} |
|
|
|
void CIMProperty::resolve( |
|
DeclContext* declContext, |
|
const String& nameSpace, |
|
Boolean isInstancePart, |
|
Boolean propagateQualifiers) |
|
{ |
|
_checkRep(); |
|
_rep->resolve( |
|
declContext, nameSpace, isInstancePart, propagateQualifiers); |
|
} |
|
|
|
Boolean CIMProperty::isNull() const |
|
{ | { |
return (_rep == 0)? true : false; | return (_rep == 0)? true : false; |
} | } |
|
|
return _rep->identical(x._rep); | return _rep->identical(x._rep); |
} | } |
| |
Boolean CIMProperty::isKey() const |
CIMProperty CIMProperty::clone() const |
{ | { |
_checkRep(); |
return CIMProperty(_rep->clone()); |
return _rep->isKey(); |
|
} |
|
|
|
CIMProperty CIMProperty::clone(Boolean propagateQualifiers) const |
|
{ |
|
return CIMProperty(_rep->clone(propagateQualifiers)); |
|
} | } |
| |
void CIMProperty::_checkRep() const | void CIMProperty::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUninitializedHandle(); |
throw UninitializedObjectException(); |
} | } |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
|
|
Inc(_rep = x._rep); | Inc(_rep = x._rep); |
} | } |
| |
// Throws IllegalName if name argument not legal CIM identifier. |
|
|
|
CIMConstProperty::CIMConstProperty( | CIMConstProperty::CIMConstProperty( |
const String& name, |
const CIMName& name, |
const CIMValue& value, | const CIMValue& value, |
Uint32 arraySize, | Uint32 arraySize, |
const String& referenceClassName, |
const CIMName& referenceClassName, |
const String& classOrigin, |
const CIMName& classOrigin, |
Boolean propagated) | Boolean propagated) |
{ | { |
_rep = new CIMPropertyRep(name, value, | _rep = new CIMPropertyRep(name, value, |
|
|
return *this; | return *this; |
} | } |
| |
const String& CIMConstProperty::getName() const |
const CIMName& CIMConstProperty::getName() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getName(); | return _rep->getName(); |
|
|
return _rep->getArraySize(); | return _rep->getArraySize(); |
} | } |
| |
const String& CIMConstProperty::getReferenceClassName() const |
const CIMName& CIMConstProperty::getReferenceClassName() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getReferenceClassName(); | return _rep->getReferenceClassName(); |
} | } |
| |
const String& CIMConstProperty::getClassOrigin() const |
const CIMName& CIMConstProperty::getClassOrigin() const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getClassOrigin(); | return _rep->getClassOrigin(); |
|
|
return _rep->getPropagated(); | return _rep->getPropagated(); |
} | } |
| |
Uint32 CIMConstProperty::findQualifier(const String& name) const |
Uint32 CIMConstProperty::findQualifier(const CIMName& name) const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->findQualifier(name); | return _rep->findQualifier(name); |
} | } |
| |
CIMConstQualifier CIMConstProperty::getQualifier(Uint32 pos) const |
CIMConstQualifier CIMConstProperty::getQualifier(Uint32 index) const |
{ | { |
_checkRep(); | _checkRep(); |
return _rep->getQualifier(pos); |
return _rep->getQualifier(index); |
} | } |
| |
Uint32 CIMConstProperty::getQualifierCount() const | Uint32 CIMConstProperty::getQualifierCount() const |
|
|
return _rep->getQualifierCount(); | return _rep->getQualifierCount(); |
} | } |
| |
Boolean CIMConstProperty::isNull() const |
Boolean CIMConstProperty::isUninitialized() const |
{ | { |
return (_rep == 0)? true : false; | return (_rep == 0)? true : false; |
} | } |
|
|
return _rep->identical(x._rep); | return _rep->identical(x._rep); |
} | } |
| |
Boolean CIMConstProperty::isKey() const |
CIMProperty CIMConstProperty::clone() const |
{ |
|
_checkRep(); |
|
return _rep->isKey(); |
|
} |
|
|
|
CIMProperty CIMConstProperty::clone(Boolean propagateQualifiers) const |
|
{ | { |
return CIMProperty(_rep->clone(propagateQualifiers)); |
return CIMProperty(_rep->clone()); |
} | } |
| |
void CIMConstProperty::_checkRep() const | void CIMConstProperty::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUninitializedHandle(); |
throw UninitializedObjectException(); |
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |