1 /********************* */
4 ** Original author: mdeters
5 ** Major contributors: none
6 ** Minor contributors (to current version): none
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
9 ** Courant Institute of Mathematical Sciences
10 ** New York University
11 ** See the file COPYING in the top-level source directory for licensing
12 ** information.\endverbatim
14 ** \brief Base of the pretty-printer interface
16 ** Base of the pretty-printer interface.
19 #include "cvc4_private.h"
21 #ifndef __CVC4__PRINTER__PRINTER_H
22 #define __CVC4__PRINTER__PRINTER_H
24 #include "util/language.h"
25 #include "expr/node.h"
30 /** Printers for each OutputLanguage */
31 static Printer
* d_printers
[language::output::LANG_MAX
];
33 /** Make a Printer for a given OutputLanguage */
34 static Printer
* makePrinter(OutputLanguage lang
);
37 /** Get the Printer for a given OutputLanguage */
38 static Printer
* getPrinter(OutputLanguage lang
) {
39 if(d_printers
[lang
] == NULL
) {
40 d_printers
[lang
] = makePrinter(lang
);
42 return d_printers
[lang
];
45 /** Write a Node out to a stream with this Printer. */
46 virtual std::ostream
& toStream(std::ostream
& out
, TNode n
,
47 int toDepth
, bool types
) const = 0;
52 #endif /* __CVC4__PRINTER__PRINTER_H */