(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.20 and 1.24

version 1.20, 2012/05/10 09:52:11 version 1.24, 2013/02/13 11:39:58
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/SCMO.h> #include <Pegasus/Common/SCMO.h>
Line 1256 
Line 1261 
 SCMOInstance::SCMOInstance( SCMOInstance::SCMOInstance(
     SCMOClass& baseClass,     SCMOClass& baseClass,
     Boolean includeQualifiers,     Boolean includeQualifiers,
     Boolean includeClassOrigin,      Boolean includeClassOrigin)
     const char** propertyList)  
 { {
  
     _initSCMOInstance(new SCMOClass(baseClass));     _initSCMOInstance(new SCMOClass(baseClass));
Line 2346 
Line 2350 
     _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);     _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);
 } }
  
 void SCMOInstance::setHostName_l(const char* hostName, Uint32 len)  
 {  
     // Copy on Write is only necessary if a realloc() becomes necessary  
     if (inst.mem->freeBytes < ((len+8) & ~7))  
     {  
         _copyOnWrite();  
     }  
     // copy including trailing '\0'  
     _setBinary(hostName,len+1,inst.hdr->hostName,&inst.mem);  
 }  
   
 const char* SCMOInstance::getHostName() const const char* SCMOInstance::getHostName() const
 { {
     return _getCharString(inst.hdr->hostName,inst.base);     return _getCharString(inst.hdr->hostName,inst.base);
Line 2473 
Line 2466 
     return _getCharString(inst.hdr->instNameSpace,inst.base);     return _getCharString(inst.hdr->instNameSpace,inst.base);
 } }
  
   void SCMOInstance::completeHostNameAndNamespace(
       const char* hn,
       Uint32 hnLen,
       const char* ns,
       Uint32 nsLen)
   {
       // hostName is Null or empty String ?
       if (0 == inst.hdr->hostName.size ||
           0 == inst.base[inst.hdr->hostName.start])
       {
           // Copy on Write is only necessary if a realloc() becomes necessary
           if (inst.mem->freeBytes < ((hnLen+8) & ~7))
           {
               _copyOnWrite();
           }
           // copy including trailing '\0'
           _setBinary(hn,hnLen+1,inst.hdr->hostName,&inst.mem);
       }
       // namespace is Null or empty String ?
       if (0 == inst.hdr->instNameSpace.size ||
           0 == inst.base[inst.hdr->instNameSpace.start])
       {
           setNameSpace_l(ns,nsLen);
       }
   }
   
   
 void SCMOInstance::buildKeyBindingsFromProperties() void SCMOInstance::buildKeyBindingsFromProperties()
 { {
     Uint32 propNode;     Uint32 propNode;
Line 5185 
Line 5205 
  
 } }
  
   // class SCMODump only in debug builds available
   #ifdef PEGASUS_DEBUG
 /****************************************************************************** /******************************************************************************
  * SCMODump Print and Dump functions  * SCMODump Print and Dump functions
  *****************************************************************************/  *****************************************************************************/
Line 6355 
Line 6377 
  
   return;   return;
 } }
   #endif // PEGASUS_DEBUG (class SCMODump only in debug builds available)
  
  
 /***************************************************************************** /*****************************************************************************


Legend:
Removed from v.1.20  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2