expr_op.cpp

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file expr_op.cpp
00004  * 
00005  * Author: Sergey Berezin
00006  * 
00007  * Created: Fri Feb  7 15:29:42 2003
00008  *
00009  * <hr>
00010  * Copyright (C) 2003 by the Board of Trustees of Leland Stanford
00011  * Junior University and by New York University. 
00012  *
00013  * License to use, copy, modify, sell and/or distribute this software
00014  * and its documentation for any purpose is hereby granted without
00015  * royalty, subject to the terms and conditions defined in the \ref
00016  * LICENSE file provided with this distribution.  In particular:
00017  *
00018  * - The above copyright notice and this permission notice must appear
00019  * in all copies of the software and related documentation.
00020  *
00021  * - THE SOFTWARE IS PROVIDED "AS-IS", WITHOUT ANY WARRANTIES,
00022  * EXPRESSED OR IMPLIED.  USE IT AT YOUR OWN RISK.
00023  * 
00024  * <hr>
00025  * 
00026  */
00027 /*****************************************************************************/
00028 
00029 #include "expr_op.h"
00030 
00031 using namespace std;
00032 
00033 namespace CVCL {
00034 
00035 Op::Op(ExprManager* em, const Op& op) : d_kind(op.d_kind), d_expr() {
00036   if (!op.d_expr.isNull()) d_expr = em->rebuild(op.d_expr);
00037 }
00038 
00039 Op& Op::operator=(const Op& op) {
00040   if(&op == this) return *this; // Self-assignment
00041   d_kind = op.d_kind;
00042   d_expr = op.d_expr;
00043   return *this;
00044 }
00045 
00046 string Op::toString() const {
00047   ostringstream ss;
00048   ss << *this;
00049   return ss.str();
00050 }
00051 
00052 } // end of namespace CVCL

Generated on Thu Apr 13 16:57:31 2006 for CVC Lite by  doxygen 1.4.4