00001
00002
00013
00014
00015 #ifndef polybori_iterators_CGenericIter_h_
00016 #define polybori_iterators_CGenericIter_h_
00017
00018
00019 #include <polybori/pbori_defs.h>
00020 #include <polybori/routines/pbori_algo.h>
00021
00022
00023 #include "CStackSelector.h"
00024 #include "CTermIter.h"
00025 #include "CTermGenerator.h"
00026
00027 BEGIN_NAMESPACE_PBORI
00028
00029 template <class OrderType, class NaviType, class RefType>
00030 struct pbori_base<CGenericIter<OrderType, NaviType, RefType> > {
00031
00032 typedef typename CStackSelector<OrderType, NaviType>::type stack_type;
00033
00034 typedef CTermIter<stack_type, CTermGenerator<RefType> > type;
00035 };
00036
00037
00038 template <class OrderType, class NaviType, class RefType>
00039 class CGenericIter:
00040 public pbori_base<CGenericIter<OrderType, NaviType, RefType> >::type {
00041
00042 public:
00043 typedef typename pbori_base<CGenericIter>::type base;
00044 typedef typename base::term_generator term_generator;
00045
00046 template <class MgrType>
00047 CGenericIter(NaviType navi, const MgrType& mgr): base(navi, mgr) {}
00048
00049 };
00050
00051 #if 0
00052 template <class OrderType, class NaviType>
00053 class CGenericIter<OrderType, NaviType, BooleMonomial>:
00054 public pbori_base<CGenericIter<OrderType, NaviType, BooleMonomial> >::type {
00055
00056 public:
00057 typedef typename pbori_base<CGenericIter>::type base;
00058 typedef typename base::term_generator term_generator;
00059
00060 template <class MgrType>
00061 CGenericIter(NaviType navi, const MgrType& mgr): base(navi, mgr) {}
00062
00063
00064 };
00065 #endif
00066
00068 template <class OrderType, class NaviType, class RefType>
00069 struct pbori_base<CReverseIter<OrderType, NaviType, RefType> > {
00070
00071 typedef CReverseTermStack<NaviType, std::bidirectional_iterator_tag> stack_type;
00072
00073 typedef CTermIter<stack_type, CTermGenerator<RefType> > type;
00074 };
00075
00076
00077 template <class OrderType, class NaviType, class RefType>
00078 class CReverseIter:
00079 public pbori_base<CReverseIter<OrderType, NaviType, RefType> >::type {
00080
00081 public:
00082 typedef typename pbori_base<CReverseIter>::type base;
00083 typedef typename base::term_generator term_generator;
00084
00085 template <class MgrType>
00086 CReverseIter(NaviType navi, const MgrType& mgr): base(navi, mgr) {}
00087
00088
00089 };
00090
00091
00092
00093 END_NAMESPACE_PBORI
00094
00095 #endif