Vaucanson  1.4.1
semigroup_base.hh
1 // semigroup_base.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_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH
18 # define VCSN_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH
19 
20 # include <vaucanson/design_pattern/design_pattern.hh>
21 
22 namespace vcsn {
23 
24  namespace algebra {
25 
29 
30 
31  struct mul_kind
32  {};
33 
36  struct add_kind
37  {};
38 
42  template<class Self>
43  struct SemigroupBase : Structure<Self>
44  {
45  protected:
47  SemigroupBase();
48 
50  SemigroupBase(const SemigroupBase& other);
51  };
52 
56  } // algebra
57 
61  /*-------------------------------------.
62  | dynamic_traits<SemigroupBase<Self> > |
63  `-------------------------------------*/
64 
65  template<class Self>
66  struct dynamic_traits<algebra::SemigroupBase<Self> >
67  : dynamic_traits<Structure<Self> >
68  { };
69 
70  template<typename S>
71  struct virtual_types<algebra::SemigroupBase<S> >
72  : virtual_types<Structure<S> >
73  { };
74 
75 
76  /*-----------------------------------.
77  | MetaElement<SemigroupBase<Self>,T> |
78  `-----------------------------------*/
79 
81  template<class Self, typename T>
82  struct MetaElement<algebra::SemigroupBase<Self>, T>
83  : MetaElement<Structure<Self>, T>
84  {
85  protected:
87  MetaElement();
88 
90  MetaElement(const MetaElement& other);
91  };
92 
96 } // vcsn
97 
98 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
99 # include <vaucanson/algebra/concept/semigroup_base.hxx>
100 # endif // VCSN_USE_INTERFACE_ONLY
101 
102 #endif // ! VCSN_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH