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

Diff for /pegasus/src/Pegasus/Common/SCMOXmlWriter.cpp between version 1.1.2.14 and 1.4.2.10

version 1.1.2.14, 2009/10/30 12:29:47 version 1.4.2.10, 2014/03/31 22:46:03
Line 27 
Line 27 
 // //
 ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 // //
   // This code implements part of PEP#348 - The CMPI infrastructure using SCMO
   // (Single Chunk Memory Objects).
   // The design document can be found on the OpenPegasus website openpegasus.org
   // at https://collaboration.opengroup.org/pegasus/pp/documents/21210/PEP_348.pdf
   //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <cstdlib> #include <cstdlib>
 #include <cstdio> #include <cstdio>
 #include <Pegasus/Common/SCMOXmlWriter.h> #include <Pegasus/Common/SCMOXmlWriter.h>
   #include "Tracer.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
   void SCMOXmlWriter::buildPropertyFilterNodesArray(
        Array<Uint32> & nodes,
        const SCMOClass * classPtr,
        const CIMPropertyList & propertyList)
   {
       for (Uint32 i=0,k=propertyList.size(); i<k; i++)
       {
           Uint32 node = 0;
           const CIMName & name = propertyList[i];
           SCMO_RC rc =
               classPtr->_getProperyNodeIndex(
                   node,
                   (const char *)name.getString().getCString());
           if(rc == SCMO_OK)
           {
               nodes.append(node);
           }
       }
   }
   
   const Array<Uint32> & SCMOXmlWriter::getFilteredNodesArray(
        Array<propertyFilterNodesArray_t> & propFilterNodesArrays,
        const SCMOInstance& scmoInstance,
        const CIMPropertyList & propertyList)
   {
       //First see if the class ptr is already stored in the propFilterNodesArrays
       const SCMOClass * classPtr = scmoInstance.inst.hdr->theClass.ptr;
       SCMBClass_Main * classPtrMemBlock = classPtr->cls.hdr;
       for (int i=0, k=propFilterNodesArrays.size(); i < k; i++)
       {
           if (classPtrMemBlock == propFilterNodesArrays[i].classPtrMemBlock)
           {
               return propFilterNodesArrays[i].nodes;
           }
       }
   
       // Could not find the class pointer of this SCMOInstance in the
       // property filter nodes array
       // --> need to create the new entry and return that
       propertyFilterNodesArray_t newEntry;
       newEntry.classPtrMemBlock = classPtrMemBlock;
       SCMOXmlWriter::buildPropertyFilterNodesArray(
           newEntry.nodes,
           classPtr,
           propertyList);
       propFilterNodesArrays.append(newEntry);
   
       // return the new nodes entry, but as a reference into the array
       return propFilterNodesArrays[propFilterNodesArrays.size()-1].nodes;
   }
   
   void SCMOXmlWriter::appendValueSCMOInstanceElements(
        Buffer& out,
        const Array<SCMOInstance> & _scmoInstances,
        const CIMPropertyList & propertyList)
   {
       if (propertyList.isNull())
       {
           Array<Uint32> emptyNodes;
           for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++)
           {
               SCMOXmlWriter::appendValueSCMOInstanceElement(
                   out,
                   _scmoInstances[i],
                   false,
                   emptyNodes);
           }
       }
       else
       {
           Array<propertyFilterNodesArray_t> propFilterNodesArrays;
  
           for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++)
           {
               // This searches for an already created array of nodes,
               // if not found, creates it inside propFilterNodesArrays
               const Array<Uint32> & nodes=
                   SCMOXmlWriter::getFilteredNodesArray(
                       propFilterNodesArrays,
                       _scmoInstances[i],
                       propertyList);
   
               SCMOXmlWriter::appendValueSCMOInstanceElement(
                   out,
                   _scmoInstances[i],
                   true,
                   nodes);
           }
       }
   }
   
   // EXP_PULL_BEGIN
   void SCMOXmlWriter::appendValueSCMOInstanceWithPathElements(
        Buffer& out,
        const Array<SCMOInstance> & _scmoInstances,
        const CIMPropertyList & propertyList)
   {
       if (propertyList.isNull())
       {
           Array<Uint32> emptyNodes;
           for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++)
           {
               SCMOXmlWriter::appendValueInstanceWithPathElement(
                   out,
                   _scmoInstances[i],
                   false,
                   emptyNodes);
           }
       }
       else
       {
           Array<propertyFilterNodesArray_t> propFilterNodesArrays;
   
           for (Uint32 i = 0, n = _scmoInstances.size(); i < n; i++)
           {
               // This searches for an already created array of nodes,
               // if not found, creates it inside propFilterNodesArrays
               const Array<Uint32> & nodes=
                   SCMOXmlWriter::getFilteredNodesArray(
                       propFilterNodesArrays,
                       _scmoInstances[i],
                       propertyList);
   
               SCMOXmlWriter::appendValueInstanceWithPathElement(
                   out,
                   _scmoInstances[i],
                   true,
                   nodes);
           }
       }
   }
   //EXP_PULL_END
   
   // KS_TODO - Show the XML statement for this function
 void SCMOXmlWriter::appendValueSCMOInstanceElement( void SCMOXmlWriter::appendValueSCMOInstanceElement(
     Buffer& out,     Buffer& out,
     const SCMOInstance& scmoInstance)      const SCMOInstance& scmoInstance,
       bool filtered,
       const Array<Uint32> & nodes)
   
 { {
     out << STRLIT("<VALUE.NAMEDINSTANCE>\n");     out << STRLIT("<VALUE.NAMEDINSTANCE>\n");
  
     appendInstanceNameElement(out, scmoInstance);     appendInstanceNameElement(out, scmoInstance);
     appendInstanceElement(out, scmoInstance);      appendInstanceElement(out, scmoInstance,filtered,nodes);
  
     out << STRLIT("</VALUE.NAMEDINSTANCE>\n");     out << STRLIT("</VALUE.NAMEDINSTANCE>\n");
 } }
Line 53 
Line 195 
     const SCMOInstance& scmoInstance)     const SCMOInstance& scmoInstance)
 { {
     out << STRLIT("<INSTANCENAME CLASSNAME=\"");     out << STRLIT("<INSTANCENAME CLASSNAME=\"");
     Uint64 len;      Uint32 len;
     const char * className = scmoInstance.getClassName_l(len);     const char * className = scmoInstance.getClassName_l(len);
     out.append(className,len);     out.append(className,len);
     // TODO: check performance impact     // TODO: check performance impact
Line 82 
Line 224 
             if (SCMO_OK == smrc)             if (SCMO_OK == smrc)
             {             {
                 SCMOInstance * ref = kbValue->extRefPtr;                 SCMOInstance * ref = kbValue->extRefPtr;
                 appendValueReferenceElement(out, *ref, true);                  appendValueReferenceElement(out, *ref);
             }             }
         }         }
         else         else
Line 118 
Line 260 
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 void SCMOXmlWriter::appendInstanceElement( void SCMOXmlWriter::appendInstanceElement(
     Buffer& out,     Buffer& out,
     const SCMOInstance& scmoInstance)      const SCMOInstance& scmoInstance,
       bool filtered,
       const Array<Uint32> & nodes)
 { {
     // Class opening element:     // Class opening element:
  
     out << STRLIT("<INSTANCE CLASSNAME=\"");     out << STRLIT("<INSTANCE CLASSNAME=\"");
     Uint64 len;      Uint32 len;
     const char * className = scmoInstance.getClassName_l(len);     const char * className = scmoInstance.getClassName_l(len);
     out.append(className,len);     out.append(className,len);
     out.append('"',' ','>','\n');     out.append('"',' ','>','\n');
Line 132 
Line 276 
     // Append Instance Qualifiers:     // Append Instance Qualifiers:
     if (scmoInstance.inst.hdr->flags.includeQualifiers)     if (scmoInstance.inst.hdr->flags.includeQualifiers)
     {     {
         SCMBClass_Main *classMain=scmoInstance.inst.hdr->theClass->cls.hdr;          SCMBClass_Main *classMain=scmoInstance.inst.hdr->theClass.ptr->cls.hdr;
         char* clsbase = scmoInstance.inst.hdr->theClass->cls.base;          char* clsbase = scmoInstance.inst.hdr->theClass.ptr->cls.base;
  
         SCMBQualifier *theArray =         SCMBQualifier *theArray =
             (SCMBQualifier*)&(clsbase[classMain->qualifierArray.start]);             (SCMBQualifier*)&(clsbase[classMain->qualifierArray.start]);
Line 145 
Line 289 
     }     }
  
     // Append Properties:     // Append Properties:
     // getPropertyCount() returns number of properties, only non-filtered ones      if(!filtered)
     for (Uint32 i=0,k=scmoInstance.getPropertyCount();i<k;i++)      {
           for (Uint32 i=0,k=scmoInstance.inst.hdr->numberProperties;i<k;i++)
     {     {
         // function _getPropertyAt() used by appendPropertyElement  
         // translates the filter position of a property into the real one  
         // for us  
         SCMOXmlWriter::appendPropertyElement(out,scmoInstance,i);         SCMOXmlWriter::appendPropertyElement(out,scmoInstance,i);
     }     }
       }
       else
       {
           for (Uint32 i=0,k=nodes.size();i<k;i++)
           {
               SCMOXmlWriter::appendPropertyElement(out,scmoInstance,nodes[i]);
           }
       }
     // Instance closing element:     // Instance closing element:
     out << STRLIT("</INSTANCE>\n");     out << STRLIT("</INSTANCE>\n");
 } }
Line 245 
Line 395 
     Uint32 pos)     Uint32 pos)
 { {
     CIMType propertyType;     CIMType propertyType;
     Buffer embeddedQualifierOutput;  
  
     // This is an absolute pointer at a SCMBValue     // This is an absolute pointer at a SCMBValue
     SCMBValue * propertyValue;     SCMBValue * propertyValue;
Line 254 
Line 403 
     SCMBClassProperty * propertyDef;     SCMBClassProperty * propertyDef;
     // This is the absolute pointer at which the class info for the given     // This is the absolute pointer at which the class info for the given
     // instance starts     // instance starts
     const char* clsbase = scmoInstance.inst.hdr->theClass->cls.base;      const char* clsbase = scmoInstance.inst.hdr->theClass.ptr->cls.base;
  
     scmoInstance._getPropertyAt(     scmoInstance._getPropertyAt(
         pos,         pos,
Line 272 
Line 421 
  
         out.append(         out.append(
             &(clsbase[propertyDef->name.start]),             &(clsbase[propertyDef->name.start]),
             propertyDef->name.size-1);              (propertyDef->name.size-1));
  
         out.append('"',' ');         out.append('"',' ');
         //out << STRLIT("\" ");         //out << STRLIT("\" ");
Line 329 
Line 478 
                 out << STRLIT(" CLASSORIGIN=\"");                 out << STRLIT(" CLASSORIGIN=\"");
                 out.append(                 out.append(
                     &(clsbase[propertyDef->originClassName.start]),                     &(clsbase[propertyDef->originClassName.start]),
                     propertyDef->originClassName.size-1);                      (propertyDef->originClassName.size-1));
                 out.append('"');                 out.append('"');
             }             }
         }         }
Line 364 
Line 513 
         out << STRLIT("<PROPERTY.REFERENCE NAME=\"");         out << STRLIT("<PROPERTY.REFERENCE NAME=\"");
         out.append(         out.append(
             &(clsbase[propertyDef->name.start]),             &(clsbase[propertyDef->name.start]),
             propertyDef->name.size-1);              (propertyDef->name.size-1));
         out.append('"',' ');         out.append('"',' ');
         //out << STRLIT("\" ");         //out << STRLIT("\" ");
  
Line 373 
Line 522 
             out << STRLIT(" REFERENCECLASS=\"");             out << STRLIT(" REFERENCECLASS=\"");
             out.append(             out.append(
                 &(clsbase[propertyDef->refClassName.start]),                 &(clsbase[propertyDef->refClassName.start]),
                 propertyDef->refClassName.size-1);                  (propertyDef->refClassName.size-1));
             out.append('"');             out.append('"');
         }         }
  
Line 384 
Line 533 
                 out << STRLIT(" CLASSORIGIN=\"");                 out << STRLIT(" CLASSORIGIN=\"");
                 out.append(                 out.append(
                     &(clsbase[propertyDef->originClassName.start]),                     &(clsbase[propertyDef->originClassName.start]),
                     propertyDef->originClassName.size-1);                      (propertyDef->originClassName.size-1));
                 out.append('"');                 out.append('"');
             }             }
         }         }
Line 418 
Line 567 
  
         out.append(         out.append(
             &(clsbase[propertyDef->name.start]),             &(clsbase[propertyDef->name.start]),
             propertyDef->name.size-1);              (propertyDef->name.size-1));
  
         out.append('"',' ');         out.append('"',' ');
         //out << STRLIT("\" ");         //out << STRLIT("\" ");
Line 430 
Line 579 
                 out << STRLIT(" CLASSORIGIN=\"");                 out << STRLIT(" CLASSORIGIN=\"");
                 out.append(                 out.append(
                     &(clsbase[propertyDef->originClassName.start]),                     &(clsbase[propertyDef->originClassName.start]),
                     propertyDef->originClassName.size-1);                      (propertyDef->originClassName.size-1));
                 out.append('"');                 out.append('"');
             }             }
         }         }
Line 454 
Line 603 
                 out << STRLIT(" EmbeddedObject=\"object\""                 out << STRLIT(" EmbeddedObject=\"object\""
                               " EMBEDDEDOBJECT=\"object\"");                               " EMBEDDEDOBJECT=\"object\"");
             }             }
           }
             else if (propertyType == CIMTYPE_INSTANCE)             else if (propertyType == CIMTYPE_INSTANCE)
             {             {
                 out << STRLIT(" TYPE=\"string\""                 out << STRLIT(" TYPE=\"string\""
                               " EmbeddedObject=\"instance\""                               " EmbeddedObject=\"instance\""
                               " EMBEDDEDOBJECT=\"instance\"");                               " EMBEDDEDOBJECT=\"instance\"");
             }             }
         }  
         else         else
         {         {
             out.append(' ');             out.append(' ');
Line 524 
Line 673 
         SCMOInstance * ref = value.value.extRefPtr;         SCMOInstance * ref = value.value.extRefPtr;
         if (ref)         if (ref)
         {         {
             appendValueReferenceElement(out, *ref, true);              appendValueReferenceElement(out, *ref);
         }         }
     }     }
     else     else
Line 549 
Line 698 
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
 void SCMOXmlWriter::appendValueReferenceElement( void SCMOXmlWriter::appendValueReferenceElement(
     Buffer& out,     Buffer& out,
     const SCMOInstance& ref,      const SCMOInstance& ref)
     Boolean putValueWrapper)  
 {  
     if (putValueWrapper)  
     {     {
         out << STRLIT("<VALUE.REFERENCE>\n");         out << STRLIT("<VALUE.REFERENCE>\n");
   
       appendClassOrInstancePathElement(out, ref);
   
       out << STRLIT("</VALUE.REFERENCE>\n");
     }     }
  
   // Append either a class or instance Path Element
   void SCMOXmlWriter::appendClassOrInstancePathElement(
       Buffer& out,
       const SCMOInstance& ref)
   {
     // See if it is a class or instance reference (instance references have     // See if it is a class or instance reference (instance references have
     // key-bindings; class references do not).     // key-bindings; class references do not).
  
Line 574 
Line 729 
         }         }
         else         else
         {         {
             Uint64 classNameLength=0;              Uint32 classNameLength=0;
             const char* className = ref.getClassName_l(classNameLength);             const char* className = ref.getClassName_l(classNameLength);
             appendClassNameElement(out, className, classNameLength);             appendClassNameElement(out, className, classNameLength);
         }         }
Line 595 
Line 750 
             appendInstanceNameElement(out, ref);             appendInstanceNameElement(out, ref);
         }         }
     }     }
     if (putValueWrapper)  
     {  
         out << STRLIT("</VALUE.REFERENCE>\n");  
     }  
 } }
  
 // appendLocalInstancePathElement() // appendLocalInstancePathElement()
Line 608 
Line 759 
     const SCMOInstance& instancePath)     const SCMOInstance& instancePath)
 { {
     out << STRLIT("<LOCALINSTANCEPATH>\n");     out << STRLIT("<LOCALINSTANCEPATH>\n");
     Uint64 nsLength=0;      Uint32 nsLength=0;
     const char* ns=instancePath.getNameSpace_l(nsLength);     const char* ns=instancePath.getNameSpace_l(nsLength);
     appendLocalNameSpacePathElement(out, ns, nsLength);     appendLocalNameSpacePathElement(out, ns, nsLength);
     appendInstanceNameElement(out, instancePath);     appendInstanceNameElement(out, instancePath);
Line 623 
Line 774 
 { {
     out << STRLIT("<INSTANCEPATH>\n");     out << STRLIT("<INSTANCEPATH>\n");
  
     Uint64 hostnameLength=0;      Uint32 hostnameLength=0;
     const char* hostname=instancePath.getHostName_l(hostnameLength);     const char* hostname=instancePath.getHostName_l(hostnameLength);
     Uint64 nsLength=0;      Uint32 nsLength=0;
     const char* ns=instancePath.getNameSpace_l(nsLength);     const char* ns=instancePath.getNameSpace_l(nsLength);
     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);
  
Line 633 
Line 784 
     out << STRLIT("</INSTANCEPATH>\n");     out << STRLIT("</INSTANCEPATH>\n");
 } }
  
   void SCMOXmlWriter::appendValueObjectWithPathElement(
       Buffer& out,
       const Array<SCMOInstance> & objectWithPath,
       const CIMPropertyList& propertyList)
   {
       if (propertyList.isNull())
       {
           Array<Uint32> emptyNodes;
           for (Uint32 i = 0, n = objectWithPath.size(); i < n; i++)
           {
               SCMOXmlWriter::appendValueObjectWithPathElement(
                   out,
                   objectWithPath[i],
                   false,
                   emptyNodes);
           }
       }
       else
       {
           Array<propertyFilterNodesArray_t> propFilterNodesArrays;
           for (Uint32 i = 0, n = objectWithPath.size(); i < n; i++)
           {
               // This searches for an already created array of nodes,
               // if not found, creates it inside propFilterNodesArrays
               const Array<Uint32> & nodes=
                   SCMOXmlWriter::getFilteredNodesArray(
                       propFilterNodesArrays,
                       objectWithPath[i],
                       propertyList);
               SCMOXmlWriter::appendValueObjectWithPathElement(
                   out,
                   objectWithPath[i],
                   true,
                   nodes);
   
           }
       }
   }
   
   //EXP_PULL_BEGIN
   //------------------------------------------------------------------------------
   //
   // appendValueInstanceWithPathElement()
   //
   //     <!ELEMENT VALUE.INSTANCEWITHPATH (INSTANCEPATH,INSTANCE)>
   //
   //------------------------------------------------------------------------------
   // EXP_PULL_TBD checkout the INSTANCEPATH vs NAMEDINSTANCE differences
   // Can we create something more common
   void SCMOXmlWriter::appendValueInstanceWithPathElement(
       Buffer& out,
       const SCMOInstance& namedInstance,
       bool filtered,
       const Array<Uint32> & nodes)
   {
       out << STRLIT("<VALUE.INSTANCEWITHPATH>\n");
   
       appendInstancePathElement(out, namedInstance);
       appendInstanceElement(out, namedInstance, filtered, nodes);
   
       out << STRLIT("</VALUE.INSTANCEWITHPATH>\n");
   }
   //EXP_PULL_END
   
 // appendValueObjectWithPathElement() // appendValueObjectWithPathElement()
 //     <!ELEMENT VALUE.OBJECTWITHPATH //     <!ELEMENT VALUE.OBJECTWITHPATH
 //         ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))> //         ((CLASSPATH,CLASS)|(INSTANCEPATH,INSTANCE))>
 void SCMOXmlWriter::appendValueObjectWithPathElement( void SCMOXmlWriter::appendValueObjectWithPathElement(
     Buffer& out,     Buffer& out,
     const SCMOInstance& objectWithPath)      const SCMOInstance& objectWithPath,
       bool filtered,
       const Array<Uint32> & nodes)
 { {
     out << STRLIT("<VALUE.OBJECTWITHPATH>\n");     out << STRLIT("<VALUE.OBJECTWITHPATH>\n");
  
     appendValueReferenceElement(out, objectWithPath, false);      appendClassOrInstancePathElement(out, objectWithPath);
     appendObjectElement(out, objectWithPath);      appendObjectElement(out, objectWithPath,filtered,nodes);
  
     out << STRLIT("</VALUE.OBJECTWITHPATH>\n");     out << STRLIT("</VALUE.OBJECTWITHPATH>\n");
 } }
Line 652 
Line 869 
 // May refer to a CLASS or an INSTANCE // May refer to a CLASS or an INSTANCE
 void SCMOXmlWriter::appendObjectElement( void SCMOXmlWriter::appendObjectElement(
     Buffer& out,     Buffer& out,
     const SCMOInstance& object)      const SCMOInstance& object,
       bool filtered,
       const Array<Uint32> & nodes)
 { {
     if (object.inst.hdr->flags.isClassOnly)     if (object.inst.hdr->flags.isClassOnly)
     {     {
Line 660 
Line 879 
     }     }
     else     else
     {     {
         appendInstanceElement(out, object);          appendInstanceElement(out, object,filtered,nodes);
     }     }
 } }
  
Line 681 
Line 900 
     const SCMOInstance& cimClass)     const SCMOInstance& cimClass)
 { {
  
     SCMBClass_Main* theClass = cimClass.inst.hdr->theClass->cls.hdr;      SCMBClass_Main* ptrClass = cimClass.inst.hdr->theClass.ptr->cls.hdr;
     const char* clsBase = cimClass.inst.hdr->theClass->cls.base;      const char* clsBase = cimClass.inst.hdr->theClass.ptr->cls.base;
  
     // Class opening element:     // Class opening element:
     out << STRLIT("<CLASS NAME=\"");     out << STRLIT("<CLASS NAME=\"");
     out.append(     out.append(
         &(clsBase[theClass->className.start]),          &(clsBase[ptrClass->className.start]),
         theClass->className.size-1);          (ptrClass->className.size-1));
  
     out.append('"',' ');     out.append('"',' ');
     if (0 != theClass->superClassName.start)      if (0 != ptrClass->superClassName.start)
     {     {
         out << STRLIT(" SUPERCLASS=\"");         out << STRLIT(" SUPERCLASS=\"");
         out.append(         out.append(
             &(clsBase[theClass->superClassName.start]),              &(clsBase[ptrClass->superClassName.start]),
             theClass->superClassName.size-1);              (ptrClass->superClassName.size-1));
         out.append('"',' ');         out.append('"',' ');
     }     }
     out.append('>','\n');     out.append('>','\n');
  
     // Append class qualifiers     // Append class qualifiers
     SCMBQualifier *theArray =     SCMBQualifier *theArray =
         (SCMBQualifier*)&(clsBase[theClass->qualifierArray.start]);          (SCMBQualifier*)&(clsBase[ptrClass->qualifierArray.start]);
     for (Uint32 i=0, n=theClass->numberOfQualifiers;i<n;i++)      for (Uint32 i=0, n=ptrClass->numberOfQualifiers;i<n;i++)
     {     {
         SCMOXmlWriter::appendQualifierElement(out,theArray[i],clsBase);         SCMOXmlWriter::appendQualifierElement(out,theArray[i],clsBase);
     }     }
Line 730 
Line 949 
     const SCMOInstance& classPath)     const SCMOInstance& classPath)
 { {
     out << STRLIT("<LOCALCLASSPATH>\n");     out << STRLIT("<LOCALCLASSPATH>\n");
     Uint64 hostnameLength=0;      Uint32 hostnameLength=0;
     const char* hostname=classPath.getHostName_l(hostnameLength);     const char* hostname=classPath.getHostName_l(hostnameLength);
     Uint64 nsLength=0;      Uint32 nsLength=0;
     const char* ns=classPath.getNameSpace_l(nsLength);     const char* ns=classPath.getNameSpace_l(nsLength);
  
     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);
  
     Uint64 classNameLength=0;      Uint32 classNameLength=0;
     const char* className = classPath.getClassName_l(classNameLength);     const char* className = classPath.getClassName_l(classNameLength);
     appendClassNameElement(out, className, classNameLength);     appendClassNameElement(out, className, classNameLength);
     out << STRLIT("</LOCALCLASSPATH>\n");     out << STRLIT("</LOCALCLASSPATH>\n");
Line 751 
Line 970 
 { {
     out << STRLIT("<CLASSPATH>\n");     out << STRLIT("<CLASSPATH>\n");
  
     Uint64 hostnameLength=0;      Uint32 hostnameLength=0;
     const char* hostname=classPath.getHostName_l(hostnameLength);     const char* hostname=classPath.getHostName_l(hostnameLength);
     Uint64 nsLength=0;      Uint32 nsLength=0;
     const char* ns=classPath.getNameSpace_l(nsLength);     const char* ns=classPath.getNameSpace_l(nsLength);
  
     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);     appendNameSpacePathElement(out,hostname,hostnameLength,ns,nsLength);
  
     Uint64 classNameLength=0;      Uint32 classNameLength=0;
     const char* className = classPath.getClassName_l(classNameLength);     const char* className = classPath.getClassName_l(classNameLength);
  
     appendClassNameElement(out, className, classNameLength);     appendClassNameElement(out, className, classNameLength);
Line 878 
Line 1097 
             {             {
                 SCMOXmlWriter::appendSpecial(                 SCMOXmlWriter::appendSpecial(
                     out,                     out,
                     u.simple.val.c16);                      Char16(u.simple.val.c16));
             }             }
             break;             break;
         }         }
Line 890 
Line 1109 
                 SCMOXmlWriter::appendSpecial(                 SCMOXmlWriter::appendSpecial(
                     out,                     out,
                     &(base[u.stringValue.start]),                     &(base[u.stringValue.start]),
                     u.stringValue.size-1);                      (u.stringValue.size-1));
             }             }
             break;             break;
         }         }
Line 1097 
Line 1316 
             while (numElements--)             while (numElements--)
             {             {
                 out << STRLIT("<VALUE>");                 out << STRLIT("<VALUE>");
                 SCMOXmlWriter::append(out, arr->simple.val.bin);                  SCMOXmlWriter::appendSpecial(out, Char16(arr->simple.val.c16));
                 SCMOXmlWriter::appendSpecial(out, arr->simple.val.c16);  
                 arr++;                 arr++;
                 out << STRLIT("</VALUE>\n");                 out << STRLIT("</VALUE>\n");
             }             }
Line 1112 
Line 1330 
             while (numElements--)             while (numElements--)
             {             {
                 out << STRLIT("<VALUE>");                 out << STRLIT("<VALUE>");
                   if (0!=arr->stringValue.start)
                   {
                 SCMOXmlWriter::appendSpecial(                 SCMOXmlWriter::appendSpecial(
                     out,                     out,
                     &(base[arr->stringValue.start]),                     &(base[arr->stringValue.start]),
                     arr->stringValue.size-1);                          (arr->stringValue.size-1));
                   }
                 arr++;                 arr++;
                 out << STRLIT("</VALUE>\n");                 out << STRLIT("</VALUE>\n");
             }             }
Line 1150 
Line 1371 
                 SCMOInstance * ref = arr->extRefPtr;                 SCMOInstance * ref = arr->extRefPtr;
                 if (ref)                 if (ref)
                 {                 {
                     appendValueReferenceElement(out, *ref, true);                      appendValueReferenceElement(out, *ref);
                 }                 }
                 arr++;                 arr++;
             }             }
             out << STRLIT("</VALUE.REFARRAY>\n");             out << STRLIT("</VALUE.REFARRAY>\n");
               break;
         }         }
         case CIMTYPE_OBJECT:         case CIMTYPE_OBJECT:
         case CIMTYPE_INSTANCE:         case CIMTYPE_INSTANCE:


Legend:
Removed from v.1.1.2.14  
changed lines
  Added in v.1.4.2.10

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2