Vaucanson 1.4
|
00001 // monoid_rep_base.hh: this file is part of the Vaucanson project. 00002 // 00003 // Vaucanson, a generic library for finite state machines. 00004 // 00005 // Copyright (C) 2008 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_IMPLEMENTATION_MONOID_MONOID_REP_BASE_HH 00018 # define VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_BASE_HH 00019 00020 # include <vector> 00021 # include <string> 00022 00023 # include <boost/shared_ptr.hpp> 00024 00025 # include <vaucanson/algebra/concept/letter.hh> 00026 # include <vaucanson/misc/usual_macros.hh> 00027 00028 namespace vcsn 00029 { 00030 namespace algebra 00031 { 00032 template <template <typename> class S, typename T> 00033 struct MonoidRepBase 00034 { 00035 // The type of the monoid. 00036 typedef T monoid_t; 00037 00038 // The most derived type in the hierarchy. 00039 typedef S<monoid_t> self_t; 00040 00041 // Pointer types. 00042 typedef boost::shared_ptr<self_t> pointer_t; 00043 00044 // Basic structure attributes. 00045 std::string empty; 00046 std::string concat; 00047 std::vector<std::string> maybe_epsilon; 00048 00049 // Default CTOR. 00050 MonoidRepBase(); 00051 00052 // Disambiguate the tokens w.r.t. a monoid. 00053 void disambiguate(const monoid_t&, pointer_t&); 00054 }; 00055 00056 template <template <typename> class S, typename T> 00057 bool operator==(boost::shared_ptr<MonoidRepBase<S, T> >, 00058 boost::shared_ptr<MonoidRepBase<S, T> >); 00059 00060 } // ! algebra 00061 00062 } // ! vcsn 00063 00064 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB 00065 # include <vaucanson/algebra/implementation/monoid/monoid_rep_base.hxx> 00066 # endif // VCSN_USE_INTERFACE_ONLY 00067 00068 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_BASE_HH