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

- File List
- File Members

# krat_exp_proxy.hxx

    00001 // krat_exp_proxy.hxx: 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
    00018 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PROXY_HXX
    00019 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PROXY_HXX
    00020
    00021 namespace vcsn {
    00022
    00023   namespace algebra {
    00024
    00025     template <class S, class T>
    00026     krat_exp_proxy<S, T>::krat_exp_proxy(Element<S, T> exp) :
    00027       self(exp)
    00028     {
    00029     }
    00030
    00031     template <class S, class T>
    00032     krat_exp_virtual&
    00033     krat_exp_proxy<S, T>::operator=(krat_exp_virtual& exp)
    00034     {
    00035       self = (dynamic_cast<krat_exp_proxy<S, T>*> (&exp))->self;
    00036       return *this;
    00037     }
    00038
    00039     template <class S, class T>
    00040     krat_exp_virtual*
    00041     krat_exp_proxy<S, T>::operator+(krat_exp_virtual* exp)
    00042     {
    00043       return new krat_exp_proxy<S, T>(self + (dynamic_cast<krat_exp_proxy<S, T>*> (exp))->self);
    00044     }
    00045
    00046     template <class S, class T>
    00047     krat_exp_virtual*
    00048     krat_exp_proxy<S, T>::operator*(krat_exp_virtual* exp)
    00049     {
    00050       return new krat_exp_proxy<S, T>(self * (dynamic_cast<krat_exp_proxy<S, T>*> (exp))->self);
    00051     }
    00052
    00053     template <class S, class T>
    00054     void
    00055     krat_exp_proxy<S, T>::star()
    00056     {
    00057       self.star();
    00058     }
    00059
    00060     template <class S, class T>
    00061     void
    00062     krat_exp_proxy<S, T>::left_weight(semiring_virtual* sem)
    00063     {
    00064       self = (dynamic_cast<semiring_proxy<S, T>*> (sem))->self * self;
    00065     }
    00066
    00067     template <class S, class T>
    00068     void
    00069     krat_exp_proxy<S, T>::right_weight(semiring_virtual* sem)
    00070     {
    00071       self = self * (dynamic_cast<semiring_proxy<S, T>*> (sem))->self;
    00072     }
    00073
    00074     template <class S, class T>
    00075     semiring_proxy<S, T>::semiring_proxy(semiring_elt_t& sem) :
    00076       self(sem)
    00077     {
    00078     }
    00079
    00080     template <class S, class T>
    00081     semiring_virtual&
    00082     semiring_proxy<S, T>::operator=(semiring_virtual& sem)
    00083     {
    00084       self = (dynamic_cast<semiring_proxy<S, T>*> (&sem))->self;
    00085       return *this;
    00086     }
    00087
    00088   } // algebra
    00089
    00090 } // vcsn
    00091 #endif // !VCSN_ALGEBRA_IMPLEMENTATION_SERIES_KRAT_EXP_PROXY_HXX //