- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# 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 op_assign(const Structure<S>& s,
    00123                  T& dst, const U& src);
    00124
    00129   template<typename S, typename T, typename U>
    00130   void op_assign(const Structure<S>& s1,
    00131                  const Structure<S>& s2,
    00132                  T& dst,
    00133                  const U& src);
    00134
    00136   template<typename S, typename T, typename U>
    00137   void op_in_add(const Structure<S>& s1,
    00138                  const Structure<S>& s2,
    00139                  T& dst,
    00140                  const U& arg);
    00141
    00143   template<typename S, typename T, typename U>
    00144   void op_in_sub(const Structure<S>& s1,
    00145                  const Structure<S>& s2,
    00146                  T& dst,
    00147                  const U& arg);
    00148
    00150   template<typename S, typename T, typename U>
    00151   void op_in_mul(const Structure<S>& s1,
    00152                  const Structure<S>& s2,
    00153                  T& dst,
    00154                  const U& arg);
    00155
    00157   template<typename S, typename T, typename U>
    00158   void op_in_div(const Structure<S>& s1,
    00159                  const Structure<S>& s2,
    00160                  T& dst,
    00161                  const U& arg);
    00162
    00164   template<typename S, typename T, typename U>
    00165   void op_in_mod(const Structure<S>& s1,
    00166                  const Structure<S>& s2,
    00167                  T& dst,
    00168                  const U& arg);
    00169
    00171   template<typename S, typename T, typename U>
    00172   T op_add(const Structure<S>& s1,
    00173            const Structure<S>& s2,
    00174            const T& v1,
    00175            const U& v2);
    00176
    00178   template<typename S, typename T, typename U>
    00179   T op_sub(const Structure<S>& s1,
    00180            const Structure<S>& s2,
    00181            const T& v1,
    00182            const U& v2);
    00183
    00185   template<typename S, typename T, typename U>
    00186   T op_mul(const Structure<S>& s1,
    00187            const Structure<S>& s2,
    00188            const T& v1,
    00189            const U& v2);
    00190
    00192   template<typename S, typename T, typename U>
    00193   T op_div(const Structure<S>& s1,
    00194            const Structure<S>& s2,
    00195            const T& v1,
    00196            const U& v2);
    00197
    00199   template<typename S, typename T, typename U>
    00200   T op_mod(const Structure<S>& s1,
    00201            const Structure<S>& s2,
    00202            const T& v1,
    00203            const U& v2);
    00204
    00206   template<typename S, typename St, typename T>
    00207   St& op_rin(const Structure<S>& s, St& st, const T& v);
    00208
    00210   template<typename S, typename St, typename T>
    00211   St& op_rout(const Structure<S>& s, St& st, const T& v);
    00212
    00216 } // vcsn
    00217
    00218 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
    00219 #  include <vaucanson/design_pattern/default_ops.hxx>
    00220 # endif // VCSN_USE_INTERFACE_ONLY
    00221
    00222 #endif // ! VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH