00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef VCSN_AUTOMATA_CONCEPT_HANDLERS_HH
00018 # define VCSN_AUTOMATA_CONCEPT_HANDLERS_HH
00019 
00020 # include <iostream>
00021 
00022 namespace vcsn {
00023 
00024   struct state_h
00025   {};
00026 
00027   struct transition_h
00028   {};
00029 
00030   template<typename Tag>
00031   class handler
00032   {
00033     public:
00034       typedef Tag kind;
00035 
00036       handler();
00037 
00038       handler(int h);
00039 
00040       handler(const handler& h);
00041 
00042       handler& operator=(const handler& h);
00043 
00044       handler& operator=(int h);
00045 
00046       int value() const;
00047 
00048       operator int () const;
00049 
00050     protected:
00051       int v_;
00052   };
00053 
00054   typedef handler<state_h> hstate_t;
00055   typedef handler<transition_h> htransition_t;
00056 
00057   template<typename kind>
00058   bool operator==(const handler<kind>& h1,
00059                   const handler<kind>& h2);
00060 
00061   template<typename kind>
00062   bool operator!=(const handler<kind>& h1,
00063                   const handler<kind>& h2);
00064 
00065   template<typename kind>
00066   bool operator<(const handler<kind>& h1,
00067                  const handler<kind>& h2);
00068 
00069   template<typename kind>
00070   bool operator>(const handler<kind>& h1,
00071                  const handler<kind>& h2);
00072 
00073   template<typename kind>
00074   bool operator<=(const handler<kind>& h1,
00075                   const handler<kind>& h2);
00076 
00077   template<typename kind>
00078   bool operator>=(const handler<kind>& h1,
00079                   const handler<kind>& h2);
00080 
00081 } 
00082 
00083 namespace std {
00084 
00085   template <typename kind>
00086   std::ostream&
00087   operator<<(std::ostream& out, const vcsn::handler<kind>& h);
00088 
00089 } 
00090 
00091 
00092 #ifndef VCSN_USE_INTERFACE_ONLY
00093 # include <vaucanson/automata/concept/handlers.hxx>
00094 #endif // VCSN_USE_INTERFACE_ONLY
00095 
00096 
00097 #endif // ! VCSN_AUTOMATA_CONCEPT_HANDLERS_HH