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

void GIFFChunk::del_chunk ( const GUTF8String name  ) 

Removes the chunk with given {name}. The {name} may not contain dots, but MAY contain colons and brackets (the latter - for specifying the chunk number)

Definition at line 246 of file GIFFManager.cpp.

References GListTemplate< TYPE, TI >::del(), and get_name().

{
  DEBUG_MSG("GIFFChunk::del_chunk(): Deleting chunk '" << name <<
     "' from '" << get_name() << "'\n");
  DEBUG_MAKE_INDENT(3);

  int number;
  const GUTF8String short_name=decode_name(name,number);

  GPosition pos=chunks;
  for(int num=0;pos;++pos)
  {
    if ((chunks[pos]->get_name()==short_name)&&(num++ == number))
    {
      chunks.del(pos);
      break;
    }
  }
  if(! pos)
  {
    G_THROW( ERR_MSG("GIFFManager.no_chunk") "\t"+short_name+"\t"+GUTF8String(number)+"\t"+get_name());
  }
}


Generated by  Doxygen 1.6.0   Back to index