logic.hh

00001 // Copyright (C) 2001, 2002, 2003, 2004, 2005 EPITA Research and
00002 // Development Laboratory
00003 //
00004 // This file is part of the Olena Library.  This library is free
00005 // software; you can redistribute it and/or modify it under the terms
00006 // of the GNU General Public License version 2 as published by the
00007 // Free Software Foundation.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this library; see the file COPYING.  If not, write to
00016 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017 // Boston, MA 02110-1301, USA.
00018 //
00019 // As a special exception, you may use this file as part of a free
00020 // software library without restriction.  Specifically, if other files
00021 // instantiate templates or use macros or inline functions from this
00022 // file, or you compile this file and link it with other files to
00023 // produce an executable, this file does not by itself cause the
00024 // resulting executable to be covered by the GNU General Public
00025 // License.  This exception does not however invalidate any other
00026 // reasons why the executable file might be covered by the GNU General
00027 // Public License.
00028 
00029 #ifndef OLENA_ARITH_LOGIC_HH
00030 # define OLENA_ARITH_LOGIC_HH
00031 
00032 # include <oln/basics.hh>
00033 # include <ntg/bin.hh>
00034 # include <oln/convert/basics.hh>
00035 # include <oln/arith/internal/opdecls.hh>
00036 # include <functional>
00037 
00038 namespace oln {
00039 
00040   namespace arith {
00041 
00043     oln_arith_declare_binfixedtype_functors_(logic_and, ntg::bin,
00044                                              val1 && val2,
00045                                              val && cst_);
00046 
00048     oln_arith_declare_binfixedtype_functors_(logic_or, ntg::bin,
00049                                              val1 || val2,
00050                                              val || cst_);
00052     oln_arith_declare_binfixedtype_functors_(logic_and_not, ntg::bin,
00053                                              val1 && ! val2,
00054                                              val && ! cst_);
00055 
00057     oln_arith_declare_unfixedtype_functor_(logic_not, ntg::bin, ! val);
00058 
00060     oln_arith_declare_all_nongenericbinop_procs_(logic_and)
00061 
00062     
00063     oln_arith_declare_all_nongenericbinop_procs_(logic_or)
00064 
00066     oln_arith_declare_all_nongenericbinop_procs_(logic_and_not)
00067 
00069     oln_arith_declare_nongenericunop_procs_(logic_not)
00070 
00071   } // end of arith
00072 
00073 } // end of oln
00074 
00075 
00076 #endif // ! OLENA_ARITH_LOGIC_HH

Generated on Tue Feb 20 20:20:07 2007 for Olena by  doxygen 1.5.1