Vaucanson 1.4
semigroup_base.hh
00001 // semigroup_base.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_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH
00018 # define VCSN_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH
00019 
00020 # include <vaucanson/design_pattern/design_pattern.hh>
00021 
00022 namespace vcsn {
00023 
00024   namespace algebra {
00025 
00029 
00030 
00031     struct mul_kind
00032     {};
00033 
00036     struct add_kind
00037     {};
00038 
00042     template<class Self>
00043     struct SemigroupBase : Structure<Self>
00044     {
00045     protected:
00047       SemigroupBase();
00048 
00050       SemigroupBase(const SemigroupBase& other);
00051     };
00052 
00056   } // algebra
00057 
00061   /*-------------------------------------.
00062   | dynamic_traits<SemigroupBase<Self> > |
00063   `-------------------------------------*/
00064 
00065   template<class Self>
00066   struct dynamic_traits<algebra::SemigroupBase<Self> >
00067     : dynamic_traits<Structure<Self> >
00068   { };
00069 
00070   template<typename S>
00071   struct virtual_types<algebra::SemigroupBase<S> >
00072     : virtual_types<Structure<S> >
00073   { };
00074 
00075 
00076   /*-----------------------------------.
00077   | MetaElement<SemigroupBase<Self>,T> |
00078   `-----------------------------------*/
00079 
00081   template<class Self, typename T>
00082   struct MetaElement<algebra::SemigroupBase<Self>, T>
00083     : MetaElement<Structure<Self>, T>
00084   {
00085   protected:
00087     MetaElement();
00088 
00090     MetaElement(const MetaElement& other);
00091   };
00092 
00096 } // vcsn
00097 
00098 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00099 #  include <vaucanson/algebra/concept/semigroup_base.hxx>
00100 # endif // VCSN_USE_INTERFACE_ONLY
00101 
00102 #endif // ! VCSN_ALGEBRA_CONCEPT_SEMIGROUP_BASE_HH