version 1.28, 2002/05/15 23:14:21
|
version 1.50, 2006/01/30 16:17:08
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// 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 |
|
|
#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/CIMType.h> |
#include <Pegasus/Common/CIMObjectPath.h> | #include <Pegasus/Common/CIMObjectPath.h> |
|
#include <Pegasus/Common/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
class CIMParameter; | class CIMParameter; |
class CIMMethod; | class CIMMethod; |
class CIMObject; | class CIMObject; |
class CIMNamedInstance; |
|
class CIMObjectWithPath; |
|
class CIMParamValue; | class CIMParamValue; |
|
class CIMValue; |
| |
class PEGASUS_COMMON_LINKAGE XmlReader | class PEGASUS_COMMON_LINKAGE XmlReader |
{ | { |
|
|
XmlEntry& entry, | XmlEntry& entry, |
const char* tagName); | const char* tagName); |
| |
|
static void skipElement( |
|
XmlParser& parser, |
|
XmlEntry& entry); |
|
|
static Boolean expectContentOrCData( | static Boolean expectContentOrCData( |
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry); | XmlEntry& entry); |
|
|
XmlEntry& entry, | XmlEntry& entry, |
const char* tagName); | const char* tagName); |
| |
|
static Boolean testStartTagOrEmptyTag( |
|
XmlParser& parser, |
|
XmlEntry& entry); |
|
|
static Boolean testContentOrCData( | static Boolean testContentOrCData( |
XmlParser& parser, | XmlParser& parser, |
XmlEntry& entry); | XmlEntry& entry); |
|
|
const char*& cimVersion, | const char*& cimVersion, |
const char*& dtdVersion); | const char*& dtdVersion); |
| |
static String getCimNameAttribute( |
static CIMName getCimNameAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName, | const char* elementName, |
|
|
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName); | const char* elementName); |
| |
static String getClassOriginAttribute( |
static CIMName getClassOriginAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* tagName); | const char* tagName); |
| |
static String getReferenceClassAttribute( |
static String getEmbeddedObjectAttribute( |
|
Uint32 lineNumber, |
|
const XmlEntry& entry, |
|
const char* tagName); |
|
|
|
static CIMName getReferenceClassAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName); | const char* elementName); |
| |
static String getSuperClassAttribute( |
static CIMName getSuperClassAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* tagName); | const char* tagName); |
| |
static CIMType getCimTypeAttribute( |
static Boolean getCimTypeAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
|
CIMType& cimType, // Output parameter |
const char* tagName, | const char* tagName, |
const char* attributeName = "TYPE", | const char* attributeName = "TYPE", |
Boolean required = true); | Boolean required = true); |
|
|
Boolean defaultValue, | Boolean defaultValue, |
Boolean required); | Boolean required); |
| |
|
static String decodeURICharacters(String uriString); |
|
|
static Boolean stringToReal( | static Boolean stringToReal( |
const char* stringValue, | const char* stringValue, |
Real64& x); | Real64& x); |
|
|
CIMType type, | CIMType type, |
CIMValue& value); | CIMValue& value); |
| |
static Uint32 getFlavor( |
static CIMFlavor getFlavor( |
XmlEntry& entry, | XmlEntry& entry, |
Uint32 lineNumber, | Uint32 lineNumber, |
const char* tagName); | const char* tagName); |
| |
static Uint32 getOptionalScope( |
static CIMScope getOptionalScope( |
XmlParser& parser); | XmlParser& parser); |
| |
static Boolean getQualifierElement( | static Boolean getQualifierElement( |
|
|
| |
static Boolean getNameSpaceElement( | static Boolean getNameSpaceElement( |
XmlParser& parser, | XmlParser& parser, |
String& nameSpaceComponent); |
CIMName& nameSpaceComponent); |
| |
static Boolean getLocalNameSpacePathElement( | static Boolean getLocalNameSpacePathElement( |
XmlParser& parser, | XmlParser& parser, |
|
|
| |
static Boolean getClassNameElement( | static Boolean getClassNameElement( |
XmlParser& parser, | XmlParser& parser, |
String& className, |
CIMName& className, |
Boolean required = false); | Boolean required = false); |
| |
static KeyBinding::Type getValueTypeAttribute( |
static CIMKeyBinding::Type getValueTypeAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName); | const char* elementName); |
| |
static Boolean getKeyValueElement( | static Boolean getKeyValueElement( |
XmlParser& parser, | XmlParser& parser, |
KeyBinding::Type& type, |
CIMKeyBinding::Type& type, |
String& value); | String& value); |
| |
static Boolean getKeyBindingElement( | static Boolean getKeyBindingElement( |
XmlParser& parser, | XmlParser& parser, |
String& name, |
CIMName& name, |
String& value, | String& value, |
KeyBinding::Type& type); |
CIMKeyBinding::Type& type); |
| |
static Boolean getInstanceNameElement( | static Boolean getInstanceNameElement( |
XmlParser& parser, | XmlParser& parser, |
String& className, | String& className, |
Array<KeyBinding>& keyBindings); |
Array<CIMKeyBinding>& keyBindings); |
| |
static Boolean getInstanceNameElement( | static Boolean getInstanceNameElement( |
XmlParser& parser, | XmlParser& parser, |
|
|
| |
static Boolean getNamedInstanceElement( | static Boolean getNamedInstanceElement( |
XmlParser& parser, | XmlParser& parser, |
CIMNamedInstance& namedInstance); |
CIMInstance& namedInstance); |
| |
static void getObject(XmlParser& parser, CIMClass& x); | static void getObject(XmlParser& parser, CIMClass& x); |
| |
|
|
| |
static Boolean getIMethodResponseStartTag( | static Boolean getIMethodResponseStartTag( |
XmlParser& parser, | XmlParser& parser, |
const char*& name); |
const char*& name, |
|
Boolean& isEmptyTag); |
| |
static Boolean getIParamValueTag( | static Boolean getIParamValueTag( |
XmlParser& parser, | XmlParser& parser, |
const char*& name); |
const char*& name, |
|
Boolean& isEmptyTag); |
|
|
|
static void rejectNullIParamValue( |
|
XmlParser& parser, |
|
Boolean isEmptyTag, |
|
const char* paramName); |
| |
static Boolean getPropertyValue( | static Boolean getPropertyValue( |
XmlParser& parser, | XmlParser& parser, |
|
|
| |
static Boolean getValueObjectWithPathElement( | static Boolean getValueObjectWithPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMObjectWithPath& objectWithPath); |
CIMObject& objectWithPath); |
| |
static Boolean getValueObjectWithLocalPathElement( | static Boolean getValueObjectWithLocalPathElement( |
XmlParser& parser, | XmlParser& parser, |
CIMObjectWithPath& objectWithPath); |
CIMObject& objectWithPath); |
| |
static void getObjectArray( | static void getObjectArray( |
XmlParser& parser, | XmlParser& parser, |
Array<CIMObjectWithPath>& objectArray); |
Array<CIMObject>& objectArray); |
| |
static Boolean getObjectNameElement( | static Boolean getObjectNameElement( |
XmlParser& parser, | XmlParser& parser, |
|
|
| |
static Boolean getEMethodResponseStartTag( | static Boolean getEMethodResponseStartTag( |
XmlParser& parser, | XmlParser& parser, |
|
const char*& name, |
|
Boolean& isEmptyTag); |
|
|
|
static Boolean getEParamValueTag( |
|
XmlParser& parser, |
const char*& name); | const char*& name); |
| |
static Boolean getMethodCallStartTag( | static Boolean getMethodCallStartTag( |
|
|
| |
static Boolean getMethodResponseStartTag( | static Boolean getMethodResponseStartTag( |
XmlParser& parser, | XmlParser& parser, |
const char*& name); |
const char*& name, |
|
Boolean& isEmptyTag); |
| |
static Boolean getParamValueElement( | static Boolean getParamValueElement( |
XmlParser& parser, | XmlParser& parser, |