Back to index

texmacs  1.0.7.15
input.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : input.hpp
00004 * DESCRIPTION: Generic TeXmacs input
00005 * COPYRIGHT  : (C) 2000  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 INPUT_H
00013 #define INPUT_H
00014 #include "path.hpp"
00015 
00016 class texmacs_input;
00017 struct texmacs_input_rep: concrete_struct {
00018   string type;                  // default value for channel below
00019   int    status;                // status of parser
00020   string buf;                   // input buffer
00021   string format;                // current input format
00022   int    mode;                  // corresponding input mode
00023   string channel;               // current output channel
00024   tree   stack;                 // stack for nested blocks
00025   hashmap<string,tree> docs;    // output for each channel
00026 
00027   texmacs_input_rep (string type);
00028   int  get_mode (string s);
00029   void begin_mode (string s);
00030   void begin_channel (string s);
00031   void end ();
00032   bool put (char c);
00033   void bof ();
00034   void eof ();
00035   void write (tree t);
00036   tree get (string channel);
00037 
00038   void flush (bool force= false);
00039   void verbatim_flush (bool force= false);
00040   void scheme_flush (bool force= false);
00041   void latex_flush (bool force= false);
00042   void html_flush (bool force= false);
00043   void ps_flush (bool force= false);
00044   void math_flush (bool force= false);
00045   void ispell_flush (bool force= false);
00046   void channel_flush (bool force= false);
00047   void command_flush (bool force= false);
00048   void xformat_flush (bool force= false);
00049 };
00050 
00051 class texmacs_input {
00052   CONCRETE(texmacs_input);
00053   texmacs_input (string type);
00054 };
00055 CONCRETE_CODE(texmacs_input);
00056 
00057 #endif // defined INPUT_H