00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KEOS_GENHIERARCHIES_H
00023 #define KEOS_GENHIERARCHIES_H
00024
00025 #include "KeosTypelist.h"
00026
00027 namespace Keos
00028 {
00029
00033 template <class TList, template <class> class Handler > class CScatteredHierarchy;
00034
00035 template
00036 <
00037 class T1,
00038 class T2,
00039 template <class> class Handler
00040 >
00041 class CScatteredHierarchy<TypeList<T1, T2>, Handler > : public Handler<T1>, public CScatteredHierarchy<T2, Handler>
00042 {};
00043
00044 template
00045 <
00046 class T,
00047 template <class> class Handler
00048 >
00049 class CScatteredHierarchy<TypeList<T, NullType>, Handler > : public Handler<T>
00050 {};
00051
00052 template
00053 <
00054 template <class> class Handler
00055 >
00056 class CScatteredHierarchy<NullType, Handler>
00057 {};
00058
00059
00060
00064 template <class TList, template <class, class> class Handler, class Root = NullType > class CLinearHierarchy;
00065
00066 template
00067 <
00068 class T1,
00069 class T2,
00070 template <class, class> class Handler,
00071 class Root
00072 >
00073 class CLinearHierarchy<TypeList<T1, T2>, Handler, Root > : public Handler<T1, CLinearHierarchy<T2, Handler, Root> >
00074 {};
00075
00076 template
00077 <
00078 class T,
00079 template <class, class> class Handler,
00080 class Root
00081 >
00082 class CLinearHierarchy<TypeList<T, NullType>, Handler, Root > : public Handler<T, Root>
00083 {};
00084
00085 }
00086
00087
00088 #endif // KEOS_GENHIERARCHIES_H