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

void GIFFChunk::add_chunk ( const GP< GIFFChunk > &  chunk,
int  order = -1 

Adds the {chunk} to the chunks list at position {order}. Set {order} to #-1# to append the chunk to the list. { Note!} By adding chunk PROP# you will convert this chunk to type LIST# {automatically}.

Definition at line 177 of file GIFFManager.cpp.

References GListTemplate< TYPE, TI >::append(), get_name(), GListTemplate< TYPE, TI >::insert_before(), GBaseString::length(), and GListTemplate< TYPE, TI >::nth().

  DEBUG_MSG("GIFFChunk::add_chunk(): Adding chunk to '" << get_name() <<
     "' @ position=" << position << "\n");

  if (!type.length())
    DEBUG_MSG("Converting the parent to FORM\n");

  if (chunk->get_type()=="PROP")
    DEBUG_MSG("Converting the parent to LIST\n");

  GPosition pos;
  if (position>=0 && chunks.nth(position, pos))
    chunks.insert_before(pos, chunk);

Generated by  Doxygen 1.6.0   Back to index