Back to index

texmacs  1.0.7.15
dyn_link.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : dyn_link.hpp
00004 * DESCRIPTION: Linkion of extern packages to TeXmacs
00005 * COPYRIGHT  : (C) 1999  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef DYN_LINK_H
00013 #define DYN_LINK_H
00014 #include "tm_link.hpp"
00015 
00016 string symbol_install (string lib, string symb, pointer& f);
00017 string symbols_install (string lib, string* symb, pointer* f, int n);
00018 
00019 /******************************************************************************
00020 * Dynamic links
00021 ******************************************************************************/
00022 
00023 struct dyn_link_rep: tm_link_rep {
00024   string  lib;       // Name of the library
00025   string  symbol;    // Name of the function which determines exported routines
00026   string  init;      // Initialization string
00027   pointer routs;     // Routines exported by package
00028   string  session;   // Name of the session
00029   string  ret;       // the last answer returned after 'write'
00030 
00031 public:
00032   dyn_link_rep (string lib, string symbol, string init, string session);
00033   ~dyn_link_rep ();
00034 
00035   string  start ();
00036   void    write (string s, int channel);
00037   string& watch (int channel);
00038   string  read (int channel);
00039   void    listen (int msecs);
00040   void    interrupt ();
00041   void    stop ();
00042 };
00043 
00044 #endif // defined DYN_LINK_H