version 1.24.2.7, 2001/11/08 23:15:30
|
version 1.25, 2001/12/13 14:54:05
|
|
|
// | // |
// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company | // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company |
// (carolann_graves@hp.com) | // (carolann_graves@hp.com) |
// |
|
// Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) | // Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include "CIMClass.h" | #include "CIMClass.h" |
#include "CIMInstance.h" | #include "CIMInstance.h" |
#include "CIMObject.h" | #include "CIMObject.h" |
|
#include "CIMNamedInstance.h" |
#include "CIMParamValue.h" | #include "CIMParamValue.h" |
| |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
|
|
} | } |
| |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
|
// getNamedInstanceElement() |
|
// |
|
// <!ELEMENT VALUE.NAMEDINSTANCE (INSTANCENAME,INSTANCE)> |
|
// |
|
//------------------------------------------------------------------------------ |
|
|
|
Boolean XmlReader::getNamedInstanceElement( |
|
XmlParser& parser, |
|
CIMNamedInstance& namedInstance) |
|
{ |
|
XmlEntry entry; |
|
|
|
if (!testStartTag(parser, entry, "VALUE.NAMEDINSTANCE")) |
|
return false; |
|
|
|
CIMReference instanceName; |
|
|
|
// Get INSTANCENAME elements: |
|
|
|
if (!getInstanceNameElement(parser, instanceName)) |
|
{ |
|
throw XmlValidationError(parser.getLine(), |
|
"expected INSTANCENAME element"); |
|
} |
|
|
|
CIMInstance instance; |
|
|
|
// Get INSTANCE elements: |
|
|
|
if (!getInstanceElement(parser, instance)) |
|
{ |
|
throw XmlValidationError(parser.getLine(), |
|
"expected INSTANCE element"); |
|
} |
|
|
|
// Get VALUE.NAMEDINSTANCE end tag: |
|
|
|
expectEndTag(parser, "VALUE.NAMEDINSTANCE"); |
|
|
|
namedInstance.set(instanceName, instance); |
|
|
|
return true; |
|
} |
|
|
|
//------------------------------------------------------------------------------ |
// | // |
// getObject() | // getObject() |
// | // |
|
|
CIMReference& objectName) | CIMReference& objectName) |
{ | { |
String className; | String className; |
CIMReference instanceName; |
|
| |
if (getClassNameElement(parser, className, false)) | if (getClassNameElement(parser, className, false)) |
{ | { |