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

Diff for /pegasus/src/Pegasus/Common/CIMObjectPath.cpp between version 1.58.4.4 and 1.60.4.1

version 1.58.4.4, 2008/02/19 22:09:39 version 1.60.4.1, 2007/06/08 10:40:29
Line 41 
Line 41 
 #include "XmlWriter.h" #include "XmlWriter.h"
 #include "XmlReader.h" #include "XmlReader.h"
 #include "ArrayInternal.h" #include "ArrayInternal.h"
 #include "HostLocator.h"  #include "HostAddress.h"
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 446 
Line 446 
  
     static Boolean isValidHostname(const String& hostname)     static Boolean isValidHostname(const String& hostname)
     {     {
         HostLocator addr(hostname);          HostAddress addr(hostname);
  
         return addr.isValid();         return addr.isValid();
     }     }
Line 655 
Line 655 
  
             p++;             p++;
  
             Array<Uint8> keyValueUTF8;  
             keyValueUTF8.reserveCapacity(128);  
   
             while (*p && *p != '"')             while (*p && *p != '"')
             {             {
                 if (*p == '\\')                 if (*p == '\\')
                 {                 {
                     p++;                      *p++;
  
                     if ((*p != '\\') && (*p != '"'))                     if ((*p != '\\') && (*p != '"'))
                     {                     {
Line 670 
Line 667 
                     }                     }
                 }                 }
  
                 keyValueUTF8.append(*p++);                  valueString.append(*p++);
             }             }
  
             if (*p++ != '"')             if (*p++ != '"')
                 throw MalformedObjectNameException(objectName);                 throw MalformedObjectNameException(objectName);
  
             // Convert the UTF-8 value to a UTF-16 String  
   
             valueString.assign(  
                 (const char*)keyValueUTF8.getData(),  
                 keyValueUTF8.size());  
   
             /*             /*
                 Guess at the type of this quoted key value.  If the value                 Guess at the type of this quoted key value.  If the value
                 can be parsed into a CIMObjectPath with at least one key                 can be parsed into a CIMObjectPath with at least one key
Line 690 
Line 681 
              */              */
             type = CIMKeyBinding::STRING;             type = CIMKeyBinding::STRING;
  
             /* Performance shortcut will check for  
                equal sign instead of doing the full  
                CIMObjectPath creation and exception handling  
             */  
             keyValueUTF8.append('\0');  
             if (strchr((const char*)keyValueUTF8.getData(), '='))  
             {  
                 // found an equal sign, high probability for a reference  
                 try                 try
                 {                 {
                     CIMObjectPath testForPath(valueString);                     CIMObjectPath testForPath(valueString);
Line 712 
Line 695 
                     // Not a reference value; leave type as STRING                     // Not a reference value; leave type as STRING
                 }                 }
             }             }
         }  
         else if (toupper(*p) == 'T' || toupper(*p) == 'F')         else if (toupper(*p) == 'T' || toupper(*p) == 'F')
         {         {
             type = CIMKeyBinding::BOOLEAN;             type = CIMKeyBinding::BOOLEAN;


Legend:
Removed from v.1.58.4.4  
changed lines
  Added in v.1.60.4.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2