00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #ifdef _MSC_VER
00031 # pragma once
00032 # pragma warning( push )
00033 # pragma warning( disable : 4100 4786 )
00034 #endif // _MSC_VER
00035
00036 #ifndef _EXMAT_EXPTREE_H
00037 #define _EXMAT_EXPTREE_H
00038
00039 #include "Tags.h"
00040 #include "Metaprogramming.h"
00041 #include "loki/Typelist.h"
00042
00043 namespace exmat {
00044
00046
00049 template<class Exp_>
00050 struct LeafeNode {
00051 typedef Exp_ Exp;
00052 typedef NullTag left_child;
00053 typedef NullTag right_child;
00054 typedef Exp node_exp;
00055 typedef ::Loki::NullType tmp_list;
00056 typedef NullTag exp_tag;
00057 enum {
00058 TmpIndex = -1
00059 };
00060
00061 template<class Any>
00062 static void print(Any) {}
00063 template<class Any1, class Any2> EXMAT_INLINE2
00064 static bool IsAliased(Any1& l, const Any2& exp, const bool IsNodePathLinear) {
00065 return (!IsNodePathLinear && (&l == (void*)&exp) );
00066 }
00067 template<class TInst, class TargetCon, class TarConIndex> EXMAT_INLINE2
00068 static const Exp& getNodeObj(const Exp& exp, TInst& tmpInst,
00069 TargetCon& tCon, Int2Type<1+2*0>, TarConIndex)
00070 {
00071 return exp;
00072 }
00073 };
00074
00076
00079 struct ViewNode {
00080 template<class Any1, class Any2> EXMAT_INLINE2
00081 static bool IsAliased(Any1& l, const Any2& exp, const bool IsNodePathLinear) {
00082 return false;
00083 }
00084 };
00085 }
00086
00087 #if _MSC_VER
00088 # pragma warning( pop )
00089 #endif // EXMAT_VC
00090
00091 #endif // _EXMAT_EXPTREE_H