Vaucanson
1.4.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
vaucanson
design_pattern
default_ops.hh
Go to the documentation of this file.
1
// default_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 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_DESIGN_PATTERN_DEFAULT_OPS_HH
18
# define VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH
19
29
# include <
vaucanson/design_pattern/predecls.hh
>
30
# include <
vaucanson/misc/selectors.hh
>
31
32
namespace
vcsn {
33
37
/*--------------------.
38
| Structure::contains |
39
`--------------------*/
40
47
template
<
typename
S,
typename
T>
48
bool
op_contains
(
const
Structure<S>&
set
,
const
T& value);
49
50
/*---------------------.
51
| Standard comparisons |
52
`---------------------*/
53
55
template
<
typename
S,
typename
T,
typename
U>
56
bool
op_eq
(
const
Structure<S>&,
57
const
T& v1,
58
const
U& v2);
59
61
template
<
typename
S,
typename
V,
typename
T,
typename
U>
62
bool
op_eq
(
const
Structure<S>&,
63
const
Structure<V>&,
64
const
T& v1,
65
const
U& v2);
66
68
template
<
typename
S,
typename
T,
typename
U>
69
bool
op_lt
(
const
Structure<S>&,
70
const
T& v1,
71
const
U& v2);
72
74
template
<
typename
S,
typename
V,
typename
T,
typename
U>
75
bool
op_lt
(
const
Structure<S>&,
76
const
Structure<V>&,
77
const
T& v1,
78
const
U& v2);
79
80
/*------------.
81
| Conversions |
82
`------------*/
83
85
template
<
typename
S,
typename
R,
typename
T>
86
R op_convert(
const
Structure<S> &se,
87
SELECTOR
(R),
const
T& data);
88
90
template
<
typename
S,
typename
T>
91
const
T& op_convert(
const
Structure<S>& se,
92
SELECTOR
(T),
const
T& from_data);
93
95
template
<
typename
S,
typename
T>
96
const
T& op_convert(
const
Structure<S>& se,
SELECTOR
(T),
97
const
Structure<S>& from_se,
const
T& from_data);
98
99
/*---------------------.
100
| Default construction |
101
`---------------------*/
102
104
template
<
typename
S,
typename
T>
105
T
op_default
(
const
Structure<S>& se,
SELECTOR
(T));
106
107
108
/*-----.
109
| Swap |
110
`-----*/
111
113
template
<
typename
S,
typename
T>
114
void
op_swap
(
const
Structure<S>& se, T& v1, T& v2);
115
116
/*-----------.
117
| Assignment |
118
`-----------*/
119
121
template
<
typename
S,
typename
T,
typename
U>
122
void
123
op_assign
(
const
Structure<S>& s,
124
T& dst,
const
U& src);
125
130
template
<
typename
S,
typename
T,
typename
U>
131
void
op_assign
(
const
Structure<S>& s1,
132
const
Structure<S>& s2,
133
T& dst,
134
const
U& src);
135
137
template
<
typename
S,
typename
T,
typename
U>
138
void
op_in_add
(
const
Structure<S>& s1,
139
const
Structure<S>& s2,
140
T& dst,
141
const
U& arg);
142
144
template
<
typename
S,
typename
T,
typename
U>
145
void
op_in_sub
(
const
Structure<S>& s1,
146
const
Structure<S>& s2,
147
T& dst,
148
const
U& arg);
149
151
template
<
typename
S,
typename
T,
typename
U>
152
void
op_in_mul
(
const
Structure<S>& s1,
153
const
Structure<S>& s2,
154
T& dst,
155
const
U& arg);
156
158
template
<
typename
S,
typename
T,
typename
U>
159
void
op_in_div
(
const
Structure<S>& s1,
160
const
Structure<S>& s2,
161
T& dst,
162
const
U& arg);
163
165
template
<
typename
S,
typename
T,
typename
U>
166
void
op_in_mod
(
const
Structure<S>& s1,
167
const
Structure<S>& s2,
168
T& dst,
169
const
U& arg);
170
172
template
<
typename
S,
typename
T,
typename
U>
173
T
op_add
(
const
Structure<S>& s1,
174
const
Structure<S>& s2,
175
const
T& v1,
176
const
U& v2);
177
179
template
<
typename
S,
typename
T,
typename
U>
180
T
op_sub
(
const
Structure<S>& s1,
181
const
Structure<S>& s2,
182
const
T& v1,
183
const
U& v2);
184
186
template
<
typename
S,
typename
T,
typename
U>
187
T
op_mul
(
const
Structure<S>& s1,
188
const
Structure<S>& s2,
189
const
T& v1,
190
const
U& v2);
191
193
template
<
typename
S,
typename
T,
typename
U>
194
T
op_div
(
const
Structure<S>& s1,
195
const
Structure<S>& s2,
196
const
T& v1,
197
const
U& v2);
198
200
template
<
typename
S,
typename
T,
typename
U>
201
T
op_mod
(
const
Structure<S>& s1,
202
const
Structure<S>& s2,
203
const
T& v1,
204
const
U& v2);
205
207
template
<
typename
S,
typename
St,
typename
T>
208
St&
op_rin
(
const
Structure<S>& s, St& st,
const
T& v);
209
211
template
<
typename
S,
typename
St,
typename
T>
212
St&
op_rout
(
const
Structure<S>& s, St& st,
const
T& v);
213
217
}
// vcsn
218
219
# if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
220
# include <vaucanson/design_pattern/default_ops.hxx>
221
# endif // VCSN_USE_INTERFACE_ONLY
222
223
#endif // ! VCSN_DESIGN_PATTERN_DEFAULT_OPS_HH
Generated on Sat Jul 14 2012 18:46:39 for Vaucanson by
1.8.1.1