CVC3
expr_op.cpp
Go to the documentation of this file.
1 /*****************************************************************************/
2 /*!
3  * \file expr_op.cpp
4  *
5  * Author: Sergey Berezin
6  *
7  * Created: Fri Feb 7 15:29:42 2003
8  *
9  * <hr>
10  *
11  * License to use, copy, modify, sell and/or distribute this software
12  * and its documentation for any purpose is hereby granted without
13  * royalty, subject to the terms and conditions defined in the \ref
14  * LICENSE file provided with this distribution.
15  *
16  * <hr>
17  *
18  */
19 /*****************************************************************************/
20 
21 #include "expr_op.h"
22 
23 using namespace std;
24 
25 namespace CVC3 {
26 
27 Op::Op(ExprManager* em, const Op& op) : d_kind(op.d_kind), d_expr() {
28  if (!op.d_expr.isNull()) d_expr = em->rebuild(op.d_expr);
29 }
30 
31 Op& Op::operator=(const Op& op) {
32  if(&op == this) return *this; // Self-assignment
33  d_kind = op.d_kind;
34  d_expr = op.d_expr;
35  return *this;
36 }
37 
38 string Op::toString() const {
39  ostringstream ss;
40  ss << *this;
41  return ss.str();
42 }
43 
44 } // end of namespace CVC3