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

void DjVuPortcaster::del_port ( const DjVuPort port  ) 

Removes the specified port from all routes. It will no longer be able to receive or generate messages and will be considered { "dead"} by {is_port_alive}() function.

Definition at line 339 of file DjVuPort.cpp.

References clear_aliases(), GMapTemplate< KTYPE, VTYPE, TI >::contains(), GListTemplate< TYPE, TYPE >::del(), GMapTemplate< KTYPE, VTYPE, TI >::del(), GListTemplate< TYPE, TYPE >::search(), and GListTemplate< TYPE, TYPE >::size().

Referenced by DjVuDocument::~DjVuDocument().

  GCriticalSectionLock lock(&map_lock);
  GPosition pos;
  // Update the "aliases map"
  // Update "contents map"
  if (cont_map.contains(port, pos)) cont_map.del(pos);
  // Update "route map"
  if (route_map.contains(port, pos))
    delete (GList<void *> *) route_map[pos];
    GList<void *> & list=*(GList<void *> *) route_map[pos];
    GPosition list_pos;
    if (list.search((void *) port, list_pos)) list.del(list_pos);
    if (!list.size())
      delete &list;
      GPosition tmp_pos=pos;
    } else ++pos;

Generated by  Doxygen 1.6.0   Back to index