00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HH
00019 
00020 # include <climits>
00021 # include <string>
00022 # include <iostream>
00023 
00024 # include <vaucanson/algebra/concept/letter.hh>
00025 # include <vaucanson/algebra/concept/freemonoid_base.hh>
00026 
00027 
00028 
00029 namespace vcsn
00030 {
00031 
00032   namespace algebra
00033   {
00034 
00035     template <typename U, typename V>
00036     struct letter_traits< std::pair<U, V> >
00037     {
00038         enum
00039         {
00040           
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048           cardinal = INT_MAX
00049         };
00050 
00051         static char default_epsilon()
00052         {
00053           return '1';
00054         }
00055     };
00056 
00057   } 
00058 } 
00059 
00060 namespace vcsn {
00061 
00062   namespace algebra {
00063 
00064     
00065     template <typename S, typename U, typename V, typename CharContainer>
00066     bool op_parse (const algebra::FreeMonoidBase<S>& set,
00067                    std::basic_string< std::pair<U, V> >& v,
00068                    const std::string& s,
00069                    typename std::string::const_iterator& i,
00070                    const CharContainer& escaped);
00071   }
00072 } 
00073 
00074 namespace std {
00075 
00080   template <typename U, typename V>
00081   std::ostream& operator<< (std::ostream& o, std::pair<U, V> p);
00082 
00084   template <typename U, typename V, class Traits, class Allocator>
00085   std::ostream&
00086   operator<< (std::ostream& o,
00087               std::basic_string<std::pair<U, V>, Traits, Allocator> s);
00088 
00090   template <typename U, typename V>
00091   std::istream& operator>> (std::istream& i, std::pair<U, V>& p);
00092 
00093 } 
00094 
00095 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00096 #  include <vaucanson/algebra/implementation/letter/couple_letter.hxx>
00097 # endif // VCSN_USE_INTERFACE_ONLY
00098 
00099 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HH