container_ops.hh

00001 // container_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 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_TOOLS_CONTAINER_OPS_HH
00018 # define VCSN_TOOLS_CONTAINER_OPS_HH
00019 
00020 # include <algorithm>
00021 
00022 # include <vaucanson/design_pattern/predecls.hh>
00023 
00024 namespace vcsn
00025 {
00026 
00027   template<typename S, typename T>
00028   struct op_begin_traits
00029   {
00030     typedef typename T::iterator                ret_t;
00031     typedef typename T::const_iterator          const_ret_t;
00032   };
00033 
00034   template<typename S, typename T>
00035   struct op_rbegin_traits
00036   {
00037     typedef typename T::reverse_iterator         ret_t;
00038     typedef typename T::const_reverse_iterator   const_ret_t;
00039   };
00040 
00041   template<typename S, typename T>
00042   typename T::iterator op_begin(const Structure<S>& s,
00043                                 T& v);
00044 
00045   template<typename S, typename T>
00046   typename T::iterator op_end(const Structure<S>& s,
00047                               T& v);
00048 
00049   template<typename S, typename T>
00050   typename T::const_iterator op_begin_const(const Structure<S>& s,
00051                                             const T& v);
00052 
00053   template<typename S, typename T>
00054   typename T::const_iterator op_end_const(const Structure<S>& s,
00055                                           const T& v);
00056 
00057   template<typename S, typename T>
00058   typename T::reverse_iterator op_rbegin(const Structure<S>& s,
00059                                          T& v);
00060 
00061   template<typename S, typename T>
00062   typename T::reverse_iterator op_rend(const Structure<S>& s,
00063                                        T& v);
00064 
00065   template<typename S, typename T>
00066   typename T::const_reverse_iterator op_rbegin_const(const Structure<S>& s,
00067                                                const T& v);
00068 
00069   template<typename S, typename T>
00070   typename T::const_reverse_iterator op_rend_const(const Structure<S>& s,
00071                                              const T& v);
00072 
00073   template<typename S, typename T>
00074   bool op_empty(const Structure<S>& s,
00075                 const T& v);
00076 
00077   template<typename S, typename T>
00078   size_t op_size(const Structure<S>& s,
00079                  const T& v);
00080 
00081   template<typename S, typename T>
00082   size_t op_max_size(const Structure<S>& s,
00083                  const T& v);
00084 
00085   template<typename S, typename T, typename U>
00086   bool op_contains_e(const Structure<S>& s, const T& v,
00087                      const U& c);
00088 
00089   template<typename S, typename T, typename U>
00090   void op_insert(const Structure<S>& s, T& v,
00091                  const U& c);
00092 
00093   template<typename S, typename T>
00094   bool op_is_finite(const Structure<S>& s,
00095                     const T& a);
00096 
00097 
00098 } // vcsn
00099 
00100 
00101 #ifndef VCSN_USE_INTERFACE_ONLY
00102     # include <vaucanson/tools/container_ops.hxx>
00103 #endif // VCSN_USE_INTERFACE_ONLY
00104 
00105 
00106 #endif // ! VCSN_TOOLS_CONTAINER_OPS_HH

Generated on Fri Jul 28 12:18:30 2006 for Vaucanson by  doxygen 1.4.6