(file) Return to XmlReader.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.64 and 1.75.2.1

version 1.64, 2002/08/08 18:30:00 version 1.75.2.1, 2002/10/28 15:43:24
Line 383 
Line 383 
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 CIMName XmlReader::getClassOriginAttribute(  String XmlReader::getClassOriginAttribute(
     Uint32 lineNumber,     Uint32 lineNumber,
     const XmlEntry& entry,     const XmlEntry& entry,
     const char* tagName)     const char* tagName)
Line 391 
Line 391 
     String name;     String name;
  
     if (!entry.getAttributeValue("CLASSORIGIN", name))     if (!entry.getAttributeValue("CLASSORIGIN", name))
         return CIMName();          return String();
  
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
Line 412 
Line 412 
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 CIMName XmlReader::getReferenceClassAttribute(  String XmlReader::getReferenceClassAttribute(
     Uint32 lineNumber,     Uint32 lineNumber,
     const XmlEntry& entry,     const XmlEntry& entry,
     const char* elementName)     const char* elementName)
Line 420 
Line 420 
     String name;     String name;
  
     if (!entry.getAttributeValue("REFERENCECLASS", name))     if (!entry.getAttributeValue("REFERENCECLASS", name))
         return CIMName();          return String();
  
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
Line 441 
Line 441 
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 CIMName XmlReader::getSuperClassAttribute(  String XmlReader::getSuperClassAttribute(
     Uint32 lineNumber,     Uint32 lineNumber,
     const XmlEntry& entry,     const XmlEntry& entry,
     const char* tagName)     const char* tagName)
Line 449 
Line 449 
     String superClass;     String superClass;
  
     if (!entry.getAttributeValue("SUPERCLASS", superClass))     if (!entry.getAttributeValue("SUPERCLASS", superClass))
         return CIMName();          return String();
  
     if (!CIMName::legal(superClass))     if (!CIMName::legal(superClass))
     {     {
Line 1375 
Line 1375 
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 CIMFlavor XmlReader::getFlavor(  Uint32 XmlReader::getFlavor(
     XmlEntry& entry,     XmlEntry& entry,
     Uint32 lineNumber,     Uint32 lineNumber,
     const char* tagName)     const char* tagName)
Line 1402 
Line 1402 
  
     // Start with CIMFlavor::NONE.  Defaults are specified in the     // Start with CIMFlavor::NONE.  Defaults are specified in the
     // getCimBooleanAttribute() calls above.     // getCimBooleanAttribute() calls above.
     CIMFlavor flavor = CIMFlavor (CIMFlavor::NONE);      Uint32 flavor = CIMFlavor::NONE;
  
     if (overridable)     if (overridable)
         flavor.addFlavor (CIMFlavor::OVERRIDABLE);          flavor |= CIMFlavor::OVERRIDABLE;
     else     else
         flavor.addFlavor (CIMFlavor::DISABLEOVERRIDE);                  flavor |= CIMFlavor::DISABLEOVERRIDE;
  
     if (toSubClass)     if (toSubClass)
         flavor.addFlavor (CIMFlavor::TOSUBCLASS);          flavor |= CIMFlavor::TOSUBCLASS;
     else     else
         flavor.addFlavor (CIMFlavor::RESTRICTED);                  flavor |= CIMFlavor::RESTRICTED;
  
     if (toInstance)     if (toInstance)
         flavor.addFlavor (CIMFlavor::TOINSTANCE);          flavor |= CIMFlavor::TOINSTANCE;
  
     if (translatable)     if (translatable)
         flavor.addFlavor (CIMFlavor::TRANSLATABLE);          flavor |= CIMFlavor::TRANSLATABLE;
  
     return flavor;     return flavor;
 } }
Line 1440 
Line 1440 
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
 CIMScope XmlReader::getOptionalScope(XmlParser& parser)  Uint32 XmlReader::getOptionalScope(XmlParser& parser)
 { {
     XmlEntry entry;     XmlEntry entry;
  
Line 1458 
Line 1458 
     }     }
  
     Uint32 line = parser.getLine();     Uint32 line = parser.getLine();
     CIMScope scope = CIMScope ();      Uint32 scope = 0;
  
     if (getCimBooleanAttribute(line, entry, "SCOPE", "CLASS", false, false))     if (getCimBooleanAttribute(line, entry, "SCOPE", "CLASS", false, false))
         scope.addScope (CIMScope::CLASS);          scope |= CIMScope::CLASS;
  
     if (getCimBooleanAttribute(     if (getCimBooleanAttribute(
         line, entry, "SCOPE", "ASSOCIATION", false, false))         line, entry, "SCOPE", "ASSOCIATION", false, false))
         scope.addScope (CIMScope::ASSOCIATION);          scope |= CIMScope::ASSOCIATION;
  
     if (getCimBooleanAttribute(     if (getCimBooleanAttribute(
         line, entry, "SCOPE", "REFERENCE", false, false))         line, entry, "SCOPE", "REFERENCE", false, false))
         scope.addScope (CIMScope::REFERENCE);          scope |= CIMScope::REFERENCE;
  
     if (getCimBooleanAttribute(line, entry, "SCOPE", "PROPERTY", false, false))     if (getCimBooleanAttribute(line, entry, "SCOPE", "PROPERTY", false, false))
         scope.addScope (CIMScope::PROPERTY);          scope |= CIMScope::PROPERTY;
  
     if (getCimBooleanAttribute(line, entry, "SCOPE", "METHOD", false, false))     if (getCimBooleanAttribute(line, entry, "SCOPE", "METHOD", false, false))
         scope.addScope (CIMScope::METHOD);          scope |= CIMScope::METHOD;
  
     if (getCimBooleanAttribute(line, entry, "SCOPE", "PARAMETER", false, false))     if (getCimBooleanAttribute(line, entry, "SCOPE", "PARAMETER", false, false))
         scope.addScope (CIMScope::PARAMETER);          scope |= CIMScope::PARAMETER;
  
     if (getCimBooleanAttribute(line, entry, "SCOPE", "INDICATION",false, false))     if (getCimBooleanAttribute(line, entry, "SCOPE", "INDICATION",false, false))
         scope.addScope (CIMScope::INDICATION);          scope |= CIMScope::INDICATION;
  
     if (!isEmptyTag)     if (!isEmptyTag)
         expectEndTag(parser, "SCOPE");         expectEndTag(parser, "SCOPE");
Line 1527 
Line 1527 
  
     // Get flavor oriented attributes:     // Get flavor oriented attributes:
  
     CIMFlavor flavor = getFlavor(entry, parser.getLine(), "QUALIFIER");      Uint32 flavor = getFlavor(entry, parser.getLine(), "QUALIFIER");
  
     // Get VALUE or VALUE.ARRAY element:     // Get VALUE or VALUE.ARRAY element:
  
Line 1601 
Line 1601 
  
     // Get PROPERTY.CLASSORIGIN attribute:     // Get PROPERTY.CLASSORIGIN attribute:
  
     CIMName classOrigin =      String classOrigin =
         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
  
     // Get PROPERTY.PROPAGATED     // Get PROPERTY.PROPAGATED
Line 1616 
Line 1616 
     // Create property: Sets type and !isarray     // Create property: Sets type and !isarray
  
     CIMValue value(type, false);     CIMValue value(type, false);
     property = CIMProperty(name, value, 0, CIMName(), classOrigin, propagated);      property = CIMProperty(name, value, 0, String(), classOrigin, propagated);
  
     if (!empty)     if (!empty)
     {     {
Line 1713 
Line 1713 
  
     // Get PROPERTY.CLASSORIGIN attribute:     // Get PROPERTY.CLASSORIGIN attribute:
  
     CIMName classOrigin      String classOrigin
         = getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");         = getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.ARRAY");
  
     // Get PROPERTY.ARRAY.PROPAGATED     // Get PROPERTY.ARRAY.PROPAGATED
Line 1725 
Line 1725 
  
     CIMValue value(type, true, arraySize);     CIMValue value(type, true, arraySize);
     property = CIMProperty(     property = CIMProperty(
         name, value, arraySize, CIMName(), classOrigin, propagated);          name, value, arraySize, String(), classOrigin, propagated);
  
     if (!empty)     if (!empty)
     {     {
Line 2113 
Line 2113 
     if (!XmlReader::getInstanceNameElement(parser, className, keyBindings))     if (!XmlReader::getInstanceNameElement(parser, className, keyBindings))
         return false;         return false;
  
     instanceName.set(String(), CIMNamespaceName(), className, keyBindings);      instanceName.set(String(), String(), className, keyBindings);
     return true;     return true;
 } }
  
Line 2324 
Line 2324 
         parser.putBack(entry);         parser.putBack(entry);
         String className;         String className;
         getClassNameElement(parser, className);         getClassNameElement(parser, className);
         reference.set(String(), CIMNamespaceName(), className);          reference.set(String(), String(), className);
     }     }
     else if (strcmp(entry.text, "INSTANCEPATH") == 0)     else if (strcmp(entry.text, "INSTANCEPATH") == 0)
     {     {
Line 2342 
Line 2342 
         String className;         String className;
         Array<KeyBinding> keyBindings;         Array<KeyBinding> keyBindings;
         getInstanceNameElement(parser, className, keyBindings);         getInstanceNameElement(parser, className, keyBindings);
         reference.set(String(), CIMNamespaceName(), className, keyBindings);          reference.set(String(), String(), className, keyBindings);
     }     }
  
     expectEndTag(parser, "VALUE.REFERENCE");     expectEndTag(parser, "VALUE.REFERENCE");
Line 2419 
Line 2419 
  
     // Get PROPERTY.REFERENCECLASS attribute:     // Get PROPERTY.REFERENCECLASS attribute:
  
     CIMName referenceClass = getReferenceClassAttribute(      String referenceClass = getReferenceClassAttribute(
         parser.getLine(), entry, "PROPERTY.REFERENCE");         parser.getLine(), entry, "PROPERTY.REFERENCE");
  
     // Get PROPERTY.CLASSORIGIN attribute:     // Get PROPERTY.CLASSORIGIN attribute:
  
     CIMName classOrigin =      String classOrigin =
         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE");         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY.REFERENCE");
  
     // Get PROPERTY.PROPAGATED     // Get PROPERTY.PROPAGATED
Line 2604 
Line 2604 
  
     // Get PARAMETER.REFERENCECLASS attribute:     // Get PARAMETER.REFERENCECLASS attribute:
  
     CIMName referenceClass = getReferenceClassAttribute(      String referenceClass = getReferenceClassAttribute(
         parser.getLine(), entry, "PARAMETER.REFERENCE");         parser.getLine(), entry, "PARAMETER.REFERENCE");
  
     // Create parameter:     // Create parameter:
Line 2650 
Line 2650 
  
     // Get PARAMETER.REFERENCECLASS attribute:     // Get PARAMETER.REFERENCECLASS attribute:
  
     CIMName referenceClass = getReferenceClassAttribute(      String referenceClass = getReferenceClassAttribute(
         parser.getLine(), entry, "PARAMETER.REFARRAY");         parser.getLine(), entry, "PARAMETER.REFARRAY");
  
     // Get PARAMETER.ARRAYSIZE attribute:     // Get PARAMETER.ARRAYSIZE attribute:
Line 2749 
Line 2749 
  
     // Get flavor oriented attributes:     // Get flavor oriented attributes:
  
     CIMFlavor flavor = getFlavor (entry, parser.getLine (),      Uint32 flavor = getFlavor(entry,parser.getLine(), "QUALIFIER.DECLARATION");
         "QUALIFIER.DECLARATION");  
  
     // No need to look for interior elements if empty tag:     // No need to look for interior elements if empty tag:
  
     CIMScope scope = CIMScope ();      Uint32 scope = CIMScope::NONE;
     CIMValue value;     CIMValue value;
  
     if (!empty)     if (!empty)
Line 2834 
Line 2833 
  
     CIMType type = getCimTypeAttribute(parser.getLine(), entry, "PROPERTY");     CIMType type = getCimTypeAttribute(parser.getLine(), entry, "PROPERTY");
  
     CIMName classOrigin =      String classOrigin =
         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");         getClassOriginAttribute(parser.getLine(), entry, "PROPERTY");
  
     Boolean propagated = getCimBooleanAttribute(     Boolean propagated = getCimBooleanAttribute(
Line 2874 
Line 2873 
  
     String name = getCimNameAttribute(parser.getLine(), entry, "CLASS");     String name = getCimNameAttribute(parser.getLine(), entry, "CLASS");
  
     CIMName superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS");      String superClass = getSuperClassAttribute(parser.getLine(), entry,"CLASS");
  
     cimClass = CIMClass(name, superClass);     cimClass = CIMClass(name, superClass);
  
Line 3423 
Line 3422 
  
     if (getClassNameElement(parser, className, false))     if (getClassNameElement(parser, className, false))
     {     {
         objectName.set(String(), CIMNamespaceName(), className);          objectName.set(String(), String(), className);
         return true;         return true;
     }     }
     else if (getInstanceNameElement(parser, objectName))     else if (getInstanceNameElement(parser, objectName))


Legend:
Removed from v.1.64  
changed lines
  Added in v.1.75.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2