2
/******************************************************************************
4
* DESCRIPTION: standard formats for placing material
5
* COPYRIGHT : (C) 1999 Joris van der Hoeven
6
*******************************************************************************
7
* This software falls under the GNU general public license version 3 or later.
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10
******************************************************************************/
12
#include "Format/format.hpp"
15
format_none_rep::equal (format fm) {
16
return (fm->type == type);
19
format_none_rep::operator tree () { return "none"; }
22
format_width_rep::equal (format fm) {
23
if (fm->type != type) return false;
24
format_width fw= (format_width) fm;
25
return (fw->width == width);
28
format_width_rep::operator tree () {
29
return tuple ("format width", as_string (width));
33
format_cell_rep::equal (format fm) {
34
if (fm->type != type) return false;
35
format_cell fw= (format_cell) fm;
37
(fw->width == width) && (fw->vpos == vpos) &&
38
(fw->depth == depth) && (fw->height == height);
41
format_cell_rep::operator tree () {
42
return tuple ("format cell", as_string (width));
46
format_vstream_rep::equal (format fm) {
47
if (fm->type != type) return false;
48
format_vstream fw= (format_vstream) fm;
50
(fw->width == width) && (fw->before == before) && (fw->after == after);
53
format_vstream_rep::operator tree () {
54
return tuple ("format vstream");
58
query_vstream_width_rep::equal (format fm) {
59
if (fm->type != type) return false;
60
query_vstream_width fw= (query_vstream_width) fm;
61
return (fw->before == before) && (fw->after == after);
64
query_vstream_width_rep::operator tree () {
65
return tuple ("query vstream width");