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[ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/util/include/G4Pair.hh (Version 11.3.0) and /processes/hadronic/util/include/G4Pair.hh (Version ReleaseNotes)


** Warning: Cannot open xref database.

  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 #ifndef G4Pair_h                                  
 27 #define G4Pair_h                                  
 28                                                   
 29 template <class t1, class t2>                     
 30 class G4Pair                                      
 31 {                                                 
 32   public:                                         
 33   typedef t1 first;                               
 34   typedef t2 rest;                                
 35 };                                                
 36                                                   
 37 class G4Terminator                                
 38 {                                                 
 39 };                                                
 40                                                   
 41 #define GROUP1(t1) G4Pair<t1, G4Terminator >      
 42 #define GROUP2(t1,t2) G4Pair<t1, GROUP1(t2) >     
 43 #define GROUP3(t1,t2,t3) G4Pair<t1, GROUP2(t2,    
 44 #define GROUP4(t1,t2,t3,t4) G4Pair<t1, GROUP3(    
 45 #define GROUP5(t1,t2,t3,t4,t5) G4Pair<t1, GROU    
 46 #define GROUP6(t1,t2,t3,t4,t5,t6) G4Pair<t1, G    
 47 #define GROUP7(t1,t2,t3,t4,t5,t6,t7) G4Pair<t1    
 48 #define GROUP8(t1,t2,t3,t4,t5,t6,t7,t8) G4Pair    
 49 #define GROUP9(t1,t2,t3,t4,t5,t6,t7,t8,t9) G4P    
 50 #define GROUP10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 51 #define GROUP11(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 52 #define GROUP12(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 53 #define GROUP13(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 54 #define GROUP14(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 55 #define GROUP15(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 56 #define GROUP16(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 57 #define GROUP17(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 58 #define GROUP18(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 59 #define GROUP19(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 60 #define GROUP20(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 61 #define GROUP21(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 62 #define GROUP22(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 63 #define GROUP23(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 64 #define GROUP24(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 65 #define GROUP25(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 66 #define GROUP26(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 67 #define GROUP27(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 68 #define GROUP28(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 69 #define GROUP29(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 70 #define GROUP30(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 71 #define GROUP31(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 72 #define GROUP32(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 73 #define GROUP33(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 74 #define GROUP34(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 75 #define GROUP35(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 76 #define GROUP36(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 77 #define GROUP37(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 78 #define GROUP38(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 79 #define GROUP39(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 80 #define GROUP40(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 81 #define GROUP41(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 82 #define GROUP42(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 83 #define GROUP43(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 84 #define GROUP44(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 85 #define GROUP45(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 86 #define GROUP46(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 87 #define GROUP47(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 88 #define GROUP48(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 89 #define GROUP49(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 90 #define GROUP50(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 91 #define GROUP51(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 92 #define GROUP52(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 93 #define GROUP53(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 94 #define GROUP54(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 95 #define GROUP55(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 96 #define GROUP56(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 97 #define GROUP57(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 98 #define GROUP58(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
 99 #define GROUP59(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
100 #define GROUP60(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
101 #define GROUP61(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
102 #define GROUP62(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
103 #define GROUP63(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
104 #define GROUP64(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
105 #define GROUP65(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
106 #define GROUP66(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
107 #define GROUP67(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
108 #define GROUP68(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
109 #define GROUP69(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
110 #define GROUP70(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
111 #define GROUP71(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
112 #define GROUP72(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
113 #define GROUP73(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
114 #define GROUP74(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
115 #define GROUP75(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
116 #define GROUP76(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
117 #define GROUP77(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
118 #define GROUP78(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
119 #define GROUP79(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
120 #define GROUP80(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
121 #define GROUP81(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
122 #define GROUP82(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
123 #define GROUP83(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
124 #define GROUP84(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
125 #define GROUP85(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
126 #define GROUP86(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
127 #define GROUP87(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
128 #define GROUP88(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
129 #define GROUP89(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
130 #define GROUP90(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
131 #define GROUP91(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
132 #define GROUP92(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
133 #define GROUP93(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
134 #define GROUP94(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
135 #define GROUP95(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
136 #define GROUP96(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
137 #define GROUP97(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
138 #define GROUP98(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
139 #define GROUP99(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10    
140                                                   
141                                                   
142 template <class A>                                
143 class VCall                                       
144 {                                                 
145   public:                                         
146   virtual void call(A* aA) = 0;                   
147 };                                                
148                                                   
149 template <class g, class f, class A>              
150 class Call : public VCall<A>                      
151 {                                                 
152   public:                                         
153   virtual void call(A* aA)                        
154   {                                               
155     typename g::first aL;                         
156     f aF;                                         
157     aF(&aL, aA);                                  
158   }                                               
159 };                                                
160                                                   
161                                                   
162 template <class group>                            
163 class G4ForEach                                   
164 {                                                 
165   private:                                        
166   template <class T1> static void ActOn(T1* aT    
167   {                                               
168     aV->call(aT1);                                
169   }                                               
170   public:                                         
171   template <class T1, class functor> static vo    
172   {                                               
173     Call<group, functor, T1> aCall;               
174     aCall.call(aT1);                              
175     typedef typename group::rest tail;            
176     G4ForEach<tail>::Apply(aFP, aT1);             
177   }                                               
178   template <class functor>                        
179   static void Apply()                             
180   {                                               
181     Call<group, functor, int> aCall;              
182     int i=0;                                      
183     aCall.call(i);                                
184     typedef typename group::rest tail;            
185     G4ForEach<tail>::Apply();                     
186   }                                               
187 };                                                
188                                                   
189 template<>                                        
190 class G4ForEach<G4Terminator>                     
191 {                                                 
192   public:                                         
193   template <class T1, class functor> static vo    
194    template <class functor> static void Apply(    
195 };                                                
196                                                   
197 template <class t1, int i2, class t3>             
198 class G4IntGrp                                    
199 {                                                 
200   public:                                         
201   typedef t1 it;                                  
202   enum {i = i2};                                  
203   typedef t3 rest;                                
204 };                                                
205                                                   
206 template<class T1, int I1, int I2, int I3, int    
207 class INT4                                        
208 {                                                 
209   public:                                         
210   typedef T1 it;                                  
211   enum {i1=I1, i2=I2, i3=I3, i4=I4};              
212 };                                                
213                                                   
214 #endif                                            
215                                                   
216