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

- File List
- File Members

# 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, 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_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH
    00018 # define VCSN_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH
    00019
    00020 # include <utility>
    00021
    00022 namespace vcsn {
    00023
    00024   // These names are approximate; the comments below give the details.
    00025   struct labels_are_letters {};  // really generators of the monoid
    00026   struct labels_are_atoms   {};  // "letter" or monoid unit
    00027   struct labels_are_words   {};  // really element of the monoid
    00028   struct labels_are_series  {};  // really!
    00029
    00030   template <class Kind,
    00031             class WordValue,
    00032             class WeightValue,
    00033             class SeriesValue,
    00034             class Letter>
    00035   struct LabelOf;
    00036
    00037   template <class WordValue,
    00038             class WeightValue,
    00039             class SeriesValue,
    00040             class Letter>
    00041   struct LabelOf<labels_are_letters, WordValue, WeightValue,
    00042                  SeriesValue, Letter>
    00043   {
    00044     typedef Letter      ret;
    00045   };
    00046
    00047   template <class WordValue,
    00048             class WeightValue,
    00049             class SeriesValue,
    00050             class Letter>
    00051   struct LabelOf<labels_are_atoms, WordValue, WeightValue,
    00052                  SeriesValue, Letter>
    00053   {
    00054     typedef std::pair<WeightValue, WordValue>   ret;
    00055   };
    00056
    00057   template <class WordValue,
    00058             class WeightValue,
    00059             class SeriesValue,
    00060             class Letter>
    00061   struct LabelOf<labels_are_series, WordValue, WeightValue,
    00062                  SeriesValue, Letter>
    00063   {
    00064     typedef SeriesValue ret;
    00065   };
    00066
    00067   template <class WordValue,
    00068             class WeightValue,
    00069             class SeriesValue,
    00070             class Letter>
    00071   struct LabelOf<labels_are_words, WordValue, WeightValue,
    00072                  SeriesValue, Letter>
    00073   {
    00074     typedef WordValue   ret;
    00075   };
    00076
    00077 } // vcsn
    00078
    00079 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH