Back to index

texmacs  1.0.7.15
format.cpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : format.cpp
00004 * DESCRIPTION: standard formats for placing material
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 #include "Format/format.hpp"
00013 
00014 bool
00015 format_none_rep::equal (format fm) {
00016   return (fm->type == type);
00017 }
00018 
00019 format_none_rep::operator tree () { return "none"; }
00020 
00021 bool
00022 format_width_rep::equal (format fm) {
00023   if (fm->type != type) return false;
00024   format_width fw= (format_width) fm;
00025   return (fw->width == width);
00026 }
00027 
00028 format_width_rep::operator tree () {
00029   return tuple ("format width", as_string (width));
00030 }
00031 
00032 bool
00033 format_cell_rep::equal (format fm) {
00034   if (fm->type != type) return false;
00035   format_cell fw= (format_cell) fm;
00036   return
00037     (fw->width == width) && (fw->vpos == vpos) &&
00038     (fw->depth == depth) && (fw->height == height);
00039 }
00040 
00041 format_cell_rep::operator tree () {
00042   return tuple ("format cell", as_string (width));
00043 }
00044 
00045 bool
00046 format_vstream_rep::equal (format fm) {
00047   if (fm->type != type) return false;
00048   format_vstream fw= (format_vstream) fm;
00049   return
00050     (fw->width == width) && (fw->before == before) && (fw->after == after);
00051 }
00052 
00053 format_vstream_rep::operator tree () {
00054   return tuple ("format vstream");
00055 }
00056 
00057 bool
00058 query_vstream_width_rep::equal (format fm) {
00059   if (fm->type != type) return false;
00060   query_vstream_width fw= (query_vstream_width) fm;
00061   return (fw->before == before) && (fw->after == after);
00062 }
00063 
00064 query_vstream_width_rep::operator tree () {
00065   return tuple ("query vstream width");
00066 }