Logo Search packages:      
Sourcecode: djvulibre version File versions

void DjVmDir::encode ( const GP< ByteStream > &  stream,
const bool  do_rename = false 
) const

Encodes the directory into the specified stream.

Definition at line 398 of file DjVmDir.cpp.

References offset, and GListTemplate< TYPE, TI >::size().

Referenced by DjVuDocEditor::save_as(), DjVmDoc::write(), and DjVmDoc::write_index().

{
  bool bundled = true;
  GPosition pos = files_list;
  if (files_list.size() && !files_list[pos]->offset)
    bundled = false;
  for (pos=files_list; pos; ++pos)
    if ( !bundled !=  !files_list[pos]->offset)
      //  There directory contains both indirect and bundled records.
      G_THROW( ERR_MSG("DjVmDir.bad_dir") );
  // Do the real work
  encode(gstr, bundled, do_rename);
}


Generated by  Doxygen 1.6.0   Back to index