Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

void GIFFManager::load_file ( GP< ByteStream str  ) 

Loads the file contents from stream {str}

Definition at line 625 of file GIFFManager.cpp.

References IFFByteStream::close_chunk(), IFFByteStream::create(), IFFByteStream::get_chunk(), load_chunk(), set_name(), and GUTF8String::substr().

Referenced by load_file().

{
  DEBUG_MSG("GIFFManager::load_file(): Loading IFF file.\n");
  DEBUG_MAKE_INDENT(3);
   
  GP<IFFByteStream> gistr=IFFByteStream::create(str);
  IFFByteStream &istr=*gistr;
  GUTF8String chunk_id;
  if (istr.get_chunk(chunk_id))
  {
    if (chunk_id.substr(0,5) != "FORM:")
      G_THROW( ERR_MSG("GIFFManager.cant_find2") );
    set_name(chunk_id);
    load_chunk(istr, top_level);
    istr.close_chunk();
  }
}


Generated by  Doxygen 1.6.0   Back to index