Vaucanson  1.4.1
container_ops.hh
Go to the documentation of this file.
1 // container_ops.hh: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_TOOLS_CONTAINER_OPS_HH
18 # define VCSN_TOOLS_CONTAINER_OPS_HH
19 
20 # include <algorithm>
21 
23 
33 namespace vcsn
34 {
35 
36  template<typename S, typename T>
37  struct op_begin_traits
38  {
39  typedef typename T::iterator ret_t;
40  typedef typename T::const_iterator const_ret_t;
41  };
42 
43  template<typename S, typename T>
44  struct op_rbegin_traits
45  {
46  typedef typename T::reverse_iterator ret_t;
47  typedef typename T::const_reverse_iterator const_ret_t;
48  };
49 
50  template<typename S, typename T>
51  typename T::iterator op_begin (const Structure<S>& s,
52  T& v);
53 
54  template<typename S, typename T>
55  typename T::iterator op_end (const Structure<S>& s,
56  T& v);
57 
58  template<typename S, typename T>
59  typename T::const_iterator op_begin_const (const Structure<S>& s,
60  const T& v);
61 
62  template<typename S, typename T>
63  typename T::const_iterator op_end_const (const Structure<S>& s,
64  const T& v);
65 
66  template<typename S, typename T>
67  typename T::reverse_iterator op_rbegin (const Structure<S>& s,
68  T& v);
69 
70  template<typename S, typename T>
71  typename T::reverse_iterator op_rend (const Structure<S>& s,
72  T& v);
73 
74  template<typename S, typename T>
75  typename T::const_reverse_iterator op_rbegin_const (const Structure<S>& s,
76  const T& v);
77 
78  template<typename S, typename T>
79  typename T::const_reverse_iterator op_rend_const (const Structure<S>& s,
80  const T& v);
81 
82  template<typename S, typename T>
83  bool op_empty (const Structure<S>& s,
84  const T& v);
85 
86  template<typename S, typename T>
87  size_t op_size (const Structure<S>& s,
88  const T& v);
89 
90  template<typename S, typename T>
91  size_t op_max_size (const Structure<S>& s,
92  const T& v);
93 
94  template<typename S, typename T, typename U>
95  bool op_contains_e (const Structure<S>& s, const T& v,
96  const U& c);
97 
98  template<typename S, typename T, typename U>
99  void op_insert (const Structure<S>& s, T& v,
100  const U& c);
101 
102  template<typename S, typename T>
103  bool op_is_finite (const Structure<S>& s,
104  const T& a);
105 
106 } // vcsn
107 
108 
109 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
110 # include <vaucanson/misc/container_ops.hxx>
111 # endif // VCSN_USE_INTERFACE_ONLY
112 
113 
114 #endif // ! VCSN_TOOLS_CONTAINER_OPS_HH