00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
00025 struct labels_are_letters {};
00026 struct labels_are_atoms {};
00027 struct labels_are_words {};
00028 struct labels_are_series {};
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 }
00078
00079 #endif // ! VCSN_AUTOMATA_CONCEPT_AUTOMATA_KIND_HH