Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

features.hpp

Go to the documentation of this file.
00001 // features.hpp
00002 //   algorithmic and implementation features.
00003 
00004 
00005 
00006 // some global implementation features:
00007 #ifndef USE_LOCAL_ARRAYS
00008 #define USE_LOCAL_ARRAYS false
00009 #endif
00010 
00011 #if USE_LOCAL_ARRAYS
00012 // requirements for local arrays:
00013 //  - there is no other variables by the name {x}values
00014 //  - x has a method int* values() that returns the values.
00015 //  - x has operator[] to access its elements.
00016 //  - x has a method setElement(int pos, int value) to set an element.
00017 #define LOCAL_ARRAY_NAME(x) x ## values
00018 #define LOCAL_INT_ARRAY(x) int* const LOCAL_ARRAY_NAME(x) = x .values();
00019 #define CONST_LOCAL_INT_ARRAY(x) int const * const LOCAL_ARRAY_NAME(x) = x .values();
00020 #define GET(x,index) LOCAL_ARRAY_NAME(x) [index]
00021 #define SET(x,index,value) LOCAL_ARRAY_NAME(x) [index] = value;
00022 
00023 #else // ! USE_LOCAL_ARRAYS
00024 #define LOCAL_ARRAY_NAME(x) x
00025 #define LOCAL_INT_ARRAY(x)
00026 #define CONST_LOCAL_INT_ARRAY(x)
00027 #define GET(x,index) x [index]
00028 #define SET(x,index,value) x .setElement(index, value)
00029 #endif
00030 
00031  

Generated on Sun Sep 17 17:50:38 2006 for FIM environment by  doxygen 1.4.4