bmig_functors.hh

00001 // bmig_functors.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2007, 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_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_FUNCTORS_HH_
00019 # define VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_FUNCTORS_HH_
00020 
00021 # include <functional>
00022 # include <vaucanson/automata/implementation/bmig/initial_value.hh>
00023 
00024 namespace vcsn
00025 {
00026   namespace bmig
00027   {
00028     template<typename T>
00029     struct update_label;
00030 
00031     template<typename HState, typename Series>
00032     struct update_label<InitialValue<HState, Series> >
00033       : public std::unary_function<InitialValue<HState, Series>, void>
00034     {
00035       update_label(const Series& i_);
00036       void operator()(InitialValue<HState, Series>& key);
00037 
00038       Series i;
00039     };
00040 
00041 
00042     // Functor used to update the label of a transition.
00043     //
00044     // Boost::multi_index only provides const iterators and modifying some data
00045     // in such a container is a special operation which may require to reorder
00046     // several sets internaly. Thus, a special method is provided, update(), which
00047     // uses such functors.
00048     //
00049     // See implementation in automata/implementation/bmig/boost_functors.hxx.
00050     template<typename HLabel>
00051     struct update_hlabel : public std::unary_function<HLabel, void>
00052     {
00053       update_hlabel(const HLabel& i_);
00054       void operator()(HLabel &key);
00055 
00056       HLabel i;
00057     };
00058 
00059   } //bmig
00060 } //vcsn
00061 
00062 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00063 #  include <vaucanson/automata/implementation/bmig/bmig_functors.hxx>
00064 # endif // !VCSN_USE_INTERFACE_ONLY || VCSN_USE_LIB
00065 
00066 #endif // !VCSN_AUTOMATA_IMPLEMENTATION_BMIG_BMIG_FUNCTORS_HH_
00067 

Generated on Thu Oct 9 20:22:34 2008 for Vaucanson by  doxygen 1.5.1