** Don't fear the files-changed list, almost all changes are in the **
[cvc5.git] / src / expr / node.cpp
1 /********************* */
2 /*! \file node.cpp
3 ** \verbatim
4 ** Original author: mdeters
5 ** Major contributors: dejan
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
13 **
14 ** \brief Reference-counted encapsulation of a pointer to node information.
15 **
16 ** Reference-counted encapsulation of a pointer to node information.
17 **/
18
19 #include "expr/node.h"
20 #include "util/output.h"
21
22 #include <iostream>
23
24 using namespace std;
25
26 namespace CVC4 {
27 namespace expr {
28
29 const int NodeSetDepth::s_iosIndex = std::ios_base::xalloc();
30
31 }/* CVC4::expr namespace */
32
33
34 TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node, std::string message)
35 : Exception(message), d_node(new Node(node))
36 {
37 }
38
39 TypeCheckingExceptionPrivate::~TypeCheckingExceptionPrivate() throw () {
40 delete d_node;
41 }
42
43 std::string TypeCheckingExceptionPrivate::toString() const {
44 std::stringstream ss;
45 ss << "Error type-checking " << d_node << ": " << d_msg;
46 return ss.str();
47 }
48
49 Node TypeCheckingExceptionPrivate::getNode() const {
50 return *d_node;
51 }
52
53 }/* CVC4 namespace */