default_ops.hh

Go to the documentation of this file.
00001 // default_ops.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2001, 2002, 2003, 2004, 2005 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 #ifndef VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH
00018 # define VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH
00019 
00029 # include <vaucanson/design_pattern/predecls.hh>
00030 # include <vaucanson/misc/selectors.hh>
00031 
00032 namespace vcsn {
00033 
00037   /*--------------------.
00038   | Structure::contains |
00039   `--------------------*/
00040 
00047   template<typename S, typename T>
00048   bool op_contains(const Structure<S>& set, const T& value);
00049 
00050   /*---------------------.
00051   | Standard comparisons |
00052   `---------------------*/
00053 
00055   template<typename S, typename T, typename U>
00056   bool op_eq(const Structure<S>&,
00057              const T& v1,
00058              const U& v2);
00059 
00061   template<typename S, typename V, typename T, typename U>
00062   bool op_eq(const Structure<S>&,
00063              const Structure<V>&,
00064              const T& v1,
00065              const U& v2);
00066 
00068   template<typename S, typename T, typename U>
00069   bool op_lt(const Structure<S>&,
00070              const T& v1,
00071              const U& v2);
00072 
00074   template<typename S, typename V, typename T, typename U>
00075   bool op_lt(const Structure<S>&,
00076              const Structure<V>&,
00077              const T& v1,
00078              const U& v2);
00079 
00080   /*------------.
00081   | Conversions |
00082   `------------*/
00083 
00085   template<typename S, typename R, typename T>
00086   R op_convert(const Structure<S> &se,
00087                SELECTOR(R), const T& data);
00088 
00090   template<typename S, typename T>
00091   const T& op_convert(const Structure<S>& se,
00092                       SELECTOR(T), const T& from_data);
00093 
00095   template<typename S, typename T>
00096   const T& op_convert(const Structure<S>& se, SELECTOR(T),
00097                       const Structure<S>& from_se, const T& from_data);
00098 
00099   /*---------------------.
00100   | Default construction |
00101   `---------------------*/
00102 
00104   template<typename S, typename T>
00105   T op_default(const Structure<S>& se, SELECTOR(T));
00106 
00107 
00108   /*-----.
00109   | Swap |
00110   `-----*/
00111 
00113   template<typename S, typename T>
00114   void op_swap(const Structure<S>& se, T& v1, T& v2);
00115 
00116   /*-----------.
00117   | Assignment |
00118   `-----------*/
00119 
00121   template<typename S, typename T, typename U>
00122   void
00123   op_assign(const Structure<S>& s,
00124             T& dst, const U& src);
00125 
00130   template<typename S, typename T, typename U>
00131   void op_assign(const Structure<S>& s1,
00132                  const Structure<S>& s2,
00133                  T& dst,
00134                  const U& src);
00135 
00137   template<typename S, typename T, typename U>
00138   void op_in_add(const Structure<S>& s1,
00139                  const Structure<S>& s2,
00140                  T& dst,
00141                  const U& arg);
00142 
00144   template<typename S, typename T, typename U>
00145   void op_in_sub(const Structure<S>& s1,
00146                  const Structure<S>& s2,
00147                  T& dst,
00148                  const U& arg);
00149 
00151   template<typename S, typename T, typename U>
00152   void op_in_mul(const Structure<S>& s1,
00153                  const Structure<S>& s2,
00154                  T& dst,
00155                  const U& arg);
00156 
00158   template<typename S, typename T, typename U>
00159   void op_in_div(const Structure<S>& s1,
00160                  const Structure<S>& s2,
00161                  T& dst,
00162                  const U& arg);
00163 
00165   template<typename S, typename T, typename U>
00166   void op_in_mod(const Structure<S>& s1,
00167                  const Structure<S>& s2,
00168                  T& dst,
00169                  const U& arg);
00170 
00172   template<typename S, typename T, typename U>
00173   T op_add(const Structure<S>& s1,
00174            const Structure<S>& s2,
00175            const T& v1,
00176            const U& v2);
00177 
00179   template<typename S, typename T, typename U>
00180   T op_sub(const Structure<S>& s1,
00181            const Structure<S>& s2,
00182            const T& v1,
00183            const U& v2);
00184 
00186   template<typename S, typename T, typename U>
00187   T op_mul(const Structure<S>& s1,
00188            const Structure<S>& s2,
00189            const T& v1,
00190            const U& v2);
00191 
00193   template<typename S, typename T, typename U>
00194   T op_div(const Structure<S>& s1,
00195            const Structure<S>& s2,
00196            const T& v1,
00197            const U& v2);
00198 
00200   template<typename S, typename T, typename U>
00201   T op_mod(const Structure<S>& s1,
00202            const Structure<S>& s2,
00203            const T& v1,
00204            const U& v2);
00205 
00207   template<typename S, typename St, typename T>
00208   St& op_rin(const Structure<S>& s, St& st, const T& v);
00209 
00211   template<typename S, typename St, typename T>
00212   St& op_rout(const Structure<S>& s, St& st, const T& v);
00213 
00217 } // vcsn
00218 
00219 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00220 #  include <vaucanson/design_pattern/default_ops.hxx>
00221 # endif // VCSN_USE_INTERFACE_ONLY
00222 
00223 #endif // ! VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH

Generated on Thu Oct 9 20:22:34 2008 for Vaucanson by  doxygen 1.5.1