Vaucanson 1.4
monoid_rep.hh
00001 // monoid_rep.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_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_HH
00019 
00020 # include <boost/shared_ptr.hpp>
00021 
00022 # include <vaucanson/algebra/implementation/monoid/monoid_rep_base.hh>
00023 
00024 namespace vcsn
00025 {
00026   namespace algebra
00027   {
00028     template <typename M>
00029     struct MonoidRep : MonoidRepBase<MonoidRep, M>
00030     {
00031     };
00032 
00033     template <typename M>
00034     bool operator==(boost::shared_ptr<MonoidRep<M> >,
00035                     boost::shared_ptr<MonoidRep<M> >);
00036 
00037     template <typename M>
00038     struct MonoidRepDefault
00039     {
00040       // Type helpers.
00041       typedef MonoidRep<M>                      monoid_rep_t;
00042       typedef boost::shared_ptr<monoid_rep_t>   pointer_t;
00043 
00044       // Singleton instance getter.
00045       static pointer_t get_instance()
00046       {
00047         static pointer_t p(new monoid_rep_t());
00048         return p;
00049       }
00050     };
00051 
00052   } // ! algebra
00053 
00054 } // ! vcsn
00055 
00056 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00057 #  include <vaucanson/algebra/implementation/monoid/monoid_rep.hxx>
00058 # endif // VCSN_USE_INTERFACE_ONLY
00059 
00060 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_MONOID_MONOID_REP_HH