diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-02-22 19:24:43 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-02-22 19:24:43 +0000 |
commit | 09279d722aa6e62e86eb4b34583397db1093051e (patch) | |
tree | 1abb476b99c20c3c8906d8893159923eb0ccce3a /src/theory | |
parent | c96d62d41a178e0f524c39a0f73da9b7730dcf0b (diff) |
Re-committing revision 232 properly:
* Add virtual destructors to CnfStream, Theory, OutputChannel, and
ExplainOutputChannel. Safer and stops a compiler warning.
* node attributes: fix compiler warnings on 64-bit.
* Node: add asserts to make sure the current NodeManager is non-NULL
when it's needed. This can happen when public-facing functions
don't properly set the node manager, and it can look like a bug in
another part of the library. Also some code format cleanup.
* configure.ac, config/cvc4.m4: added --enable-static-binary (see
discussion on bug 33), fixed bad configure lines (bug 19), added
documentation for some things.
* config.h.in: removed; it's auto-generated.
Diffstat (limited to 'src/theory')
-rw-r--r-- | src/theory/output_channel.h | 16 | ||||
-rw-r--r-- | src/theory/theory.h | 10 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/theory/output_channel.h b/src/theory/output_channel.h index cec499a13..c530434f5 100644 --- a/src/theory/output_channel.h +++ b/src/theory/output_channel.h @@ -28,6 +28,14 @@ class OutputChannel { public: /** + * Destructs an OutputChannel. This implementation does nothing, + * but we need a virtual destructor for safety in case subclasses + * have a destructor. + */ + virtual ~OutputChannel() { + } + + /** * With safePoint(), the theory signals that it is at a safe point * and can be interrupted. */ @@ -68,6 +76,14 @@ class ExplainOutputChannel { public: /** + * Destructs an ExplainOutputChannel. This implementation does + * nothing, but we need a virtual destructor for safety in case + * subclasses have a destructor. + */ + virtual ~ExplainOutputChannel() { + } + + /** * With safePoint(), the theory signals that it is at a safe point * and can be interrupted. The default implementation never * interrupts. diff --git a/src/theory/theory.h b/src/theory/theory.h index 8b83f71cf..dffc99053 100644 --- a/src/theory/theory.h +++ b/src/theory/theory.h @@ -58,12 +58,20 @@ public: static bool fullEffort(Effort e) { return e >= FULL_EFFORT; } /** - * Construct a theory. + * Construct a Theory. */ Theory() { } /** + * Destructs a Theory. This implementation does nothing, but we + * need a virtual destructor for safety in case subclasses have a + * destructor. + */ + virtual ~Theory() { + } + + /** * Prepare for a Node. * * When get() is called to get the next thing off the theory queue, |