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

Diff for /pegasus/src/Pegasus/Common/SCMO.cpp between version 1.2.2.6 and 1.2.2.7

version 1.2.2.6, 2009/07/28 08:31:36 version 1.2.2.7, 2009/07/28 15:08:09
Line 43 
Line 43 
   #include <Pegasus/General/SetFileDescriptorToEBCDICEncoding.h>   #include <Pegasus/General/SetFileDescriptorToEBCDICEncoding.h>
 #endif #endif
  
   
 PEGASUS_USING_STD; PEGASUS_USING_STD;
  
 #define SCMB_INITIAL_MEMORY_CHUNK_SIZE 4096 #define SCMB_INITIAL_MEMORY_CHUNK_SIZE 4096
  
   #define DUMPSTR(x) ((x) == NULL ? "" : (x))
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 2354 
Line 2354 
     _filename.append("/");     _filename.append("/");
     _filename.append(filename);     _filename.append(filename);
  
     _out = fopen((const char*)_filename.getCString(),"a+");      _out = fopen((const char*)_filename.getCString(),"w+");
  
     _fileOpen = true;     _fileOpen = true;
  
Line 2416 
Line 2416 
     fprintf(_out,"\nheader.magic=%08X",insthdr->header.magic);     fprintf(_out,"\nheader.magic=%08X",insthdr->header.magic);
     // Total size of the instance memory block( # bytes )     // Total size of the instance memory block( # bytes )
     fprintf(_out,"\nheader.totalSize=%llu",insthdr->header.totalSize);     fprintf(_out,"\nheader.totalSize=%llu",insthdr->header.totalSize);
     // The # of bytes free      // The reference counter for this c++ class
     fprintf(_out,"\nheader.freeBytes=%llu",insthdr->header.freeBytes);  
     // Index to the start of the free space in this insance  
     fprintf(_out,"\nheader.StartOfFreeSpace=%llu",  
             insthdr->header.startOfFreeSpace);  
     // The reference counter for this class  
     fprintf(_out,"\nrefCount=%i",insthdr->refCount.get());     fprintf(_out,"\nrefCount=%i",insthdr->refCount.get());
     fprintf(_out,"\ntheClass: %p",insthdr->theClass);     fprintf(_out,"\ntheClass: %p",insthdr->theClass);
     fprintf(_out,"\n\nThe Flags:");     fprintf(_out,"\n\nThe Flags:");
Line 2432 
Line 2427 
     fprintf(_out,"\n   isFiltered: %s",     fprintf(_out,"\n   isFiltered: %s",
            (insthdr->flags.isFiltered ? "True" : "False"));            (insthdr->flags.isFiltered ? "True" : "False"));
     fprintf(_out,"\n\nhostName: \'%s\'",     fprintf(_out,"\n\nhostName: \'%s\'",
            _getCharString(insthdr->hostName,instbase));             DUMPSTR(_getCharString(insthdr->hostName,instbase)));
  
     dumpSCMOInstanceKeyBindings(testInst);     dumpSCMOInstanceKeyBindings(testInst);
  
Line 2605 
Line 2600 
     SCMBDataPtr* ptr =     SCMBDataPtr* ptr =
         (SCMBDataPtr*)_resolveDataPtr(insthdr->keyBindingArray,instbase);         (SCMBDataPtr*)_resolveDataPtr(insthdr->keyBindingArray,instbase);
  
     fprintf(_out,"\n\nInstacne Key Bindings :");      fprintf(_out,"\n\nInstance Key Bindings :");
     fprintf(_out,"\n=======================");     fprintf(_out,"\n=======================");
     fprintf(_out,"\n\nNumber of Key Bindings : %u",insthdr->numberKeyBindings);     fprintf(_out,"\n\nNumber of Key Bindings : %u",insthdr->numberKeyBindings);
  
     for (Uint32 i = 0; i < insthdr->numberKeyBindings; i++)     for (Uint32 i = 0; i < insthdr->numberKeyBindings; i++)
     {     {
         fprintf(_out,"\n\nNo %u : '%s'",i,_getCharString(ptr[i],instbase));          fprintf(_out,"\n\nNo %u : '%s'",i,
                   DUMPSTR(_getCharString(ptr[i],instbase)));
     }     }
     fprintf(_out,"\n");     fprintf(_out,"\n");
 } }
Line 2626 
Line 2622 
     fprintf(_out,"\nheader.magic=%08X",clshdr->header.magic);     fprintf(_out,"\nheader.magic=%08X",clshdr->header.magic);
     // Total size of the instance memory block( # bytes )     // Total size of the instance memory block( # bytes )
     fprintf(_out,"\nheader.totalSize=%llu",clshdr->header.totalSize);     fprintf(_out,"\nheader.totalSize=%llu",clshdr->header.totalSize);
     // The # of bytes free      // The reference counter for this c++ class
     fprintf(_out,"\nheader.freeBytes=%llu",clshdr->header.freeBytes);  
     // Index to the start of the free space in this insance  
     fprintf(_out,"\nheader.StartOfFreeSpace=%llu",  
             clshdr->header.startOfFreeSpace);  
     // The reference counter for this class  
     fprintf(_out,"\nrefCount=%i",clshdr->refCount.get());     fprintf(_out,"\nrefCount=%i",clshdr->refCount.get());
  
     fprintf(_out,"\n\nsuperClassName: \'%s\'",     fprintf(_out,"\n\nsuperClassName: \'%s\'",
            _getCharString(clshdr->superClassName,clsbase));             DUMPSTR(_getCharString(clshdr->superClassName,clsbase)));
     fprintf(_out,"\nnameSpace: \'%s\'",     fprintf(_out,"\nnameSpace: \'%s\'",
             _getCharString(clshdr->nameSpace,clsbase));              DUMPSTR(_getCharString(clshdr->nameSpace,clsbase)));
     fprintf(_out,"\nclassName: \'%s\'",     fprintf(_out,"\nclassName: \'%s\'",
             _getCharString(clshdr->className,clsbase));              DUMPSTR(_getCharString(clshdr->className,clsbase)));
     fprintf(_out,"\n\nTheClass qualfiers:");     fprintf(_out,"\n\nTheClass qualfiers:");
     _dumpQualifierArray(     _dumpQualifierArray(
         clshdr->qualifierArray.start,         clshdr->qualifierArray.start,
Line 2683 
Line 2674 
  
     fprintf(_out,"\n\nHex dump of a SCMBClass:");     fprintf(_out,"\n\nHex dump of a SCMBClass:");
     fprintf(_out,"\n========================");     fprintf(_out,"\n========================");
     fprintf(_out,"\n\n Size of SCMBClass: %llu",clshdr->header.totalSize);      fprintf(_out,"\n\n Size of SCMBClass: %llu\n\n",clshdr->header.totalSize);
     fprintf(_out,"\n cls.base = %p\n\n",clsbase);  
  
     _hexDump(clsbase,clshdr->header.totalSize);     _hexDump(clsbase,clshdr->header.totalSize);
  
Line 2772 
Line 2762 
         }         }
  
         fprintf(_out,"\nKey Property name: %s",         fprintf(_out,"\nKey Property name: %s",
                _getCharString(nodeArray[i].name,clsbase));                 DUMPSTR(_getCharString(nodeArray[i].name,clsbase)));
  
         fprintf(_out,"\nHash Tag %3u Hash Index %3u",         fprintf(_out,"\nHash Tag %3u Hash Index %3u",
                nodeArray[i].nameHashTag,                nodeArray[i].nameHashTag,
Line 2833 
Line 2823 
     const SCMBClassProperty& prop,     const SCMBClassProperty& prop,
     char* clsbase) const     char* clsbase) const
 { {
     fprintf(_out,"\nProperty name: %s",_getCharString(prop.name,clsbase));      fprintf(_out,"\nProperty name: %s",
               DUMPSTR(_getCharString(prop.name,clsbase)));
  
     fprintf(_out,"\nHash Tag %3u Hash Index %3u",     fprintf(_out,"\nHash Tag %3u Hash Index %3u",
            prop.nameHashTag,            prop.nameHashTag,
Line 2844 
Line 2835 
            );            );
  
     fprintf(_out,"\nOrigin class name: %s",     fprintf(_out,"\nOrigin class name: %s",
            _getCharString(prop.originClassName,clsbase));             DUMPSTR(_getCharString(prop.originClassName,clsbase)));
     fprintf(_out,"\nReference class name: %s",     fprintf(_out,"\nReference class name: %s",
            _getCharString(prop.refClassName,clsbase));             DUMPSTR(_getCharString(prop.refClassName,clsbase)));
  
     printSCMOValue(prop.defaultValue,clsbase);     printSCMOValue(prop.defaultValue,clsbase);
  
Line 2917 
Line 2908 
      if(theQualifier.name == QUALNAME_USERDEFINED)      if(theQualifier.name == QUALNAME_USERDEFINED)
      {      {
          fprintf(_out,"\n\nQualifier user defined name: \'%s\'",          fprintf(_out,"\n\nQualifier user defined name: \'%s\'",
                 _getCharString(theQualifier.userDefName,clsbase));                  DUMPSTR(_getCharString(theQualifier.userDefName,clsbase)));
      }      }
      else      else
      {      {
          fprintf(_out,"\n\nQualifier DMTF defined name: \'%s\'",          fprintf(_out,"\n\nQualifier DMTF defined name: \'%s\'",
                 _qualifierNameStrLit[theQualifier.name].str);                  DUMPSTR(_qualifierNameStrLit[theQualifier.name].str));
      }      }
  
      fprintf(_out,"\nPropagated : %s",      fprintf(_out,"\nPropagated : %s",
Line 3285 
Line 3276 
 void SCMODump::_hexDump(char* buffer,int length) const void SCMODump::_hexDump(char* buffer,int length) const
 { {
  
     char printLine[3][80];      unsigned char printLine[3][80];
     int p;     int p;
     int len;     int len;
     char item;      unsigned char item;
  
     for (int i = 0; i < length;i=i+1)     for (int i = 0; i < length;i=i+1)
     {     {
Line 3322 
Line 3313 
             fprintf(_out,"\n");             fprintf(_out,"\n");
         }         }
  
         item = buffer[i];          item = (unsigned char)buffer[i];
  
         if (item < 32 || item > 125 )         if (item < 32 || item > 125 )
         {         {


Legend:
Removed from v.1.2.2.6  
changed lines
  Added in v.1.2.2.7

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2