automata_kind.hh

00001 // automata_kind.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2001, 2002, 2003, 2004 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_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH
00018 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH
00019 
00020 # include <utility>
00021 
00022 namespace vcsn {
00023 
00024   struct labels_are_letters {};
00025   struct labels_are_words   {};
00026   struct labels_are_series  {};
00027   struct labels_are_couples {};
00028 
00029   template <class Kind,
00030             class WordValue,
00031             class WeightValue,
00032             class SeriesValue,
00033             class Letter>
00034   struct LabelOf;
00035 
00036   template <class WordValue,
00037             class WeightValue,
00038             class SeriesValue,
00039             class Letter>
00040   struct LabelOf<labels_are_letters, WordValue, WeightValue,
00041                  SeriesValue, Letter>
00042   {
00043     typedef Letter      ret;
00044   };
00045 
00046   template <class WordValue,
00047             class WeightValue,
00048             class SeriesValue,
00049             class Letter>
00050   struct LabelOf<labels_are_series, WordValue, WeightValue,
00051                  SeriesValue, Letter>
00052   {
00053     typedef SeriesValue ret;
00054   };
00055 
00056   template <class WordValue,
00057             class WeightValue,
00058             class SeriesValue,
00059             class Letter>
00060   struct LabelOf<labels_are_couples, WordValue, WeightValue,
00061                  SeriesValue, Letter>
00062   {
00063     typedef std::pair<WeightValue, WordValue>   ret;
00064   };
00065 
00066   template <class WordValue,
00067             class WeightValue,
00068             class SeriesValue,
00069             class Letter>
00070   struct LabelOf<labels_are_words, WordValue, WeightValue,
00071                  SeriesValue, Letter>
00072   {
00073     typedef WordValue   ret;
00074   };
00075 
00076 } // vcsn
00077 
00078 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH

Generated on Fri Jul 28 12:18:29 2006 for Vaucanson by  doxygen 1.4.6