Back to index

texmacs  1.0.7.15
new_data.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : new_data.hpp
00004 * DESCRIPTION: Data attached to full buffers which are not necessarily
00005 *              well represented by trees
00006 * COPYRIGHT  : (C) 1999-2012  Joris van der Hoeven
00007 *******************************************************************************
00008 * This software falls under the GNU general public license version 3 or later.
00009 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00010 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00011 ******************************************************************************/
00012 
00013 #ifndef NEW_DATA_H
00014 #define NEW_DATA_H
00015 #include "tree.hpp"
00016 #include "hashmap.hpp"
00017 
00018 class new_data;
00019 class new_data_rep: public concrete_struct {
00020 public:
00021   tree project;               // a project the document belongs to
00022   tree style;                 // the style of the buffer
00023   hashmap<string,tree> init;  // initial values of environment variables
00024   hashmap<string,tree> fin;   // final values of environment variables
00025   hashmap<string,tree> ref;   // all labels with references
00026   hashmap<string,tree> aux;   // auxiliary output: toc, bib, etc.
00027 
00028   inline new_data_rep ():
00029     project (""), style ("style"),
00030     init ("?"), fin ("?"), ref ("?"), aux ("?") {}
00031 };
00032 
00033 class new_data {
00034 CONCRETE(new_data);
00035   inline new_data (): rep (tm_new<new_data_rep> ()) {}
00036 };
00037 CONCRETE_CODE(new_data);
00038 
00039 tree attach_data (tree body, new_data data, bool no_aux= false);
00040 tree detach_data (tree doc, new_data& data);
00041 
00042 #endif // NEW_DATA_H