version 1.18.2.2, 2001/09/27 21:57:24
|
version 1.31, 2002/05/30 15:55:21
|
|
|
// | // |
// 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 <Pegasus/Common/XmlParser.h> | #include <Pegasus/Common/XmlParser.h> |
#include <Pegasus/Common/CIMFlavor.h> | #include <Pegasus/Common/CIMFlavor.h> |
#include <Pegasus/Common/CIMScope.h> | #include <Pegasus/Common/CIMScope.h> |
#include <Pegasus/Common/CIMReference.h> |
#include <Pegasus/Common/CIMType.h> |
|
#include <Pegasus/Common/CIMObjectPath.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
class CIMMethod; | class CIMMethod; |
class CIMObject; | class CIMObject; |
class CIMObjectWithPath; | class CIMObjectWithPath; |
|
class CIMParamValue; |
|
class CIMValue; |
| |
class PEGASUS_COMMON_LINKAGE XmlReader | class PEGASUS_COMMON_LINKAGE XmlReader |
{ | { |
public: | public: |
| |
static void expectXmlDeclaration( |
static void getXmlDeclaration( |
|
XmlParser& parser, |
|
const char*& xmlVersion, |
|
const char*& xmlEncoding); |
|
|
|
static Boolean testXmlDeclaration ( |
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry); | XmlEntry& entry); |
| |
|
|
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry); | XmlEntry& entry); |
| |
static Boolean testXmlDeclaration ( |
|
XmlParser& parser, |
|
XmlEntry& entry); |
|
|
|
static Boolean testStartTag( | static Boolean testStartTag( |
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry, | XmlEntry& entry, |
|
|
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry); | XmlEntry& entry); |
| |
static void testCimStartTag(XmlParser& parser); |
static void getCimStartTag( |
|
XmlParser& parser, |
static Boolean getIsArrayAttribute( |
const char*& cimVersion, |
Uint32 lineNumber, |
const char*& dtdVersion); |
const XmlEntry& entry, |
|
const char* tagName, |
|
Boolean& value); |
|
| |
static String getCimNameAttribute( | static String getCimNameAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
|
|
static CIMType getCimTypeAttribute( | static CIMType getCimTypeAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* tagName); |
const char* tagName, |
|
const char* attributeName = "TYPE", |
|
Boolean required = true); |
| |
static Boolean getCimBooleanAttribute( | static Boolean getCimBooleanAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
|
|
const char* valueString, | const char* valueString, |
CIMType type); | CIMType type); |
| |
|
/* getValueElement - Gets the CIMType and CIMValue for a single |
|
XML Value element. It expects <VALUE> as the start tag. |
|
@return Returns True if the value element exists |
|
*/ |
static Boolean getValueElement( | static Boolean getValueElement( |
XmlParser& parser, | XmlParser& parser, |
CIMType type, | CIMType type, |
|
|
| |
static Boolean getInstanceNameElement( | static Boolean getInstanceNameElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& instanceName); |
CIMObjectPath& instanceName); |
| |
static Boolean getInstancePathElement( | static Boolean getInstancePathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); |
CIMObjectPath& reference); |
| |
static Boolean getLocalInstancePathElement( | static Boolean getLocalInstancePathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); |
CIMObjectPath& reference); |
| |
static Boolean getClassPathElement( | static Boolean getClassPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); |
CIMObjectPath& reference); |
| |
static Boolean getLocalClassPathElement( | static Boolean getLocalClassPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); |
CIMObjectPath& reference); |
| |
static Boolean getValueReferenceElement( | static Boolean getValueReferenceElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& reference); |
CIMObjectPath& reference); |
|
|
|
static Boolean getValueReferenceArrayElement( |
|
XmlParser& parser, |
|
CIMValue& value); |
| |
static Boolean getPropertyReferenceElement( | static Boolean getPropertyReferenceElement( |
XmlParser& parser, | XmlParser& parser, |
|
|
XmlParser& parser, | XmlParser& parser, |
CIMParameter& parameter); | CIMParameter& parameter); |
| |
|
static Boolean getParameterReferenceArrayElement( |
|
XmlParser& parser, |
|
CIMParameter& parameter); |
|
|
static Boolean getQualifierDeclElement( | static Boolean getQualifierDeclElement( |
XmlParser& parser, | XmlParser& parser, |
CIMQualifierDecl& qualifierDecl); | CIMQualifierDecl& qualifierDecl); |
|
|
XmlParser& parser, | XmlParser& parser, |
CIMInstance& cimInstance); | CIMInstance& cimInstance); |
| |
|
static Boolean getNamedInstanceElement( |
|
XmlParser& parser, |
|
CIMInstance& namedInstance); |
|
|
static void getObject(XmlParser& parser, CIMClass& x); | static void getObject(XmlParser& parser, CIMClass& x); |
| |
static void getObject(XmlParser& parser, CIMInstance& x); | static void getObject(XmlParser& parser, CIMInstance& x); |
|
|
static Boolean getMessageStartTag( | static Boolean getMessageStartTag( |
XmlParser& parser, | XmlParser& parser, |
String& id, | String& id, |
const char*& protocolVersion); |
String& protocolVersion); |
| |
static Boolean getIMethodCallStartTag( | static Boolean getIMethodCallStartTag( |
XmlParser& parser, | XmlParser& parser, |
|
|
| |
static Boolean getErrorElement( | static Boolean getErrorElement( |
XmlParser& parser, | XmlParser& parser, |
CIMStatusCode& code, |
CIMException& cimException, |
const char*& description, |
|
Boolean required = false); | Boolean required = false); |
| |
static Boolean getObjectWithPath( |
static Boolean getValueObjectElement( |
|
XmlParser& parser, |
|
CIMObject& object); |
|
|
|
static Boolean getValueObjectWithPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMObjectWithPath& objectWithPath); | CIMObjectWithPath& objectWithPath); |
| |
|
static Boolean getValueObjectWithLocalPathElement( |
|
XmlParser& parser, |
|
CIMObjectWithPath& objectWithPath); |
|
|
|
static void getObjectArray( |
|
XmlParser& parser, |
|
Array<CIMObjectWithPath>& objectArray); |
|
|
static Boolean getObjectNameElement( | static Boolean getObjectNameElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& objectName); |
CIMObjectPath& objectName); |
| |
static Boolean getObjectPathElement( | static Boolean getObjectPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMReference& objectPath); |
CIMObjectPath& objectPath); |
| |
static Boolean getEMethodCallStartTag( | static Boolean getEMethodCallStartTag( |
XmlParser& parser, | XmlParser& parser, |
|
|
XmlParser& parser, | XmlParser& parser, |
const char*& name); | const char*& name); |
| |
|
static Boolean getMethodCallStartTag( |
|
XmlParser& parser, |
|
const char*& name); |
|
|
|
static Boolean getMethodResponseStartTag( |
|
XmlParser& parser, |
|
const char*& name); |
|
|
|
static Boolean getParamValueElement( |
|
XmlParser& parser, |
|
CIMParamValue& paramValue); |
|
|
|
static Boolean getReturnValueElement( |
|
XmlParser& parser, |
|
CIMValue& returnValue); |
|
|
private: | private: |
| |
XmlReader() | XmlReader() |