Logo Search packages:      
Sourcecode: djvulibre version File versions

void DjVuPortcaster::add_route ( const DjVuPort src,
DjVuPort dst 
)

Adds route from src# to dst#. Whenever a request is sent or received by src#, it will be forwarded to dst# as well.

Parameters:
src The source
dst The destination

Definition at line 371 of file DjVuPort.cpp.

References GListTemplate< TYPE, TYPE >::append(), GListTemplate< TYPE, TYPE >::contains(), GMapTemplate< KTYPE, VTYPE, TI >::contains(), and GPEnabled::get_count().

Referenced by DjVuImage::connect(), DjVuErrorList::connect(), copy_routes(), DjVuDocument::get_djvu_file(), DjVuDocument::get_page(), DjVuFile::init(), DjVuDocEditor::insert_group(), and DjVuDocument::start_init().

{
   GCriticalSectionLock lock(&map_lock);
   if (cont_map.contains(src) && src->get_count()>0 &&
       cont_map.contains(dst) && dst->get_count()>0)
   {
      if (!route_map.contains(src)) route_map[src]=new GList<void *>();
      GList<void *> & list=*(GList<void *> *) route_map[src];
      if (!list.contains(dst)) list.append(dst);
   }
}


Generated by  Doxygen 1.6.0   Back to index