IndexList.hpp

00001 /*------------------------------------------------------------------------*/
00002 /*                 Copyright 2010 Sandia Corporation.                     */
00003 /*  Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive   */
00004 /*  license for use of this work by or on behalf of the U.S. Government.  */
00005 /*  Export of this program may require a license from the                 */
00006 /*  United States Government.                                             */
00007 /*------------------------------------------------------------------------*/
00008 
00009 
00010 #ifndef stk_util_util_IndexList_h
00011 #define stk_util_util_IndexList_h
00012 
00013 namespace stk {
00014 
00018 template< unsigned  I0 = 0 , unsigned  I1 = 0 ,
00019           unsigned  I2 = 0 , unsigned  I3 = 0 ,
00020           unsigned  I4 = 0 , unsigned  I5 = 0 ,
00021           unsigned  I6 = 0 , unsigned  I7 = 0 ,
00022           unsigned  I8 = 0 , unsigned  I9 = 0 ,
00023           unsigned I10 = 0 , unsigned I11 = 0 ,
00024           unsigned I12 = 0 , unsigned I13 = 0 ,
00025           unsigned I14 = 0 , unsigned I15 = 0 ,
00026           unsigned I16 = 0 , unsigned I17 = 0 ,
00027           unsigned I18 = 0 , unsigned I19 = 0 ,
00028           unsigned I20 = 0 , unsigned I21 = 0 ,
00029           unsigned I22 = 0 , unsigned I23 = 0 ,
00030           unsigned I24 = 0 , unsigned I25 = 0 ,
00031           unsigned I26 = 0 , unsigned I27 = 0 ,
00032           unsigned I28 = 0 , unsigned I29 = 0 ,
00033           unsigned I30 = 0 , unsigned I31 = 0 >
00034 struct IndexList {};
00035 
00040 template< class List , unsigned J > struct IndexListAt {};
00041 
00042 #define INDEX_LIST_AT_SPECIALIZATION( J , K ) \
00043   template< unsigned  I0 , unsigned  I1 , \
00044             unsigned  I2 , unsigned  I3 , \
00045             unsigned  I4 , unsigned  I5 , \
00046             unsigned  I6 , unsigned  I7 , \
00047             unsigned  I8 , unsigned  I9 , \
00048             unsigned I10 , unsigned I11 , \
00049             unsigned I12 , unsigned I13 , \
00050             unsigned I14 , unsigned I15 , \
00051             unsigned I16 , unsigned I17 , \
00052             unsigned I18 , unsigned I19 , \
00053             unsigned I20 , unsigned I21 , \
00054             unsigned I22 , unsigned I23 , \
00055             unsigned I24 , unsigned I25 , \
00056             unsigned I26 , unsigned I27 , \
00057             unsigned I28 , unsigned I29 , \
00058             unsigned I30 , unsigned I31 > \
00059 struct IndexListAt< \
00060   IndexList< I0 ,  I1 ,  I2 ,  I3 ,  I4 ,  I5 ,  I6 ,  I7 , \
00061              I8 ,  I9 , I10 , I11 , I12 , I13 , I14 , I15 , \
00062             I16 , I17 , I18 , I19 , I20 , I21 , I22 , I23 , \
00063             I24 , I25 , I26 , I27 , I28 , I29 , I30 , I31 > , J > \
00064 { enum { value = K }; };
00065 
00066 INDEX_LIST_AT_SPECIALIZATION(  0 ,  I0 )
00067 INDEX_LIST_AT_SPECIALIZATION(  1 ,  I1 )
00068 INDEX_LIST_AT_SPECIALIZATION(  2 ,  I2 )
00069 INDEX_LIST_AT_SPECIALIZATION(  3 ,  I3 )
00070 INDEX_LIST_AT_SPECIALIZATION(  4 ,  I4 )
00071 INDEX_LIST_AT_SPECIALIZATION(  5 ,  I5 )
00072 INDEX_LIST_AT_SPECIALIZATION(  6 ,  I6 )
00073 INDEX_LIST_AT_SPECIALIZATION(  7 ,  I7 )
00074 INDEX_LIST_AT_SPECIALIZATION(  8 ,  I8 )
00075 INDEX_LIST_AT_SPECIALIZATION(  9 ,  I9 )
00076 INDEX_LIST_AT_SPECIALIZATION( 10 , I10 )
00077 INDEX_LIST_AT_SPECIALIZATION( 11 , I11 )
00078 INDEX_LIST_AT_SPECIALIZATION( 12 , I12 )
00079 INDEX_LIST_AT_SPECIALIZATION( 13 , I13 )
00080 INDEX_LIST_AT_SPECIALIZATION( 14 , I14 )
00081 INDEX_LIST_AT_SPECIALIZATION( 15 , I15 )
00082 INDEX_LIST_AT_SPECIALIZATION( 16 , I16 )
00083 INDEX_LIST_AT_SPECIALIZATION( 17 , I17 )
00084 INDEX_LIST_AT_SPECIALIZATION( 18 , I18 )
00085 INDEX_LIST_AT_SPECIALIZATION( 19 , I19 )
00086 INDEX_LIST_AT_SPECIALIZATION( 20 , I20 )
00087 INDEX_LIST_AT_SPECIALIZATION( 21 , I21 )
00088 INDEX_LIST_AT_SPECIALIZATION( 22 , I22 )
00089 INDEX_LIST_AT_SPECIALIZATION( 23 , I23 )
00090 INDEX_LIST_AT_SPECIALIZATION( 24 , I24 )
00091 INDEX_LIST_AT_SPECIALIZATION( 25 , I25 )
00092 INDEX_LIST_AT_SPECIALIZATION( 26 , I26 )
00093 INDEX_LIST_AT_SPECIALIZATION( 27 , I27 )
00094 INDEX_LIST_AT_SPECIALIZATION( 28 , I28 )
00095 INDEX_LIST_AT_SPECIALIZATION( 29 , I29 )
00096 INDEX_LIST_AT_SPECIALIZATION( 30 , I30 )
00097 INDEX_LIST_AT_SPECIALIZATION( 31 , I31 )
00098 
00099 #undef INDEX_LIST_AT_SPECIALIZATION
00100 
00101 } // namespace stk
00102 
00103 #endif // stk_util_util_IndexList_h
00104 

Generated on Tue Jul 13 09:27:32 2010 for Sierra Toolkit by  doxygen 1.4.7