Vaucanson  1.4.1
krat_exp_pattern.hxx
1 // krat_exp_pattern.hxx: 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_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PATTERN_HXX
18 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PATTERN_HXX
19 
20 # include <vaucanson/algebra/implementation/series/krat_exp_pattern.hh>
21 
22 namespace vcsn {
23 
24  namespace algebra {
25 
26  template <class T, class U>
27  BinaryOp<T, U>::BinaryOp()
28  {}
29 
30  template <class T, class U>
31  BinaryOp<T, U>::BinaryOp(const BinaryOp& b) :
32  lhs_(b.lhs_),
33  rhs_(b.rhs_)
34  {}
35 
36  template <class T, class U>
37  BinaryOp<T, U>::BinaryOp(const T& lhs, const U& rhs) :
38  lhs_(lhs),
39  rhs_(rhs)
40  {}
41 
42  template <class T, class U>
43  T&
44  BinaryOp<T, U>::lhs()
45  {
46  return lhs_;
47  }
48 
49  template <class T, class U>
50  const T&
51  BinaryOp<T, U>::lhs() const
52  {
53  return lhs_;
54  }
55 
56  template <class T, class U>
57  U&
58  BinaryOp<T, U>::rhs()
59  {
60  return rhs_;
61  }
62 
63  template <class T, class U>
64  const U&
65  BinaryOp<T, U>::rhs() const
66  {
67  return rhs_;
68  }
69 
70  template <class T>
71  UnaryOp<T>::UnaryOp()
72  {}
73 
74  template <class T>
75  UnaryOp<T>::UnaryOp(const UnaryOp& b) :
76  node_(b.node_)
77  {}
78 
79  template <class T>
80  UnaryOp<T>::UnaryOp(const T& node) :
81  node_(node)
82  {}
83 
84  template <class T>
85  T&
86  UnaryOp<T>::value()
87  {
88  return node_;
89  }
90 
91  template <class T>
92  const T&
93  UnaryOp<T>::value() const
94  {
95  return node_;
96  }
97 
98  template <class T>
99  Value<T>::Value()
100  {}
101 
102  template <class T>
103  Value<T>::Value(const Value& v) :
104  v_ (v.v_)
105  {}
106 
107  template <class T>
108  Value<T>::Value(const T& v) :
109  v_(v)
110  {}
111 
112  template <class T>
113  T&
114  Value<T>::value()
115  {
116  return v_;
117  }
118 
119  template <class T>
120  const T&
121  Value<T>::value() const
122  {
123  return v_;
124  }
125 
126  template <class Self, class T, class U, class F>
127  U
129  {
130  return F::d(*static_cast<Self*>(this), ast);
131  }
132 
133  template <class Self, class T, class U, class F>
135  {}
136 
137  } // algebra
138 
139 } // vcsn
140 
141 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PATTERN_HXX