diff options
author | Tim King <taking@cs.nyu.edu> | 2017-11-28 09:07:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 09:07:14 -0800 |
commit | 45497438b85dfc408c974a788e28525f0b5717b9 (patch) | |
tree | 75929fcefcb17d5ba58bdffc136ba2ce49b2d622 /src/printer/printer.h | |
parent | d552ca179b8723a93c6e0dae61242ceb1ccaa717 (diff) |
Removing throw specifiers from internal Printer hierarchy. (#1393)
Diffstat (limited to 'src/printer/printer.h')
-rw-r--r-- | src/printer/printer.h | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/src/printer/printer.h b/src/printer/printer.h index 9baeeb8b6..f5e05a848 100644 --- a/src/printer/printer.h +++ b/src/printer/printer.h @@ -35,7 +35,7 @@ class Printer { static Printer* d_printers[language::output::LANG_MAX]; /** Make a Printer for a given OutputLanguage */ - static Printer* makePrinter(OutputLanguage lang) throw(); + static Printer* makePrinter(OutputLanguage lang); // disallow copy, assignment Printer(const Printer&) CVC4_UNDEFINED; @@ -43,37 +43,49 @@ class Printer { protected: // derived classes can construct, but no one else. - Printer() throw() {} - virtual ~Printer() {} - - /** write model response to command */ - virtual void toStream(std::ostream& out, const Model& m, const Command* c) const throw() = 0; - - /** write model response to command using another language printer */ - void toStreamUsing(OutputLanguage lang, std::ostream& out, const Model& m, const Command* c) const throw() { - getPrinter(lang)->toStream(out, m, c); + Printer() {} + virtual ~Printer() {} + + /** write model response to command */ + virtual void toStream(std::ostream& out, + const Model& m, + const Command* c) const = 0; + + /** write model response to command using another language printer */ + void toStreamUsing(OutputLanguage lang, + std::ostream& out, + const Model& m, + const Command* c) const + { + getPrinter(lang)->toStream(out, m, c); } -public: + public: /** Get the Printer for a given OutputLanguage */ - static Printer* getPrinter(OutputLanguage lang) throw(); + static Printer* getPrinter(OutputLanguage lang); /** Write a Node out to a stream with this Printer. */ - virtual void toStream(std::ostream& out, TNode n, - int toDepth, bool types, size_t dag) const throw() = 0; + virtual void toStream(std::ostream& out, + TNode n, + int toDepth, + bool types, + size_t dag) const = 0; /** Write a Command out to a stream with this Printer. */ - virtual void toStream(std::ostream& out, const Command* c, - int toDepth, bool types, size_t dag) const throw() = 0; + virtual void toStream(std::ostream& out, + const Command* c, + int toDepth, + bool types, + size_t dag) const = 0; /** Write a CommandStatus out to a stream with this Printer. */ - virtual void toStream(std::ostream& out, const CommandStatus* s) const throw() = 0; + virtual void toStream(std::ostream& out, const CommandStatus* s) const = 0; /** Write a Model out to a stream with this Printer. */ - virtual void toStream(std::ostream& out, const Model& m) const throw(); + virtual void toStream(std::ostream& out, const Model& m) const; /** Write an UnsatCore out to a stream with this Printer. */ - virtual void toStream(std::ostream& out, const UnsatCore& core) const throw(); + virtual void toStream(std::ostream& out, const UnsatCore& core) const; /** * Write the term that sygus datatype term n @@ -88,7 +100,7 @@ public: * This method may make calls to sygus printing callback * methods stored in sygus datatype constructors. */ - virtual void toStreamSygus(std::ostream& out, TNode n) const throw(); + virtual void toStreamSygus(std::ostream& out, TNode n) const; };/* class Printer */ |