version 1.2, 2001/02/16 02:06:07
|
version 1.6, 2001/04/08 01:13:22
|
|
|
// Author: | // Author: |
// | // |
// $Log$ | // $Log$ |
|
// Revision 1.6 2001/04/08 01:13:22 mike |
|
// Changed "ConstCIM" to "CIMConst" |
|
// |
|
// Revision 1.4 2001/02/26 04:33:28 mike |
|
// Fixed many places where cim names were be compared with operator==(String,String). |
|
// Changed all of these to use CIMName::equal() |
|
// |
|
// Revision 1.3 2001/02/19 01:47:16 mike |
|
// Renamed names of the form CIMConst to CIMConst. |
|
// |
// Revision 1.2 2001/02/16 02:06:07 mike | // Revision 1.2 2001/02/16 02:06:07 mike |
// Renamed many classes and headers. | // Renamed many classes and headers. |
// | // |
|
|
if (!entry.getAttributeValue("VALUETYPE", tmp)) | if (!entry.getAttributeValue("VALUETYPE", tmp)) |
return KeyBinding::STRING; | return KeyBinding::STRING; |
| |
if (tmp == "string") |
if (String::equal(tmp, "string")) |
return KeyBinding::STRING; | return KeyBinding::STRING; |
else if (tmp == "boolean") |
else if (String::equal(tmp, "boolean")) |
return KeyBinding::BOOLEAN; | return KeyBinding::BOOLEAN; |
else if (tmp == "numeric") |
else if (String::equal(tmp, "numeric")) |
return KeyBinding::NUMERIC; | return KeyBinding::NUMERIC; |
| |
char buffer[MESSAGE_SIZE]; | char buffer[MESSAGE_SIZE]; |
|
|
// | // |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
Boolean XmlReader::getClassElement(XmlParser& parser, CIMClass& classDecl) |
Boolean XmlReader::getClassElement(XmlParser& parser, CIMClass& cimClass) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
| |
|
|
| |
String superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); | String superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS"); |
| |
classDecl = CIMClass(name, superClass); |
cimClass = CIMClass(name, superClass); |
| |
// Get QUALIFIER elements: | // Get QUALIFIER elements: |
| |
getQualifierElements(parser, classDecl); |
getQualifierElements(parser, cimClass); |
| |
// Get PROPERTY elements: | // Get PROPERTY elements: |
| |
GetPropertyElements(parser, classDecl); |
GetPropertyElements(parser, cimClass); |
| |
// Get METHOD elements: | // Get METHOD elements: |
| |
CIMMethod method; | CIMMethod method; |
| |
while (getMethodElement(parser, method)) | while (getMethodElement(parser, method)) |
classDecl.addMethod(method); |
cimClass.addMethod(method); |
| |
// Get CLASS end tag: | // Get CLASS end tag: |
| |
|
|
| |
Boolean XmlReader::getInstanceElement( | Boolean XmlReader::getInstanceElement( |
XmlParser& parser, | XmlParser& parser, |
CIMInstance& instanceDecl) |
CIMInstance& cimInstance) |
{ | { |
XmlEntry entry; | XmlEntry entry; |
| |
|
|
String className = getClassNameAttribute( | String className = getClassNameAttribute( |
parser.getLine(), entry, "INSTANCE"); | parser.getLine(), entry, "INSTANCE"); |
| |
instanceDecl = CIMInstance(className); |
cimInstance = CIMInstance(className); |
| |
// Get QUALIFIER elements: | // Get QUALIFIER elements: |
| |
getQualifierElements(parser, instanceDecl); |
getQualifierElements(parser, cimInstance); |
| |
// Get PROPERTY elements: | // Get PROPERTY elements: |
| |
GetPropertyElements(parser, instanceDecl); |
GetPropertyElements(parser, cimInstance); |
| |
// Get INSTANCE end tag: | // Get INSTANCE end tag: |
| |
|
|
| |
Boolean XmlReader::getErrorElement( | Boolean XmlReader::getErrorElement( |
XmlParser& parser, | XmlParser& parser, |
CimException::Code& code, |
CIMException::Code& code, |
const char*& description, | const char*& description, |
Boolean required) | Boolean required) |
{ | { |
|
|
throw XmlValidationError( | throw XmlValidationError( |
parser.getLine(), "missing ERROR.CODE attribute"); | parser.getLine(), "missing ERROR.CODE attribute"); |
| |
code = CimException::Code(tmpCode); |
code = CIMException::Code(tmpCode); |
| |
// Get ERROR.DESCRIPTION: | // Get ERROR.DESCRIPTION: |
| |