00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HH
00019
00020 # include <cstddef>
00021
00022 # include <vaucanson/algebra/implementation/series/rat/nodes.hh>
00023
00024 namespace vcsn {
00025
00026 namespace rat {
00027
00028 template<typename M_, typename W_>
00029 class DepthVisitor : public ConstNodeVisitor<M_, W_>
00030 {
00031 protected:
00032 void
00033 sum_or_product(const Node<M_, W_>* left_, const Node<M_, W_>* right_);
00034 void
00035 weight_or_star(const Node<M_, W_>* node);
00036
00037 public:
00038 virtual void
00039 product(const Node<M_, W_>* left_, const Node<M_, W_>* right_);
00040
00041 virtual void
00042 sum(const Node<M_, W_>* left_, const Node<M_, W_>* right_);
00043
00044 virtual void
00045 star(const Node<M_, W_>* node);
00046
00047 virtual void
00048 left_weight(const W_&, const Node<M_, W_>* node);
00049
00050 virtual void
00051 right_weight(const W_&, const Node<M_, W_>* node);
00052
00053 virtual void
00054 constant(const M_& m);
00055
00056 virtual void zero();
00057
00058 virtual void one();
00059
00060 size_t get() const;
00061
00062 protected:
00063 size_t d;
00064 };
00065
00066 }
00067
00068 }
00069
00070 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00071 # include <vaucanson/algebra/implementation/series/rat/depth_visitor.hxx>
00072 # endif // VCSN_USE_INTERFACE_ONLY
00073
00074 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_SERIES_RAT_DEPTH_VISITOR_HH