version 1.40, 2008/05/07 20:18:45
|
version 1.41, 2008/10/22 08:19:40
|
|
|
#include <Pegasus/Common/CIMValue.h> | #include <Pegasus/Common/CIMValue.h> |
#include <Pegasus/Common/CIMQualifier.h> | #include <Pegasus/Common/CIMQualifier.h> |
#include <Pegasus/Common/CIMQualifierList.h> | #include <Pegasus/Common/CIMQualifierList.h> |
#include <Pegasus/Common/Sharable.h> |
|
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
#include <Pegasus/Common/OrderedSet.h> | #include <Pegasus/Common/OrderedSet.h> |
| |
|
|
class CIMConstProperty; | class CIMConstProperty; |
class DeclContext; | class DeclContext; |
| |
class CIMPropertyRep : public Sharable |
class CIMPropertyRep |
{ | { |
public: | public: |
| |
|
|
const CIMName& classOrigin, | const CIMName& classOrigin, |
Boolean propagated); | Boolean propagated); |
| |
~CIMPropertyRep() |
|
{ |
|
} |
|
|
|
const CIMName& getName() const | const CIMName& getName() const |
{ | { |
return _name; | return _name; |
|
|
| |
void decreaseOwnerCount() | void decreaseOwnerCount() |
{ | { |
_ownerCount++; |
_ownerCount--; |
return; | return; |
} | } |
| |
|
|
return new CIMPropertyRep(*this, true); | return new CIMPropertyRep(*this, true); |
} | } |
| |
|
void Inc() |
|
{ |
|
_refCounter++; |
|
} |
|
|
|
void Dec() |
|
{ |
|
if (_refCounter.decAndTestIfZero()) |
|
delete this; |
|
} |
|
|
private: | private: |
| |
// Cloning constructor: | // Cloning constructor: |
|
|
CIMQualifierList _qualifiers; | CIMQualifierList _qualifiers; |
Uint32 _nameTag; | Uint32 _nameTag; |
| |
|
// reference counter as member to avoid |
|
// virtual function resolution overhead |
|
AtomicInt _refCounter; |
|
|
// Number of containers in which this property is a member. Adding a | // Number of containers in which this property is a member. Adding a |
// property to a container increments this count. Removing a property | // property to a container increments this count. Removing a property |
// from a container decrements this count. When this count is non-zero, | // from a container decrements this count. When this count is non-zero, |