Back to index

texmacs  1.0.7.15
tab.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : tab.hpp
00004 * DESCRIPTION: spacing
00005 * COPYRIGHT  : (C) 1999  David Allouche
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 TAB_H
00013 #define TAB_H
00014 #include "tree.hpp"
00015 
00016 enum tab_kind { tab_all, tab_first, tab_last };
00017 
00018 class tab_rep: concrete_struct {
00019 public:
00020   int pos;
00021   double weight;
00022   tab_kind kind;
00023 
00024   inline tab_rep () {}
00025   tab_rep (int pos, tree t);
00026 
00027   friend class tab;
00028 };
00029 
00030 class tab {
00031   CONCRETE(tab);
00032   inline tab (): rep (tm_new<tab_rep> ()) {}
00033   inline tab (int pos, tree t): rep (tm_new<tab_rep> (pos, t)) {}
00034 };
00035 CONCRETE_CODE(tab);
00036 
00037 #endif // defined TAB_H