container_ops.hh

Go to the documentation of this file.
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, 2005, 2006 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 
00033 namespace vcsn
00034 {
00035 
00036   template<typename S, typename T>
00037   struct op_begin_traits
00038   {
00039       typedef typename T::iterator ret_t;
00040       typedef typename T::const_iterator const_ret_t;
00041   };
00042 
00043   template<typename S, typename T>
00044   struct op_rbegin_traits
00045   {
00046       typedef typename T::reverse_iterator ret_t;
00047       typedef typename T::const_reverse_iterator const_ret_t;
00048   };
00049 
00050   template<typename S, typename T>
00051   typename T::iterator op_begin (const Structure<S>& s,
00052                                  T& v);
00053 
00054   template<typename S, typename T>
00055   typename T::iterator op_end (const Structure<S>& s,
00056                                T& v);
00057 
00058   template<typename S, typename T>
00059   typename T::const_iterator op_begin_const (const Structure<S>& s,
00060                                              const T& v);
00061 
00062   template<typename S, typename T>
00063   typename T::const_iterator op_end_const (const Structure<S>& s,
00064                                            const T& v);
00065 
00066   template<typename S, typename T>
00067   typename T::reverse_iterator op_rbegin (const Structure<S>& s,
00068                                           T& v);
00069 
00070   template<typename S, typename T>
00071   typename T::reverse_iterator op_rend (const Structure<S>& s,
00072                                         T& v);
00073 
00074   template<typename S, typename T>
00075   typename T::const_reverse_iterator op_rbegin_const (const Structure<S>& s,
00076                                                       const T& v);
00077 
00078   template<typename S, typename T>
00079   typename T::const_reverse_iterator op_rend_const (const Structure<S>& s,
00080                                                     const T& v);
00081 
00082   template<typename S, typename T>
00083   bool op_empty (const Structure<S>& s,
00084                  const T& v);
00085 
00086   template<typename S, typename T>
00087   size_t op_size (const Structure<S>& s,
00088                   const T& v);
00089 
00090   template<typename S, typename T>
00091   size_t op_max_size (const Structure<S>& s,
00092                       const T& v);
00093 
00094   template<typename S, typename T, typename U>
00095   bool op_contains_e (const Structure<S>& s, const T& v,
00096                       const U& c);
00097 
00098   template<typename S, typename T, typename U>
00099   void op_insert (const Structure<S>& s, T& v,
00100                   const U& c);
00101 
00102   template<typename S, typename T>
00103   bool op_is_finite (const Structure<S>& s,
00104                      const T& a);
00105 
00106 } // vcsn
00107 
00108 
00109 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00110 #  include <vaucanson/misc/container_ops.hxx>
00111 # endif // VCSN_USE_INTERFACE_ONLY
00112 
00113 
00114 #endif // ! VCSN_TOOLS_CONTAINER_OPS_HH

Generated on Sun Jul 29 19:35:18 2007 for Vaucanson by  doxygen 1.5.2