OW_NAMESPACE::CIMInstance Class Reference

The CIMInstance class encapsulates all information pertinent to a CIMInstance. More...

#include <OW_CIMInstance.hpp>

Inheritance diagram for OW_NAMESPACE::CIMInstance:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::CIMInstance:

Collaboration graph
[legend]
List of all members.

Public Types

typedef COWIntrusiveReference<
INSTData > CIMInstance::* 
safe_bool
enum  { SERIALIZATION_VERSION = 2 }
enum  EErrorCodes { E_INSTANCE_HAS_NO_SUCH_PROPERTY }

Public Member Functions

 CIMInstance ()
 Default ctor.
 CIMInstance (CIMNULL_t)
 This CIMInstance object will be NULL.
 CIMInstance (const CIMInstance &arg)
 Copy ctor.
 CIMInstance (const CIMName &name)
 Create an CIMInstance.
 CIMInstance (const char *name)
 Create an CIMInstance.
 ~CIMInstance ()
 Destroy this CIMInstance object.
virtual void setNull ()
 Set this to a null object.
CIMInstanceoperator= (const CIMInstance &arg)
 Assignment operator.
String getClassName () const
CIMInstancesetKeys (const CIMPropertyArray &keys)
 Set the keys for this instance.
CIMInstancesetClassName (const CIMName &name)
 Sets the class name for this instance.
String getLanguage () const
CIMInstancesetLanguage (const String &language)
 Set the language this CIMClass is using.
CIMQualifierArray getQualifiers () const
CIMQualifier getQualifier (const CIMName &qualName) const
 Get the qualifier associated with the given name.
CIMInstanceremoveQualifier (const CIMName &qualName)
 Remove the named qualifier from this CIMInstance.
CIMInstancesetQualifiers (const CIMQualifierArray &quals)
 Set the qualifiers for this instance.
CIMInstancesetQualifier (const CIMQualifier &qual)
 Set/Add a qualifier to this instance's qualifier list.
CIMPropertyArray getProperties (Int32 valueDataType=CIMDataType::INVALID) const
 Get all the properties of a specific datatype from this instance.
CIMInstancesetProperties (const CIMPropertyArray &props)
 Set the properties associated with this instance.
CIMProperty getProperty (const CIMName &name, const CIMName &originClass) const
 Get the property identified by a given name and origin class.
CIMProperty getProperty (const CIMName &name) const
 Gets a property with the specified name.
CIMProperty getPropertyT (const CIMName &name) const
 Gets a property with the specified name.
CIMValue getPropertyValue (const CIMName &name) const
 Gets a property's value.
bool propertyHasValue (const CIMName &name) const
 Test whether a property exists and has a non-NULL value.
CIMPropertyArray getKeyValuePairs () const
CIMInstanceupdatePropertyValues (const CIMPropertyArray &props)
 Update the property values for this instance.
CIMInstanceupdatePropertyValue (const CIMProperty &prop)
 Update a single property value.
CIMInstanceupdatePropertyValue (const CIMName &name, const CIMValue &cv)
 Update a single property value.
CIMInstancesetProperty (const CIMName &name, const CIMValue &cv)
 Update the value of a property if it exists.
CIMInstancesetProperty (const CIMProperty &prop)
 Update a property in the property list if it exists.
CIMInstanceremoveProperty (const CIMName &propName)
 Remove a property from this CIMInstance.
CIMInstance filterProperties (const StringArray &propertyList, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, bool ignorePropertyList=false) const
 Create an CIMInstance with properties and qualifiers from this instance based on filtering criteria.
CIMInstance clone (WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray &propertyList=StringArray(), bool noProps=false) const
 Create a new CIMInstance from this CIMInstance using the specified criteria.
CIMInstance clone (WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList) const
 Create a new CIMInstance from this CIMInstance using the specified criteria.
CIMInstance clone (WBEMFlags::ELocalOnlyFlag localOnly, WBEMFlags::EDeepFlag deep, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, WBEMFlags::EIncludeClassOriginFlag includeClassOrigin, const StringArray *propertyList, const CIMClass &requestedClass, const CIMClass &cimClass) const
 Create a new CIMInstance from this CIMInstance using the specified criteria.
CIMInstancesyncWithClass (const CIMClass &cc, WBEMFlags::EIncludeQualifiersFlag includeQualifiers=WBEMFlags::E_INCLUDE_QUALIFIERS)
 Synchronize this instance with the given class.
CIMInstance createModifiedInstance (const CIMInstance &previousInstance, WBEMFlags::EIncludeQualifiersFlag includeQualifiers, const StringArray *propertyList, const CIMClass &theClass) const
 Create an instance with the set of changes that will occur for a modifyInstance call.
virtual String getName () const
virtual void setName (const CIMName &name)
 Sets the class name for this instance.
CIMInstancesetNameSpace (const String &ns)
 Set the namespace on this instance.
String getNameSpace () const
virtual void readObject (std::istream &istrm)
 Read this CIMInstance from an input stream.
virtual void writeObject (std::ostream &ostrm) const
 Write this CIMInstance to an output stream.
virtual String toMOF () const
virtual String toString () const
bool propertiesAreEqualTo (const CIMInstance &other) const
 This compares the properties of the instances, and returns true if they are equal.
 operator safe_bool () const
bool operator! () const

Protected Member Functions

void _buildKeys ()

Protected Attributes

COWIntrusiveReference< INSTDatam_pdata

Friends

OW_COMMON_API bool operator< (const CIMInstance &x, const CIMInstance &y)

Classes

struct  INSTData

Detailed Description

The CIMInstance class encapsulates all information pertinent to a CIMInstance.

CIMInstances are ref counted, copy on write objects. It is possible to have an CIMInstance object that is NULL. The method to check for this condition is as follows:

CIMInstance ci = ch.getInstance(...); if (!ci) { // Null instance } else { // Valid instance }

Providers generally follow these steps to create a CIMInstance object:

1. Obtain a CIMOMHandleIFC object hdl.

2. Use hdl to create a CIMClass object of the desired CIM class:

CIMClass cc = hdl.getClass(namespace, class_name);

3. Use CIMClass cc to create a CIMInstance of the desired CIM class:

CIMInstance inst = cc.newInstance();

4. Assign properties of inst as desired using setProperty().

Definition at line 82 of file OW_CIMInstance.hpp.


Member Typedef Documentation

typedef COWIntrusiveReference<INSTData> CIMInstance::* OW_NAMESPACE::CIMInstance::safe_bool
 

Definition at line 474 of file OW_CIMInstance.hpp.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
SERIALIZATION_VERSION 

Definition at line 87 of file OW_CIMInstance.hpp.

enum OW_NAMESPACE::CIMInstance::EErrorCodes
 

Enumerator:
E_INSTANCE_HAS_NO_SUCH_PROPERTY 

Reimplemented from OW_NAMESPACE::CIMBase.

Definition at line 89 of file OW_CIMInstance.hpp.


Constructor & Destructor Documentation

CIMInstance::CIMInstance  ) 
 

Default ctor.

Definition at line 78 of file OW_CIMInstance.cpp.

CIMInstance::CIMInstance CIMNULL_t   )  [explicit]
 

This CIMInstance object will be NULL.

All subsequent operations on an instance of this type will fail.

Definition at line 83 of file OW_CIMInstance.cpp.

CIMInstance::CIMInstance const CIMInstance arg  ) 
 

Copy ctor.

Parameters:
arg The CIMInstance that this object will be a copy of.

Definition at line 100 of file OW_CIMInstance.cpp.

CIMInstance::CIMInstance const CIMName name  )  [explicit]
 

Create an CIMInstance.

Parameters:
name The class name of this CIMInstance.

Definition at line 94 of file OW_CIMInstance.cpp.

References m_pdata, and name.

CIMInstance::CIMInstance const char *  name  )  [explicit]
 

Create an CIMInstance.

Parameters:
name The class name of this CIMInstance as a NULL terminated string.

Definition at line 88 of file OW_CIMInstance.cpp.

References m_pdata.

CIMInstance::~CIMInstance  ) 
 

Destroy this CIMInstance object.

Definition at line 105 of file OW_CIMInstance.cpp.


Member Function Documentation

void CIMInstance::_buildKeys  )  [protected]
 

Definition at line 330 of file OW_CIMInstance.cpp.

References i.

CIMInstance CIMInstance::clone WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EDeepFlag  deep,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
const StringArray propertyList,
const CIMClass requestedClass,
const CIMClass cimClass
const
 

Create a new CIMInstance from this CIMInstance using the specified criteria.

This is useful for implementing enumInstances correctly for the localOnly and deep parameters.

Parameters:
localOnly If true, all inherited properties and qualifiers will be omitted.
deep If false, all derived properties and qualifiers will be omitted.
includeQualifiers If false, all quailifiers will be omitted.
includeClassOrigin If true, all element names will include the class origin.
propertyList A pointer to an array of property names that specifies the only properties to be included in the returned instance. If NULL, all properties are included. If not NULL and the array is empty, no properties are included. If not NULL and the array is not empty, only those properties will be included.
requestedClass The class that was requested in the enumInstances call. This is used in filtering the properties.
cimClass The class of this instance. This is used in filtering the properties.
Returns:
An CIMInstance object based on this one, filtered according to the specified criteria.

Definition at line 584 of file OW_CIMInstance.cpp.

References cimClass, clone(), OW_NAMESPACE::WBEMFlags::E_DEEP, OW_NAMESPACE::WBEMFlags::E_INCLUDE_QUALIFIERS, OW_NAMESPACE::WBEMFlags::E_NOT_LOCAL_ONLY, OW_NAMESPACE::CIMClass::getName(), OW_NAMESPACE::CIMProperty::getOriginClass(), getProperties(), OW_NAMESPACE::CIMClass::getProperty(), i, propertyList, OW_NAMESPACE::Array< T >::push_back(), requestedClass, OW_NAMESPACE::Array< T >::size(), and syncWithClass().

CIMInstance CIMInstance::clone WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
const StringArray propertyList
const
 

Create a new CIMInstance from this CIMInstance using the specified criteria.

Parameters:
localOnly If true, all inherited properties and qualifiers will be omitted.
includeQualifiers If false, all quailifiers will be omitted.
includeClassOrigin If true, all element names will include the class origin.
propertyList A pointer to an array of property names that specifies the only properties to be included in the returned instance. If NULL, all properties are included. If not NULL and the array is empty, no properties are included. If not NULL and the array is not empty, only those properties will be included.
Returns:
An CIMInstance object based on this one, filtered according to the specified criteria.

Definition at line 499 of file OW_CIMInstance.cpp.

References propertyList, and OW_NAMESPACE::Array< T >::size().

CIMInstance CIMInstance::clone WBEMFlags::ELocalOnlyFlag  localOnly,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
const StringArray propertyList = StringArray(),
bool  noProps = false
const
 

Create a new CIMInstance from this CIMInstance using the specified criteria.

Parameters:
localOnly If true, all inherited properties and qualifiers will be omitted.
includeQualifiers If false, all quailifiers will be omitted.
includeClassOrigin If true, all element names will include the class origin.
propertyList An array of property names that specifies the only properties to be included in the returned instance.
noProps If true, all properties will be omitted from the returned CIMInstance object regardless of the property list parameter.
Returns:
An CIMInstance object based on this one, filtered according to the specified criteria.

Definition at line 520 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::WBEMFlags::E_INCLUDE_QUALIFIERS, OW_NAMESPACE::WBEMFlags::E_LOCAL_ONLY, i, and m_pdata.

Referenced by OW_NAMESPACE::PerlAssociatorProviderProxy::associators(), OW_NAMESPACE::NPIAssociatorProviderProxy::associators(), clone(), OW_NAMESPACE::CIM_NamespaceInManagerInstProv::AssociatorFilter::doHandle(), OW_NAMESPACE::PerlInstanceProviderProxy::enumInstances(), OW_NAMESPACE::NPIInstanceProviderProxy::enumInstances(), OW_NAMESPACE::CppIndicationExportXMLHTTPProvider::exportIndication(), OW_NAMESPACE::filterInstance(), OW_NAMESPACE::PerlInstanceProviderProxy::getInstance(), OW_NAMESPACE::NPIInstanceProviderProxy::getInstance(), OW_NAMESPACE::CppSimpleInstanceProviderIFC::getInstance(), OW_NAMESPACE::PerlAssociatorProviderProxy::references(), and OW_NAMESPACE::NPIAssociatorProviderProxy::references().

CIMInstance CIMInstance::createModifiedInstance const CIMInstance previousInstance,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
const StringArray propertyList,
const CIMClass theClass
const
 

Create an instance with the set of changes that will occur for a modifyInstance call.

This instance is the new instance. The previous instance is passed in. The instance that is returned is what the new instance will be after modifyInstance is applied.

Parameters:
previousInstance The instance before being modified.
includeQualifiers "If the IncludeQualifiers input parameter is true, this specifies that the Qualifiers are modified as specified in the ModifiedInstance. If false, Qualifiers in the ModifiedInstance are ignored and no Qualifiers are explicitly modified in the specified Instance."
propertyList "If the PropertyList input parameter is not NULL, the members of the array define one or more Property names. Only those properties specified in the PropertyList are modified as specified in the ModifiedInstance. Properties of the ModifiedInstance that are missing from the PropertyList are ignored. If the PropertyList input parameter is an empty array this signifies that no Properties are explicitly modified in the specified Instance. If the PropertyList input parameter is NULL this specifies that all Properties are updated in the specified Instance."
theClass The class of this instance.

Definition at line 767 of file OW_CIMInstance.cpp.

References getProperties(), OW_NAMESPACE::CIMClass::getProperty(), getProperty(), OW_NAMESPACE::CIMProperty::getQualifiers(), getQualifiers(), i, propertyList, removeProperty(), setProperties(), setProperty(), OW_NAMESPACE::CIMProperty::setQualifiers(), setQualifiers(), and theClass.

Referenced by OW_NAMESPACE::PerlInstanceProviderProxy::modifyInstance(), OW_NAMESPACE::NPIInstanceProviderProxy::modifyInstance(), and OW_NAMESPACE::InstanceRepository::modifyInstance().

CIMInstance CIMInstance::filterProperties const StringArray propertyList,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers,
WBEMFlags::EIncludeClassOriginFlag  includeClassOrigin,
bool  ignorePropertyList = false
const
 

Create an CIMInstance with properties and qualifiers from this instance based on filtering criteria.

All properties and qualifiers that designate keys will be retained.

Parameters:
propertyList The list of property names to include in the instance that is created.
includeQualifiers If true, All qualifiers will be retained on the instance and properties. Otherwise all qualifiers will be omitted, except those that designate key properties.
includeClassOrigin If true, the class origin will be included on all properties and qualifiers.
ignorePropertyList If true the propertyList parameter will be ignored.
Returns:
An CIMInstance with properties and qualifiers from this instance based on the filtering criteria. All properties and qualifiers that designate keys will be retained.

Definition at line 640 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::WBEMFlags::E_NOT_LOCAL_ONLY, propertyList, and OW_NAMESPACE::Array< T >::size().

String CIMInstance::getClassName  )  const
 

Returns:
The name of the class for this instance.

Definition at line 129 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::String::toString().

Referenced by OW_NAMESPACE::IndicationServerImplThread::_processIndication(), OW_NAMESPACE::AssocDb2::addOrDeleteEntries(), OW_NAMESPACE::AssocDbHandle::addOrDeleteEntries(), OW_NAMESPACE::CIMInstancetoXML(), OW_NAMESPACE::CIMObjectPath::CIMObjectPath(), OW_NAMESPACE::ProviderAgentCIMOMHandle::createInstance(), OW_NAMESPACE::InstanceRepository::createInstance(), OW_NAMESPACE::CIMServer::createInstance(), OW_NAMESPACE::CIMRepository::createInstance(), OW_NAMESPACE::BinaryRequestHandler::createInstance(), OW_NAMESPACE::WQLFilterRep::enumInstances(), OW_NAMESPACE::WQLInstancePropertySource::evaluateISAAux(), OW_NAMESPACE::CppIndicationExportXMLHTTPProvider::exportIndication(), OW_NAMESPACE::WQLProcessor::instanceIsDerivedFrom(), OW_NAMESPACE::ProviderAgentCIMOMHandle::modifyInstance(), and OW_NAMESPACE::CIMServer::modifyInstance().

CIMPropertyArray CIMInstance::getKeyValuePairs  )  const
 

Returns:
An CIMPropertyArray that contains all of the keys for this instance.

Definition at line 345 of file OW_CIMInstance.cpp.

Referenced by OW_NAMESPACE::CIMObjectPath::CIMObjectPath(), OW_NAMESPACE::InstanceRepository::modifyInstance(), OW_NAMESPACE::CIMServer::modifyInstance(), and OW_NAMESPACE::CIMObjectPath::setKeys().

String CIMInstance::getLanguage  )  const
 

Returns:
the language this CIMClass is using

Definition at line 149 of file OW_CIMInstance.cpp.

String CIMInstance::getName  )  const [virtual]
 

Returns:
The name of the class for this instance.

Implements OW_NAMESPACE::CIMElement.

Definition at line 650 of file OW_CIMInstance.cpp.

String CIMInstance::getNameSpace  )  const
 

Returns:
the Namespace this instance was retrieved from. If this is an empty string, the namespace is assumed to be from the namespace that was specified on the client request.

Definition at line 142 of file OW_CIMInstance.cpp.

Referenced by OW_NAMESPACE::CIM_NamespaceInManagerInstProv::getInstance(), and OW_NAMESPACE::BinaryRequestHandler::getInstance().

CIMPropertyArray CIMInstance::getProperties Int32  valueDataType = CIMDataType::INVALID  )  const
 

Get all the properties of a specific datatype from this instance.

Parameters:
valueDataType All properties returned must have this datatype. If CIMDataType::INVALID is specified, all properties will be returned.
Returns:
The properties associated with this instance if valueDataType is CIMDataType::INVALID. Otherwise only properties that have a values that have a data type specified by the valueDataType parameter.

Definition at line 229 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::Array< T >::append(), and i.

Referenced by OW_NAMESPACE::AssocDb2::addOrDeleteEntries(), OW_NAMESPACE::AssocDbHandle::addOrDeleteEntries(), clone(), OW_NAMESPACE::CIMRepository::createInstance(), createModifiedInstance(), propertiesAreEqualTo(), and OW_NAMESPACE::WQLProcessor::visit_insertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN().

CIMProperty CIMInstance::getProperty const CIMName name  )  const
 

Gets a property with the specified name.

Parameters:
name The name of the property to retrieve.
Returns:
The CIMProperty identified by the name on success. Otherwise a null CIMProperty object.

Definition at line 273 of file OW_CIMInstance.cpp.

References i.

CIMProperty CIMInstance::getProperty const CIMName name,
const CIMName originClass
const
 

Get the property identified by a given name and origin class.

Parameters:
name The name of the property to retrieve.
originClass The name of the origin class of the property.
Returns:
The CIMProperty identified by the given parameters on success. Otherwise a null CIMProperty object.

Definition at line 256 of file OW_CIMInstance.cpp.

References i, and name.

Referenced by OW_NAMESPACE::IndicationServerImplThread::_processIndication(), OW_NAMESPACE::NameSpaceProvider::createInstance(), OW_NAMESPACE::BinaryRequestHandler::createInstance(), createModifiedInstance(), OW_NAMESPACE::IndicationServerImplThread::createSubscription(), and OW_NAMESPACE::CppIndicationExportXMLHTTPProvider::exportIndication().

CIMProperty CIMInstance::getPropertyT const CIMName name  )  const
 

Gets a property with the specified name.

Parameters:
name The name of the property to retrieve.
Returns:
The CIMProperty identified by the name on success.
Exceptions:
an NoSuchPropertyException (E_INSTANCE_HAS_NO_SUCH_PROPERTY) if the property is not found or NULL.

Definition at line 288 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::String::c_str(), OW_THROW_ERR, and OW_NAMESPACE::CIMName::toString().

Referenced by OW_NAMESPACE::CIM_NamespaceInstProv::createInstance(), OW_NAMESPACE::getSourceNameSpace(), and OW_NAMESPACE::CIMServer::modifyInstance().

CIMValue CIMInstance::getPropertyValue const CIMName name  )  const
 

Gets a property's value.

Parameters:
name The name of the property value to retrieve.
Returns:
The CIMValue of the specified property. It will be NULL if the property doesn't exist or the property's value is NULL.

Definition at line 299 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMNULL, OW_NAMESPACE::CIMProperty::getValue(), and name.

CIMQualifier CIMInstance::getQualifier const CIMName qualName  )  const
 

Get the qualifier associated with the given name.

Parameters:
qualName The name of the qualifier to retrieve.
Returns:
A valid CIMQalifier on success. Otherwise a null CIMQualifier

Definition at line 175 of file OW_CIMInstance.cpp.

References i.

CIMQualifierArray CIMInstance::getQualifiers  )  const
 

Returns:
The qualifiers for this instance as an array of CIMQualifiers.

Definition at line 169 of file OW_CIMInstance.cpp.

Referenced by OW_NAMESPACE::InstanceRepository2::_removeDuplicatedQualifiers(), OW_NAMESPACE::InstanceRepository::_removeDuplicatedQualifiers(), and createModifiedInstance().

OW_NAMESPACE::CIMInstance::operator safe_bool  )  const [inline]
 

Definition at line 475 of file OW_CIMInstance.hpp.

References m_pdata.

bool OW_NAMESPACE::CIMInstance::operator!  )  const [inline]
 

Definition at line 477 of file OW_CIMInstance.hpp.

CIMInstance & CIMInstance::operator= const CIMInstance arg  ) 
 

Assignment operator.

Parameters:
arg The CIMInstance to assign to this one.
Returns:
A reference to this object after the assignment is made.

Definition at line 115 of file OW_CIMInstance.cpp.

References m_pdata.

bool CIMInstance::propertiesAreEqualTo const CIMInstance other  )  const
 

This compares the properties of the instances, and returns true if they are equal.

It will sort the properties before comparing, so the order of the properties is irrelevant.

Parameters:
other The instance to compare
Returns:
true if the properties are the same

Definition at line 973 of file OW_CIMInstance.cpp.

References getProperties(), and OW_NAMESPACE::Array< T >::size().

bool CIMInstance::propertyHasValue const CIMName name  )  const
 

Test whether a property exists and has a non-NULL value.

Parameters:
name The name of the property to test.
Returns:
bool true if the property exists and has a non-NULL value.

Definition at line 310 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMProperty::getValue(), and name.

virtual void OW_NAMESPACE::CIMInstance::readObject std::istream &  istrm  )  [virtual]
 

Read this CIMInstance from an input stream.

Parameters:
istrm The input stream to read this object from.

Implements OW_NAMESPACE::SerializableIFC.

CIMInstance & CIMInstance::removeProperty const CIMName propName  ) 
 

Remove a property from this CIMInstance.

Parameters:
propName The name of the property to remove.
Returns:
a reference to *this

Definition at line 478 of file OW_CIMInstance.cpp.

References i.

Referenced by createModifiedInstance().

CIMInstance & CIMInstance::removeQualifier const CIMName qualName  ) 
 

Remove the named qualifier from this CIMInstance.

Parameters:
qualName The name of the qualifier to remove.
Returns:
a reference to *this

Definition at line 189 of file OW_CIMInstance.cpp.

References i.

CIMInstance & CIMInstance::setClassName const CIMName name  ) 
 

Sets the class name for this instance.

Parameters:
name The new class name for this instance.
Returns:
a reference to *this

Definition at line 162 of file OW_CIMInstance.cpp.

References name.

Referenced by OW_NAMESPACE::PerlInstanceProviderProxy::enumInstances(), OW_NAMESPACE::NPIInstanceProviderProxy::enumInstances(), OW_NAMESPACE::PerlInstanceProviderProxy::getInstance(), OW_NAMESPACE::NPIInstanceProviderProxy::getInstance(), OW_NAMESPACE::IndicationRepLayerImpl::invokeMethod(), OW_NAMESPACE::CIMClass::newInstance(), and OW_NAMESPACE::LifecycleIndicationPoller::poll().

CIMInstance & CIMInstance::setKeys const CIMPropertyArray keys  ) 
 

Set the keys for this instance.

Returns:
a reference to *this

Definition at line 122 of file OW_CIMInstance.cpp.

Referenced by OW_NAMESPACE::CIMServer::modifyInstance().

CIMInstance & CIMInstance::setLanguage const String language  ) 
 

Set the language this CIMClass is using.

Parameters:
language The new language for this CIMClass
Returns:
a reference to *this

Definition at line 155 of file OW_CIMInstance.cpp.

void CIMInstance::setName const CIMName name  )  [virtual]
 

Sets the class name for this instance.

Parameters:
name The new class name for this instance.
Returns:
a reference to *this

Implements OW_NAMESPACE::CIMElement.

Definition at line 815 of file OW_CIMInstance.cpp.

References name.

CIMInstance & CIMInstance::setNameSpace const String ns  ) 
 

Set the namespace on this instance.

This allows providers to provide additional namespace information about an instance when the instance returned comes from a namespace that is different from the namespace specified on the client's request. Typically used in an associators call.

Parameters:
ns Specifies the namespace this instance is from.
Returns:
a reference to *this

Definition at line 135 of file OW_CIMInstance.cpp.

References ns.

Referenced by OW_NAMESPACE::BinaryRequestHandler::getInstance().

void CIMInstance::setNull  )  [virtual]
 

Set this to a null object.

All subsequent operation will fail after this call is made.

Implements OW_NAMESPACE::CIMBase.

Definition at line 110 of file OW_CIMInstance.cpp.

CIMInstance & CIMInstance::setProperties const CIMPropertyArray props  ) 
 

Set the properties associated with this instance.

Note: this will clobber qualifiers associated with the properties which may already exist on the instance. You may want to instead consider updatePropertyValues(), which does not overwrite qualifiers.

Parameters:
props An CIMPropertyArray that contains the new properties for this instance.
Returns:
a reference to *this

Definition at line 248 of file OW_CIMInstance.cpp.

Referenced by createModifiedInstance(), and OW_NAMESPACE::CIMServer::modifyInstance().

CIMInstance & CIMInstance::setProperty const CIMProperty prop  ) 
 

Update a property in the property list if it exists.

Otherwise add a new one. In most cases, updatePropertyValue() should be called instead of this function, because it won't add a new property. An instance is initialized will all it's properties by CIMClass::newInstance().

Parameters:
prop The property to add or update.
Returns:
a reference to *this

Definition at line 443 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMProperty::getName(), i, and OW_NAMESPACE::CIMProperty::isKey().

CIMInstance & CIMInstance::setProperty const CIMName name,
const CIMValue cv
 

Update the value of a property if it exists.

Otherwise add a new one. In most cases, updatePropertyValue() should be called instead of this function, because it won't add a new property. An instance is initialized will all it's properties by CIMClass::newInstance().

Parameters:
name The name of the property to add or update.
cv The CIMValue that contains the new value for the property.
Returns:
a reference to *this

Definition at line 404 of file OW_CIMInstance.cpp.

References i, and name.

Referenced by OW_NAMESPACE::CIMNameSpaceUtils::create__Namespace(), OW_NAMESPACE::BinaryRequestHandler::createInstance(), createModifiedInstance(), OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::doReferences(), OW_NAMESPACE::OpenWBEM_UnitaryComputerSystem::doSimpleEnumInstances(), OW_NAMESPACE::IndicationRepLayerImpl::invokeMethod(), and OW_NAMESPACE::LifecycleIndicationPoller::poll().

CIMInstance & CIMInstance::setQualifier const CIMQualifier qual  ) 
 

Set/Add a qualifier to this instance's qualifier list.

Parameters:
qual The qualifier to add to this instance.
Returns:
a reference to *this

Definition at line 203 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMQualifier::getName(), and i.

Referenced by OW_NAMESPACE::MOF::CIMOMVisitor::VisitInstanceDeclaration().

CIMInstance & CIMInstance::setQualifiers const CIMQualifierArray quals  ) 
 

Set the qualifiers for this instance.

Any old qualifiers will removed.

Parameters:
quals An CIMQualifierArray with the new qualifers for this instance.
Returns:
a reference to *this

Definition at line 222 of file OW_CIMInstance.cpp.

Referenced by createModifiedInstance().

CIMInstance & CIMInstance::syncWithClass const CIMClass cc,
WBEMFlags::EIncludeQualifiersFlag  includeQualifiers = WBEMFlags::E_INCLUDE_QUALIFIERS
 

Synchronize this instance with the given class.

This will ensure that all properties found on the class exist on this instance. It will also optionally move all qualifiers from the class to the instance.

Parameters:
cc The class to synchronize this instance with.
includeQualifiers If E_EXCLUDE_QUALIFIERS, the instance will not contain any qualifiers (except key designators) after the operation. If true, all relevant qualifiers are copied from the class to the instance.
Returns:
a reference to *this

Definition at line 656 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMClass::getAllProperties(), OW_NAMESPACE::CIMClass::getProperty(), i, OW_NAMESPACE::Array< T >::remove(), OW_NAMESPACE::Array< T >::size(), and theClass.

Referenced by clone(), OW_NAMESPACE::CIMServer::modifyInstance(), and OW_NAMESPACE::CIMClass::newInstance().

String CIMInstance::toMOF  )  const [virtual]
 

Returns:
The MOF representation of this CIMInstance as an String.

Implements OW_NAMESPACE::CIMBase.

Definition at line 872 of file OW_CIMInstance.cpp.

References i.

Referenced by OW_NAMESPACE::IndicationServerImplThread::addTrans(), OW_NAMESPACE::CIMRepository2::createInstance(), and OW_NAMESPACE::CIMRepository::createInstance().

String CIMInstance::toString  )  const [virtual]
 

Returns:
The string representation of the CIMInstance object.

Reimplemented from OW_NAMESPACE::CIMElement.

Definition at line 938 of file OW_CIMInstance.cpp.

References i, and OW_NAMESPACE::StringBuffer::toString().

Referenced by OW_NAMESPACE::IndicationServerImplThread::_processIndication(), OW_NAMESPACE::CIMInstanceSortCriterion(), OW_NAMESPACE::IndicationServerImplThread::createSubscription(), OW_NAMESPACE::CppIndicationExportXMLHTTPProvider::exportIndication(), and OW_NAMESPACE::WQLProcessor::visit_aExpr_aExpr_ISA_aExpr().

CIMInstance & CIMInstance::updatePropertyValue const CIMName name,
const CIMValue cv
 

Update a single property value.

Does not add prop is it doesn't exist.

Parameters:
name The name of the property to update.
cv The new value for the property.
Returns:
a reference to *this

Definition at line 397 of file OW_CIMInstance.cpp.

References name.

CIMInstance & CIMInstance::updatePropertyValue const CIMProperty prop  ) 
 

Update a single property value.

Does not add prop is it doesn't exist.

Parameters:
prop The CIMProperty to update in this instance. This CIMProperty with contain the new value.
Returns:
a reference to *this

Definition at line 362 of file OW_CIMInstance.cpp.

References OW_NAMESPACE::CIMProperty::getName(), OW_NAMESPACE::CIMProperty::getValue(), i, OW_NAMESPACE::CIMProperty::isKey(), and name.

CIMInstance & CIMInstance::updatePropertyValues const CIMPropertyArray props  ) 
 

Update the property values for this instance.

Does not add properties if they don't exist.

Parameters:
props An CIMPropertyArray that contains the properties to update this instance's properties with.
Returns:
a reference to *this

Definition at line 351 of file OW_CIMInstance.cpp.

References i, and OW_NAMESPACE::Array< T >::size().

Referenced by OW_NAMESPACE::OpenWBEM_ConfigSettingDataInstProv::getInstance().

void CIMInstance::writeObject std::ostream &  ostrm  )  const [virtual]
 

Write this CIMInstance to an output stream.

Parameters:
ostrm The output stream to write this object to.

Implements OW_NAMESPACE::SerializableIFC.

Definition at line 859 of file OW_CIMInstance.cpp.

References OW_CIMINSTANCESIG_V, and OW_NAMESPACE::writeArray().

Referenced by OW_NAMESPACE::InstanceRepository::createInstance().


Friends And Related Function Documentation

OW_COMMON_API bool operator< const CIMInstance x,
const CIMInstance y
[friend]
 

Definition at line 968 of file OW_CIMInstance.cpp.


Member Data Documentation

COWIntrusiveReference<INSTData> OW_NAMESPACE::CIMInstance::m_pdata [protected]
 

Definition at line 488 of file OW_CIMInstance.hpp.

Referenced by CIMInstance(), clone(), operator safe_bool(), OW_NAMESPACE::operator<(), and operator=().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:12:28 2006 for openwbem by  doxygen 1.4.6