Esempio n. 1
0
void File::CheckConsistency( void)
{
   if (this == &volume->root)
   {
      ASSERT( !sibPrev);
   }
   else
   {
      ASSERT( sibPrev);
      ASSERT( *sibPrev == this);
      if (sibNext)
      {
         ASSERT( sibNext->sibPrev == &sibNext);
      }
   }
   if (openPrev)
   {
      ASSERT( *openPrev == this);
      if (openNext)
      {
         ASSERT( openNext->openPrev == &openNext);
      }
   }
   if (fileType == pfmFileTypeFolder)
   {
      for (File* child = data.folder.firstChild; !!child; child = child->sibNext)
      {
         ASSERT( child->parent == this);
         child->CheckConsistency();
      }
   }
}
Esempio n. 2
0
void Volume::CheckConsistency(void)
{
   if (firstOpenFile)
   {
      ASSERT( firstOpenFile->openPrev == &firstOpenFile);
   }
   root.CheckConsistency();
}