Warning, /include/Geant4/tools/forit is written in an unsupported language. File is not indexed.
0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003
0004 #ifndef tools_forit
0005 #define tools_forit
0006
0007 #define tools_vforcit(a__T,a__v,a__it) \
0008 for(std::vector< a__T >::const_iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
0009
0010 #define tools_vforcit_beg(a__T,a__v,a__beg,a__it) \
0011 for(std::vector< a__T >::const_iterator a__it = a__beg;(a__it)!=(a__v).end();++(a__it))
0012
0013 #define tools_vforit(a__T,a__v,a__it) \
0014 for(std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
0015
0016 #define tools_vforcrit(a__T,a__v,a__it) \
0017 for(std::vector< a__T >::const_reverse_iterator a__it = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
0018
0019 #define tools_vforrit(a__T,a__v,a__it) \
0020 for(std::vector< a__T >::reverse_iterator a__it = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
0021
0022 #define tools_vforcit_npp(a__T,a__v,a__it) \
0023 for(std::vector< a__T >::const_iterator a__it = (a__v).begin();(a__it)!=(a__v).end();)
0024
0025 #define tools_vforit_npp(a__T,a__v,a__it) \
0026 for(std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();)
0027
0028 #define tools_typename_vforcit(a__T,a__v,a__it) \
0029 for(typename std::vector< a__T >::const_iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
0030
0031 #define tools_typename_vforit(a__T,a__v,a__it) \
0032 for(typename std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
0033
0034 #define tools_sforcit(a__s,a__it) \
0035 for(std::string::const_iterator a__it = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
0036
0037 #define tools_sforit(a__s,a__it) \
0038 for(std::string::iterator a__it = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
0039
0040 #define tools_lforcit(a__T,a__l,a__it) \
0041 for(std::list< a__T >::const_iterator a__it = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
0042
0043 #define tools_lforit(a__T,a__l,a__it) \
0044 for(std::list< a__T >::iterator a__it = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
0045
0046 #define tools_lforit_npp(a__T,a__v,a__it) \
0047 for(std::list< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();)
0048
0049 #define tools_mforcit(a__K,a__V,a__m,a__it) \
0050 for(std::map< a__K , a__V >::const_iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
0051
0052 #define tools_mforit(a__K,a__V,a__m,a__it) \
0053 for(std::map< a__K , a__V >::iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
0054
0055 #define tools_typename_mforcit(a__K,a__V,a__m,a__it) \
0056 for(typename std::map< a__K, a__V >::const_iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
0057
0058 #define tools_typename_mforit(a__K,a__V,a__m,a__it) \
0059 for(typename std::map< a__K, a__V >::iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
0060
0061 #endif
0062