version 1.26.10.1, 2005/09/30 16:28:15
|
version 1.33, 2008/03/05 21:31:45
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec 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 |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// Adriann Schuur (schuur@de.ibm.com) PEP 164 |
|
// Dave Sudlik, IBM (dsudlik@us.ibm.com) |
|
// David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_CIMObjectRep_h | #ifndef Pegasus_CIMObjectRep_h |
|
|
#include <Pegasus/Common/CIMQualifier.h> | #include <Pegasus/Common/CIMQualifier.h> |
#include <Pegasus/Common/CIMQualifierList.h> | #include <Pegasus/Common/CIMQualifierList.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
|
#include <Pegasus/Common/OrderedSet.h> |
|
#include <Pegasus/Common/CIMPropertyRep.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
| |
This class contains what is common to CIMClass and CIMInstance. | This class contains what is common to CIMClass and CIMInstance. |
*/ | */ |
class PEGASUS_COMMON_LINKAGE CIMObjectRep : public Sharable |
class CIMObjectRep : public Sharable |
{ | { |
public: | public: |
| |
|
|
| |
virtual void addProperty(const CIMProperty& x); | virtual void addProperty(const CIMProperty& x); |
| |
Uint32 findProperty(const CIMName& name) const; |
Uint32 findProperty(const CIMName& name, Uint32 nameTag) const |
|
{ |
|
return _properties.find(name, nameTag); |
|
} |
|
|
|
Uint32 findProperty(const CIMName& name) const |
|
{ |
|
return _properties.find(name, generateCIMNameTag(name)); |
|
} |
| |
CIMProperty getProperty(Uint32 index); | CIMProperty getProperty(Uint32 index); |
| |
|
|
| |
void removeProperty(Uint32 index); | void removeProperty(Uint32 index); |
| |
Uint32 getPropertyCount() const; |
Uint32 getPropertyCount() const |
|
{ |
|
return _properties.size(); |
|
} |
| |
virtual Boolean identical(const CIMObjectRep* x) const; | virtual Boolean identical(const CIMObjectRep* x) const; |
| |
virtual void toXml(Buffer& out) const = 0; |
|
|
|
virtual void toMof(Buffer& out) const = 0; |
|
|
|
virtual CIMObjectRep* clone() const = 0; | virtual CIMObjectRep* clone() const = 0; |
| |
protected: | protected: |
| |
CIMObjectRep(); |
|
|
|
CIMObjectRep(const CIMObjectRep& x); | CIMObjectRep(const CIMObjectRep& x); |
| |
CIMObjectPath _reference; | CIMObjectPath _reference; |
CIMQualifierList _qualifiers; | CIMQualifierList _qualifiers; |
Array<CIMProperty> _properties; |
typedef OrderedSet<CIMProperty, |
|
CIMPropertyRep, |
|
PEGASUS_PROPERTY_ORDEREDSET_HASHSIZE> PropertySet; |
|
PropertySet _properties; |
Boolean _resolved; | Boolean _resolved; |
| |
private: | private: |
| |
// This method is declared and made private so that the compiler does |
CIMObjectRep(); // Unimplemented |
// not implicitly define a default copy constructor. |
CIMObjectRep& operator=(const CIMObjectRep& x); // Unimplemented |
CIMObjectRep& operator=(const CIMObjectRep& x) |
|
{ |
|
//PEGASUS_ASSERT(0); |
|
return *this; |
|
} |
|
| |
friend class CIMObject; | friend class CIMObject; |
friend class BinaryStreamer; | friend class BinaryStreamer; |