Return TypeFunction nameArguments
voidhzPMapS::DeltaOpen(void)

Declared and defined in file: hzTmplMapS.h

Function Logic:

0:START 1:lstat(*m_path,&fs)==0 2:fs.st_size 3:open 4:is.tellg() 5:items ifstream::fail 6:is.fail() 7:ifstream::clear 8:is.tellg()==fs.st_size 9:items ifstream::fail 10:is.fail() 11:ifstream::clear 12:is.tellg()==fs.st_size 13:!key 14:!obj 15:hzMapS::Insert 16:close 17:m_bOpen ofstream::open 18: No text

Function body:

void hzPMapS::DeltaOpen (void)
   {
       std::ifstream   is ;
       struct stat     fs ;
       KEY             key ;
       OBJ             obj ;
       if (lstat(*m_path, &fs) == 0)
       {
           if (fs.st_size)
           {
               is.open(*m_path) ;
               for (; is.tellg() < fs.st_size ;)
               {
                   is >> key ;
                   if (is.fail())
                       is.clear() ;
                   if (is.tellg() == fs.st_size)
                       break ;
                   is >> obj ;
                   if (is.fail())
                       is.clear() ;
                   if (is.tellg() == fs.st_size)
                       threadLog("B: At EOF\n") ;
                   if (!key)   continue ;
                   if (!obj)   continue ;
                   m_map.Insert(key, obj) ;
               }
               is.close() ;
           }
       }
       m_bOpen = true ;
       m_os.open(*m_path, std::ios::app) ;
   }