- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# freemonoid_product.hxx

    00001 // freemonoid_product.hxx: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2004, 2005 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_FREEMONOID_PRODUCT_HXX
    00018 # define VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_HXX
    00019
    00020 # include <vaucanson/algebra/concept/freemonoid_product.hh>
    00021
    00022 namespace vcsn {
    00023
    00024   namespace algebra {
    00025
    00026     /*------------------------.
    00027     | FreeMonoidProduct<F, S> |
    00028     `------------------------*/
    00029
    00030     template <class F, class S>
    00031     FreeMonoidProduct<F, S>::FreeMonoidProduct(const F& a, const S& b) :
    00032       first_monoid_ (a), second_monoid_ (b)
    00033     {}
    00034
    00035     template <class F, class S>
    00036     FreeMonoidProduct<F, S>::FreeMonoidProduct(const FreeMonoidProduct& w) :
    00037       FreeMonoidProductBase<FreeMonoidProduct<F, S> >(w),
    00038       first_monoid_(w.first_monoid_),
    00039       second_monoid_(w.second_monoid_)
    00040     {}
    00041
    00042     template <class F, class S>
    00043     typename FreeMonoidProduct<F, S>::first_monoid_t&
    00044     FreeMonoidProduct<F, S>::first_monoid()
    00045     {
    00046       return first_monoid_;
    00047     }
    00048
    00049     template <class F, class S>
    00050     const typename FreeMonoidProduct<F, S>::first_monoid_t&
    00051     FreeMonoidProduct<F, S>::first_monoid() const
    00052     {
    00053       return first_monoid_;
    00054     }
    00055
    00056     template <class F, class S>
    00057     typename FreeMonoidProduct<F, S>::second_monoid_t&
    00058     FreeMonoidProduct<F, S>::second_monoid()
    00059     {
    00060       return second_monoid_;
    00061     }
    00062
    00063     template <class F, class S>
    00064     const typename FreeMonoidProduct<F, S>::second_monoid_t&
    00065     FreeMonoidProduct<F, S>::second_monoid() const
    00066     {
    00067       return second_monoid_;
    00068     }
    00069
    00070     template<class F, class S>
    00071     bool operator==(const FreeMonoidProduct<F, S>& a,
    00072                     const FreeMonoidProduct<F, S>& b)
    00073     {
    00074       return (a.first_monoid() == b.first_monoid()) and
    00075              (a.second_monoid() == b.second_monoid());
    00076     }
    00077
    00078   } // algebra
    00079
    00080 } // vcsn
    00081
    00082 #endif // ! VCSN_ALGEBRA_CONCEPT_FREEMONOID_PRODUCT_HXX