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

GP< GIFFChunk > GIFFChunk::get_chunk ( const GUTF8String name,
int *  position = 0 
)

Returns the chunk with given {name}. The {name} may not contain dots, but MAY contain colons and brackets (the latter - for specifying the chunk number). If {position} is not zero then the chunk position in its parent will be put into #*position#

Definition at line 269 of file GIFFManager.cpp.

References get_name().

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

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

  int num=0;
  int pos_num;
  GP<GIFFChunk> retval;
  GPosition pos;
  for(pos=chunks, pos_num=0;pos;++pos, pos_num++)
  {
    if (chunks[pos]->get_name()==short_name && num++==number)
    {
      if (pos_ptr)
        *pos_ptr=pos_num;
      retval=chunks[pos];
      break;
    }
  }
  return retval;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index