version 1.73, 2002/09/12 17:27:01
|
version 1.74, 2002/09/13 21:40:42
|
|
|
#include "CIMParamValue.h" | #include "CIMParamValue.h" |
#include "System.h" | #include "System.h" |
| |
//#define PEGASUS_SINT64_MIN (-PEGASUS_SINT64_LITERAL(9223372036854775808)) |
#define PEGASUS_SINT64_MIN (-PEGASUS_SINT64_LITERAL(0x8000000000000000)) |
//#define PEGASUS_UINT64_MAX PEGASUS_UINT64_LITERAL(18446744073709551615) |
#define PEGASUS_UINT64_MAX PEGASUS_UINT64_LITERAL(0xFFFFFFFFFFFFFFFF) |
#define PEGASUS_SINT64_MIN (-PEGASUS_SINT64_LITERAL((Sint64) 0x8000000000000000)) |
|
#define PEGASUS_UINT64_MAX PEGASUS_UINT64_LITERAL((Uint64) 0xFFFFFFFFFFFFFFFF) |
|
| |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
String XmlReader::getCimNameAttribute( |
CIMName XmlReader::getCimNameAttribute( |
Uint32 lineNumber, | Uint32 lineNumber, |
const XmlEntry& entry, | const XmlEntry& entry, |
const char* elementName, | const char* elementName, |
|
|
} | } |
| |
if (acceptNull && name.size() == 0) | if (acceptNull && name.size() == 0) |
return name; |
return CIMName (); |
| |
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
{ | { |
|
|
throw XmlSemanticError(lineNumber, buffer); | throw XmlSemanticError(lineNumber, buffer); |
} | } |
| |
return name; |
return CIMName (name); |
} | } |
| |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
|
|
| |
// Get QUALIFIER.NAME attribute: | // Get QUALIFIER.NAME attribute: |
| |
String name = getCimNameAttribute(parser.getLine(), entry, "QUALIFIER"); |
CIMName name = getCimNameAttribute(parser.getLine(), entry, "QUALIFIER"); |
| |
// Get QUALIFIER.TYPE attribute: | // Get QUALIFIER.TYPE attribute: |
| |
|
|
| |
// Get PROPERTY.NAME attribute: | // Get PROPERTY.NAME attribute: |
| |
String name = getCimNameAttribute(parser.getLine(), entry, "PROPERTY"); |
CIMName name = getCimNameAttribute(parser.getLine(), entry, "PROPERTY"); |
| |
// Get PROPERTY.CLASSORIGIN attribute: | // Get PROPERTY.CLASSORIGIN attribute: |
| |
|
|
| |
// Get PROPERTY.NAME attribute: | // Get PROPERTY.NAME attribute: |
| |
String name = |
CIMName name = |
getCimNameAttribute(parser.getLine(), entry, "PROPERTY.ARRAY"); | getCimNameAttribute(parser.getLine(), entry, "PROPERTY.ARRAY"); |
| |
// Get PROPERTY.TYPE attribute: | // Get PROPERTY.TYPE attribute: |
|
|
| |
Boolean XmlReader::getNameSpaceElement( | Boolean XmlReader::getNameSpaceElement( |
XmlParser& parser, | XmlParser& parser, |
String& nameSpaceComponent) |
CIMName& nameSpaceComponent) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
| |
|
|
if (!testStartTag(parser, entry, "LOCALNAMESPACEPATH")) | if (!testStartTag(parser, entry, "LOCALNAMESPACEPATH")) |
return false; | return false; |
| |
String nameSpaceComponent; |
CIMName nameSpaceComponent; |
| |
while (getNameSpaceElement(parser, nameSpaceComponent)) | while (getNameSpaceElement(parser, nameSpaceComponent)) |
{ | { |
if (nameSpace.size()) | if (nameSpace.size()) |
nameSpace.append('/'); | nameSpace.append('/'); |
| |
nameSpace.append(nameSpaceComponent); |
nameSpace.append(nameSpaceComponent.getString()); |
} | } |
| |
if (!nameSpace.size()) | if (!nameSpace.size()) |
|
|
| |
Boolean XmlReader::getClassNameElement( | Boolean XmlReader::getClassNameElement( |
XmlParser& parser, | XmlParser& parser, |
String& className, |
CIMName& className, |
Boolean required) | Boolean required) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
|
|
| |
Boolean XmlReader::getKeyBindingElement( | Boolean XmlReader::getKeyBindingElement( |
XmlParser& parser, | XmlParser& parser, |
String& name, |
CIMName& name, |
String& value, | String& value, |
CIMKeyBinding::Type& type) | CIMKeyBinding::Type& type) |
{ | { |
|
|
return true; | return true; |
} | } |
| |
String name; |
CIMName name; |
CIMKeyBinding::Type type; | CIMKeyBinding::Type type; |
String value; | String value; |
CIMObjectPath reference; | CIMObjectPath reference; |
|
|
"expected NAMESPACEPATH element"); | "expected NAMESPACEPATH element"); |
} | } |
| |
String className; |
CIMName className; |
| |
if (!getClassNameElement(parser, className)) | if (!getClassNameElement(parser, className)) |
{ | { |
|
|
"expected LOCALNAMESPACEPATH element"); | "expected LOCALNAMESPACEPATH element"); |
} | } |
| |
String className; |
CIMName className; |
| |
if (!getClassNameElement(parser, className)) | if (!getClassNameElement(parser, className)) |
{ | { |
|
|
else if (strcmp(entry.text, "CLASSNAME") == 0) | else if (strcmp(entry.text, "CLASSNAME") == 0) |
{ | { |
parser.putBack(entry); | parser.putBack(entry); |
String className; |
CIMName className; |
getClassNameElement(parser, className); | getClassNameElement(parser, className); |
reference.set(String(), CIMNamespaceName(), className); | reference.set(String(), CIMNamespaceName(), className); |
} | } |
|
|
| |
// Get PROPERTY.NAME attribute: | // Get PROPERTY.NAME attribute: |
| |
String name = getCimNameAttribute( |
CIMName name = getCimNameAttribute( |
parser.getLine(), entry, "PROPERTY.REFERENCE"); | parser.getLine(), entry, "PROPERTY.REFERENCE"); |
| |
// Get PROPERTY.REFERENCECLASS attribute: | // Get PROPERTY.REFERENCECLASS attribute: |
|
|
| |
// Get PARAMETER.NAME attribute: | // Get PARAMETER.NAME attribute: |
| |
String name = getCimNameAttribute(parser.getLine(), entry, "PARAMETER"); |
CIMName name = getCimNameAttribute(parser.getLine(), entry, "PARAMETER"); |
| |
// Get PARAMETER.TYPE attribute: | // Get PARAMETER.TYPE attribute: |
| |
|
|
| |
// Get PARAMETER.ARRAY.NAME attribute: | // Get PARAMETER.ARRAY.NAME attribute: |
| |
String name = getCimNameAttribute( |
CIMName name = getCimNameAttribute( |
parser.getLine(), entry, "PARAMETER.ARRAY"); | parser.getLine(), entry, "PARAMETER.ARRAY"); |
| |
// Get PARAMETER.ARRAY.TYPE attribute: | // Get PARAMETER.ARRAY.TYPE attribute: |
|
|
| |
// Get PARAMETER.NAME attribute: | // Get PARAMETER.NAME attribute: |
| |
String name = getCimNameAttribute( |
CIMName name = getCimNameAttribute( |
parser.getLine(), entry, "PARAMETER.REFERENCE"); | parser.getLine(), entry, "PARAMETER.REFERENCE"); |
| |
// Get PARAMETER.REFERENCECLASS attribute: | // Get PARAMETER.REFERENCECLASS attribute: |
|
|
| |
// Get PARAMETER.NAME attribute: | // Get PARAMETER.NAME attribute: |
| |
String name = getCimNameAttribute( |
CIMName name = getCimNameAttribute( |
parser.getLine(), entry, "PARAMETER.REFARRAY"); | parser.getLine(), entry, "PARAMETER.REFARRAY"); |
| |
// Get PARAMETER.REFERENCECLASS attribute: | // Get PARAMETER.REFERENCECLASS attribute: |
|
|
| |
// Get NAME attribute: | // Get NAME attribute: |
| |
String name = getCimNameAttribute( |
CIMName name = getCimNameAttribute( |
parser.getLine(), entry, "QUALIFIER.DECLARATION"); | parser.getLine(), entry, "QUALIFIER.DECLARATION"); |
| |
// Get TYPE attribute: | // Get TYPE attribute: |
|
|
| |
Boolean empty = entry.type == XmlEntry::EMPTY_TAG; | Boolean empty = entry.type == XmlEntry::EMPTY_TAG; |
| |
String name = getCimNameAttribute(parser.getLine(), entry, "PROPERTY"); |
CIMName name = getCimNameAttribute(parser.getLine(), entry, "PROPERTY"); |
| |
CIMType type; | CIMType type; |
getCimTypeAttribute(parser.getLine(), entry, type, "PROPERTY"); | getCimTypeAttribute(parser.getLine(), entry, type, "PROPERTY"); |
|
|
if (!testStartTag(parser, entry, "CLASS")) | if (!testStartTag(parser, entry, "CLASS")) |
return false; | return false; |
| |
String name = getCimNameAttribute(parser.getLine(), entry, "CLASS"); |
CIMName name = getCimNameAttribute(parser.getLine(), entry, "CLASS"); |
| |
CIMName superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); | CIMName superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); |
| |
|
|
XmlParser& parser, | XmlParser& parser, |
CIMObjectPath& objectName) | CIMObjectPath& objectName) |
{ | { |
String className; |
CIMName className; |
| |
if (getClassNameElement(parser, className, false)) | if (getClassNameElement(parser, className, false)) |
{ | { |