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

GP< DjVuPort > DjVuPortcaster::alias_to_port ( const GUTF8String name  ) 

Returns {DjVuPort} associated with the given alias#. If nothing is known about name alias#, or the port associated with it has already been destroyed ZERO# pointer will be returned.

Definition at line 303 of file DjVuPort.cpp.

References is_port_alive().

Referenced by DjVuDocument::get_djvu_file().

{
   GCriticalSectionLock lock(&map_lock);
   GPosition pos;
   if (a2p_map.contains(alias, pos))
   {
      DjVuPort * port=(DjVuPort *) a2p_map[pos];
      GP<DjVuPort> gp_port=is_port_alive(port);
      if (gp_port) return gp_port;
      else a2p_map.del(pos);
   }
   return 0;
}


Generated by  Doxygen 1.6.0   Back to index