本文整理汇总了C++中CIMInstance::isUninitialized方法的典型用法代码示例。如果您正苦于以下问题:C++ CIMInstance::isUninitialized方法的具体用法?C++ CIMInstance::isUninitialized怎么用?C++ CIMInstance::isUninitialized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIMInstance
的用法示例。
在下文中一共展示了CIMInstance::isUninitialized方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deliver
void GetInstanceResponseHandler::deliver(const CIMInstance& cimInstance)
{
if (cimInstance.isUninitialized())
{
MessageLoaderParms message(
"Common.Exception.UNINITIALIZED_OBJECT_EXCEPTION",
"The object is not initialized.");
throw CIMException(CIM_ERR_FAILED, message);
}
if (SimpleInstanceResponseHandler::size() != 0)
{
MessageLoaderParms message(
"Server.OperationResponseHandler.TOO_MANY_OBJECTS_DELIVERED",
"Too many objects delivered.");
throw CIMException(CIM_ERR_FAILED, message);
}
CIMInstance localInstance(cimInstance);
#ifdef PEGASUS_ENABLE_OBJECT_NORMALIZATION
// The normalizer expects an object path embedded in instances even
// though it is not required by this operation. Use the requested
// object path is missing from the instance.
if (localInstance.getPath().getKeyBindings().size() == 0)
{
// ATTN: should clone before modification
localInstance.setPath(static_cast<CIMGetInstanceRequestMessage*>(
getRequest())->instanceName);
}
#endif
SimpleInstanceResponseHandler::deliver(
_normalizer.processInstance(localInstance));
}
示例2: getInstance
CIMInstance CIMClient::getInstance(
const CIMNamespaceName& nameSpace,
const CIMObjectPath& instanceName,
Boolean localOnly,
Boolean includeQualifiers,
Boolean includeClassOrigin,
const CIMPropertyList& propertyList)
{
CIMInstance inst = _rep->getInstance(
nameSpace,
instanceName,
localOnly,
includeQualifiers,
includeClassOrigin,
propertyList).getInstance();
if (!inst.isUninitialized())
{
// remove key bindings, name space and host name form object path.
CIMObjectPath& p =
const_cast<CIMObjectPath&>(inst.getPath());
CIMName cls = p.getClassName();
p.clear();
p.setClassName(cls);
}
return inst;
}
示例3: validAssocClassForObject
//.........这里部分代码省略.........
{
expectedTargetRole = PROPERTY_DEPENDENT;
expectedOriginRole = PROPERTY_ANTECEDENT;
}
else if(originClassEnum == PG_CIMXMLCOMMUNICATIONMECHANISM)
{
expectedTargetRole = PROPERTY_ANTECEDENT;
expectedOriginRole = PROPERTY_DEPENDENT;
}
break;
case PG_ELEMENTCONFORMSTOPROFILE:
if(originClass.equal(PEGASUS_CLASSNAME_PG_REGISTEREDPROFILE))
{
expectedTargetRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
expectedOriginRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
}
else
{
expectedTargetRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
expectedOriginRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
}
break;
case PG_ELEMENTCONFORMSTOPROFILE_RP_RP:
propNames.append(CIMName("RegisteredName"));
propertyList = CIMPropertyList(propNames);
tmpInstance = localGetInstance(
context,
objectName,
propertyList);
if (!tmpInstance.isUninitialized())
{
index = tmpInstance.findProperty("RegisteredName");
if (index != PEG_NOT_FOUND)
{
const CIMValue &tmpVal =
tmpInstance.getProperty(index).getValue();
if (!tmpVal.isNull())
{
tmpVal.get(profileName);
}
}
}
if (String::compareNoCase(profileName, String("SMI-S")) == 0)
{
expectedTargetRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
expectedOriginRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
}
else
{
expectedTargetRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_CONFORMANTSTANDARD;
expectedOriginRole =
ELEMENTCONFORMSTOPROFILE_PROPERTY_MANAGEDELEMENT;
}
break;
case PG_SUBPROFILEREQUIRESPROFILE:
if(originClassEnum == PG_REGISTEREDPROFILE)
{
expectedTargetRole = PROPERTY_DEPENDENT;
expectedOriginRole = PROPERTY_ANTECEDENT;