|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 enum TCBaseDummy {ETCBaseDummy}; |
|
17 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
18 class TCMem |
|
19 { |
|
20 public: |
|
21 typedef C CT; |
|
22 TCMem(); |
|
23 TCMem(TCBaseDummy,SR(*)()); |
|
24 TCMem(CT* apOb,MR(CT::*)()); |
|
25 TCMem(P1,SR(*)(P1)); |
|
26 TCMem(CT* apOb,P1,MR(CT::*)(P1)); |
|
27 TCMem(P1,P2,SR(*)(P1,P2)); |
|
28 TCMem(CT* apOb,P1,P2,MR(CT::*)(P1,P2)); |
|
29 TCMem(P1,P2,P3,SR(*)(P1,P2,P3)); |
|
30 TCMem(CT* apOb,P1,P2,P3,MR(CT::*)(P1,P2,P3)); |
|
31 TCMem(P1,P2,P3,P4,SR(*)(P1,P2,P3,P4)); |
|
32 TCMem(CT* apOb,P1,P2,P3,P4,MR(CT::*)(P1,P2,P3,P4)); |
|
33 TCMem(P1,P2,P3,P4,P5,SR(*)(P1,P2,P3,P4,P5)); |
|
34 TCMem(CT* apOb,P1,P2,P3,P4,P5,MR(CT::*)(P1,P2,P3,P4,P5)); |
|
35 TCMem(P1,P2,P3,P4,P5,P6,SR(*)(P1,P2,P3,P4,P5,P6)); |
|
36 TCMem(CT* apOb,P1,P2,P3,P4,P5,P6,MR(CT::*)(P1,P2,P3,P4,P5,P6)); |
|
37 TCMem(P1,P2,P3,P4,P5,P6,P7,SR(*)(P1,P2,P3,P4,P5,P6,P7)); |
|
38 TCMem(CT* apOb,P1,P2,P3,P4,P5,P6,P7,MR(CT::*)(P1,P2,P3,P4,P5,P6,P7)); |
|
39 TCMem(P1,P2,P3,P4,P5,P6,P7,P8,SR(*)(P1,P2,P3,P4,P5,P6,P7,P8)); |
|
40 TCMem(CT* apOb,P1,P2,P3,P4,P5,P6,P7,P8,MR(CT::*)(P1,P2,P3,P4,P5,P6,P7,P8)); |
|
41 private: |
|
42 enum {EDuringDestruction}; |
|
43 void DoTest(TInt (*aF)(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*)); |
|
44 void Panic(TUint aAddress,TUint aNum); |
|
45 static TInt DoStatFun0(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
46 static TInt DoStatFun1(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
47 static TInt DoStatFun2(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
48 static TInt DoStatFun3(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
49 static TInt DoStatFun4(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
50 static TInt DoStatFun5(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
51 static TInt DoStatFun6(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
52 static TInt DoStatFun7(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
53 static TInt DoStatFun8(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
54 static TInt DoMemFun0(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
55 static TInt DoMemFun1(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
56 static TInt DoMemFun2(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
57 static TInt DoMemFun3(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
58 static TInt DoMemFun4(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
59 static TInt DoMemFun5(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
60 static TInt DoMemFun6(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
61 static TInt DoMemFun7(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
62 static TInt DoMemFun8(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*); |
|
63 SR (*iSF0)(); |
|
64 SR (*iSF1)(P1); |
|
65 SR (*iSF2)(P1,P2); |
|
66 SR (*iSF3)(P1,P2,P3); |
|
67 SR (*iSF4)(P1,P2,P3,P4); |
|
68 SR (*iSF5)(P1,P2,P3,P4,P5); |
|
69 SR (*iSF6)(P1,P2,P3,P4,P5,P6); |
|
70 SR (*iSF7)(P1,P2,P3,P4,P5,P6,P7); |
|
71 SR (*iSF8)(P1,P2,P3,P4,P5,P6,P7,P8); |
|
72 MR (CT::*iMF0)(); |
|
73 MR (CT::*iMF1)(P1); |
|
74 MR (CT::*iMF2)(P1,P2); |
|
75 MR (CT::*iMF3)(P1,P2,P3); |
|
76 MR (CT::*iMF4)(P1,P2,P3,P4); |
|
77 MR (CT::*iMF5)(P1,P2,P3,P4,P5); |
|
78 MR (CT::*iMF6)(P1,P2,P3,P4,P5,P6); |
|
79 MR (CT::*iMF7)(P1,P2,P3,P4,P5,P6,P7); |
|
80 MR (CT::*iMF8)(P1,P2,P3,P4,P5,P6,P7,P8); |
|
81 P1 iP1; |
|
82 P2 iP2; |
|
83 P3 iP3; |
|
84 P4 iP4; |
|
85 P5 iP5; |
|
86 P6 iP6; |
|
87 P7 iP7; |
|
88 P8 iP8; |
|
89 SR iStatOb; |
|
90 CT* iOb; |
|
91 TBool iStat; |
|
92 void operator=(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>){;}; |
|
93 }; |
|
94 |
|
95 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
96 void TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoTest(TInt (*aF)(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>*)) |
|
97 { |
|
98 User::Heap().iTestCodeRunning=ETrue; |
|
99 for (TUint ii=1;;++ii) |
|
100 { |
|
101 __UHEAP_MARK; |
|
102 __UHEAP_SETFAIL(RHeap::EDeterministic,ii); |
|
103 TInt ret=(*aF)(this); |
|
104 if (ret!=KErrNone) |
|
105 { |
|
106 __UHEAP_MARKEND; |
|
107 if (User::Heap().iTestNumAllocCells!=0) |
|
108 { |
|
109 if (iStat) |
|
110 delete iStatOb; |
|
111 else |
|
112 delete iOb; |
|
113 Panic(User::Heap().iTestAddress,ii); |
|
114 } |
|
115 } |
|
116 else |
|
117 { |
|
118 if (iStat) |
|
119 delete iStatOb; |
|
120 else |
|
121 delete iOb; |
|
122 __UHEAP_MARKEND; |
|
123 if (User::Heap().iTestNumAllocCells!=0) |
|
124 Panic(User::Heap().iTestAddress,EDuringDestruction); |
|
125 else |
|
126 { |
|
127 User::Heap().iTestCodeRunning=EFalse; |
|
128 __UHEAP_RESET; |
|
129 return; |
|
130 } |
|
131 } |
|
132 __UHEAP_RESET; |
|
133 } |
|
134 User::Heap().iTestCodeRunning=EFalse; |
|
135 } |
|
136 |
|
137 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
138 void TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::Panic(TUint aAddress,TUint aNum) |
|
139 { |
|
140 TBuf<20> info = (aNum==EDuringDestruction) ? _L("DES: ") : _L("CON: "); |
|
141 info.AppendFormat(_L("%x\n"),aAddress); |
|
142 User::Panic(info,aNum); |
|
143 } |
|
144 |
|
145 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
146 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun0(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
147 { |
|
148 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF0))())); |
|
149 return(ret); |
|
150 } |
|
151 |
|
152 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
153 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun1(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
154 { |
|
155 aOb->iStatOb=NULL; |
|
156 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF1))(aOb->iP1))); |
|
157 return(ret); |
|
158 } |
|
159 |
|
160 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
161 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun2(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
162 { |
|
163 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF2))(aOb->iP1,aOb->iP2))); |
|
164 return(ret); |
|
165 } |
|
166 |
|
167 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
168 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun3(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
169 { |
|
170 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF3))(aOb->iP1,aOb->iP2,aOb->iP3))); |
|
171 return(ret); |
|
172 } |
|
173 |
|
174 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
175 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun4(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
176 { |
|
177 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF4))(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4))); |
|
178 return(ret); |
|
179 } |
|
180 |
|
181 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
182 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun5(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
183 { |
|
184 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF5))(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5))); |
|
185 return(ret); |
|
186 } |
|
187 |
|
188 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
189 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun6(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
190 { |
|
191 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF6))(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6))); |
|
192 return(ret); |
|
193 } |
|
194 |
|
195 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
196 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun7(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
197 { |
|
198 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF7))(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7))); |
|
199 return(ret); |
|
200 } |
|
201 |
|
202 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
203 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun8(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
204 { |
|
205 TRAPD(ret,aOb->iStatOb=((*(aOb->iSF8))(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7,aOb->iP8))); |
|
206 return(ret); |
|
207 } |
|
208 |
|
209 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
210 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun0(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
211 { |
|
212 TRAPD(ret,(aOb->iOb->*aOb->iMF0)()); |
|
213 return(ret); |
|
214 } |
|
215 |
|
216 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
217 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun1(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
218 { |
|
219 TRAPD(ret,(aOb->iOb->*aOb->iMF1)(aOb->iP1)); |
|
220 return(ret); |
|
221 } |
|
222 |
|
223 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
224 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun2(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
225 { |
|
226 TRAPD(ret,(aOb->iOb->*aOb->iMF2)(aOb->iP1,aOb->iP2)); |
|
227 return(ret); |
|
228 } |
|
229 |
|
230 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
231 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun3(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
232 { |
|
233 TRAPD(ret,(aOb->iOb->*aOb->iMF3)(aOb->iP1,aOb->iP2,aOb->iP3)); |
|
234 return(ret); |
|
235 } |
|
236 |
|
237 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
238 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun4(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
239 { |
|
240 TRAPD(ret,(aOb->iOb->*aOb->iMF4)(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4)); |
|
241 return(ret); |
|
242 } |
|
243 |
|
244 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
245 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun5(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
246 { |
|
247 TRAPD(ret,(aOb->iOb->*aOb->iMF5)(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5)); |
|
248 return(ret); |
|
249 } |
|
250 |
|
251 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
252 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun6(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
253 { |
|
254 TRAPD(ret,(aOb->iOb->*aOb->iMF6)(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6)); |
|
255 return(ret); |
|
256 } |
|
257 |
|
258 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
259 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun7(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
260 { |
|
261 TRAPD(ret,(aOb->iOb->*aOb->iMF7)(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7)); |
|
262 return(ret); |
|
263 } |
|
264 |
|
265 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
266 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun8(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
267 { |
|
268 TRAPD(ret,(aOb->iOb->*aOb->iMF8)(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7,aOb->iP8)); |
|
269 return(ret); |
|
270 } |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 /*template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
276 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon0(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
277 { |
|
278 TRAPD(ret,aOb->iOb=new(ELeave)C()); |
|
279 return(ret); |
|
280 } |
|
281 |
|
282 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
283 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon1(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
284 { |
|
285 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1)); |
|
286 return(ret); |
|
287 } |
|
288 |
|
289 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
290 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon2(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
291 { |
|
292 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2)); |
|
293 return(ret); |
|
294 } |
|
295 |
|
296 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
297 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon3(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
298 { |
|
299 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3)); |
|
300 return(ret); |
|
301 } |
|
302 |
|
303 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
304 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon4(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
305 { |
|
306 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4)); |
|
307 return(ret); |
|
308 } |
|
309 |
|
310 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
311 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon5(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
312 { |
|
313 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5)); |
|
314 return(ret); |
|
315 } |
|
316 |
|
317 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
318 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon6(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
319 { |
|
320 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6)); |
|
321 return(ret); |
|
322 } |
|
323 |
|
324 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
325 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon7(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
326 { |
|
327 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7)); |
|
328 return(ret); |
|
329 } |
|
330 |
|
331 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
332 TInt TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoCon8(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>* aOb) |
|
333 { |
|
334 TRAPD(ret,aOb->iOb=new(ELeave)C(aOb->iP1,aOb->iP2,aOb->iP3,aOb->iP4,aOb->iP5,aOb->iP6,aOb->iP7,aOb->iP8)); |
|
335 return(ret); |
|
336 } |
|
337 */ |
|
338 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
339 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,MR(CT::*aF)()) |
|
340 : iMF0(aF),iOb(apOb),iStat(EFalse) |
|
341 { |
|
342 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun0)); |
|
343 } |
|
344 |
|
345 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
346 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,MR(CT::*aF)(P1)) |
|
347 : iP1(aP1),iMF1(aF),iOb(apOb),iStat(EFalse) |
|
348 { |
|
349 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun1)); |
|
350 } |
|
351 |
|
352 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
353 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,MR(CT::*aF)(P1,P2)) |
|
354 : iP1(aP1),iP2(aP2),iMF2(aF),iOb(apOb),iCon(EFalse) |
|
355 { |
|
356 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun2)); |
|
357 } |
|
358 |
|
359 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
360 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,MR(CT::*aF)(P1,P2,P3)) |
|
361 : iP1(aP1),iP2(aP2),iP3(aP3),iMF3(aF),iOb(apOb),iStat(EFalse) |
|
362 { |
|
363 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun3)); |
|
364 } |
|
365 |
|
366 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
367 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,P4 aP4,MR(CT::*aF)(P1,P2,P3,P4)) |
|
368 : iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iMF4(aF),iOb(apOb),iStat(EFalse) |
|
369 { |
|
370 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun4)); |
|
371 } |
|
372 |
|
373 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
374 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,MR(CT::*aF)(P1,P2,P3,P4,P5)) |
|
375 : iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iMF5(aF),iOb(apOb),iStat(EFalse) |
|
376 { |
|
377 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun5)); |
|
378 } |
|
379 |
|
380 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
381 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,MR(CT::*aF)(P1,P2,P3,P4,P5,P6)) |
|
382 : iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iMF6(aF),iOb(apOb),iStat(EFalse) |
|
383 { |
|
384 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun6)); |
|
385 } |
|
386 |
|
387 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
388 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,P7 aP7,MR(CT::*aF)(P1,P2,P3,P4,P5,P6,P7)) |
|
389 : iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iP7(aP7),iMF7(aF),iOb(apOb),iStat(EFalse) |
|
390 { |
|
391 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun7)); |
|
392 } |
|
393 |
|
394 #pragma warning ( disable : 4786 ) //identifier was truncated to '255' characters in the debug information |
|
395 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
396 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(CT* apOb,P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,P7 aP7,P8 aP8,MR(CT::*aF)(P1,P2,P3,P4,P5,P6,P7,P8)) |
|
397 : iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iP7(aP7),iP8(aP8),iMF8(aF),iOb(apOb),iStat(EFalse) |
|
398 { |
|
399 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoMemFun8)); |
|
400 } |
|
401 #pragma warning ( default : 4786 ) |
|
402 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
403 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(TCBaseDummy,SR(*aF)()) |
|
404 :iSF0(aF),iStat(ETrue) |
|
405 { |
|
406 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun0)); |
|
407 } |
|
408 |
|
409 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
410 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,SR(*aF)(P1)) |
|
411 :iP1(aP1),iSF1(aF),iStat(ETrue) |
|
412 { |
|
413 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun1)); |
|
414 } |
|
415 |
|
416 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
417 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,SR(*aF)(P1,P2)) |
|
418 :iP1(aP1),iP2(aP2),iSF2(aF),iStat(ETrue) |
|
419 { |
|
420 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun2)); |
|
421 } |
|
422 |
|
423 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
424 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,SR(*aF)(P1,P2,P3)) |
|
425 :iP1(aP1),iP2(aP2),iP3(aP3),iSF3(aF),iStat(ETrue) |
|
426 { |
|
427 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun3)); |
|
428 } |
|
429 |
|
430 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
431 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,P4 aP4,SR(*aF)(P1,P2,P3,P4)) |
|
432 :iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iSF4(aF),iStat(ETrue) |
|
433 { |
|
434 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun4)); |
|
435 } |
|
436 |
|
437 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
438 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,SR(*aF)(P1,P2,P3,P4,P5)) |
|
439 :iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iSF5(aF),iStat(ETrue) |
|
440 { |
|
441 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun5)); |
|
442 } |
|
443 |
|
444 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
445 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,SR(*aF)(P1,P2,P3,P4,P5,P6)) |
|
446 :iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iSF6(aF),iStat(ETrue) |
|
447 { |
|
448 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun6)); |
|
449 } |
|
450 |
|
451 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
452 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,P7 aP7,SR(*aF)(P1,P2,P3,P4,P5,P6,P7)) |
|
453 :iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iP7(aP7),iSF7(aF),iStat(ETrue) |
|
454 { |
|
455 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun7)); |
|
456 } |
|
457 |
|
458 template<class C,class SR,class MR,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> |
|
459 TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::TCMem(P1 aP1,P2 aP2,P3 aP3,P4 aP4,P5 aP5,P6 aP6,P7 aP7, P8 aP8,SR(*aF)(P1,P2,P3,P4,P5,P6,P7,P8)) |
|
460 :iP1(aP1),iP2(aP2),iP3(aP3),iP4(aP4),iP5(aP5),iP6(aP6),iP7(aP7),iP8(aP8),iSF8(aF),iStat(ETrue) |
|
461 { |
|
462 DoTest(&(TCMem<C,SR,MR,P1,P2,P3,P4,P5,P6,P7,P8>::DoStatFun8)); |
|
463 } |
|
464 |
|
465 |
|
466 |
|
467 // CT = class type, PT = parameter type, P = parameter, F = function, SRT = static return type |
|
468 // pCT pointer to a class of type CT, MRT = member return type |
|
469 |
|
470 #define T_STATIC0(CT,SRT,F) {TCMem<CT,SRT,TAny*,TInt,TInt,TInt,TInt,TInt,TInt,TInt,TInt> temp(ETCBaseDummy,F);}; |
|
471 #define T_STATIC1(CT,SRT,F,PT1,P1) {TCMem<CT,SRT,TAny*,PT1,TInt,TInt,TInt,TInt,TInt,TInt,TInt> temp(P1,F);}; |
|
472 #define T_STATIC2(CT,SRT,F,PT1,P1,PT2,P2) {TCMem<CT,SRT,TAny*,PT1,PT2,TInt,TInt,TInt,TInt,TInt,TInt> temp(P1,P2,F);}; |
|
473 #define T_STATIC3(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,TInt,TInt,TInt,TInt,TInt> temp(P1,P2,P3,F);}; |
|
474 #define T_STATIC4(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,PT4,TInt,TInt,TInt,TInt> temp(P1,P2,P3,P4,F);}; |
|
475 #define T_STATIC5(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,PT4,PT5,TInt,TInt,TInt> temp(P1,P2,P3,P4,P5,F);}; |
|
476 #define T_STATIC6(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,PT4,PT5,PT6,TInt,TInt> temp(P1,P2,P3,P4,P5,P6,F);}; |
|
477 #define T_STATIC7(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6,PT7,P7) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,PT4,PT5,PT6,PT7,TInt> temp(P1,P2,P3,P4,P5,P6,P7,F); }; |
|
478 #define T_STATIC8(CT,SRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6,PT7,P7,PT8,P8) {TCMem<CT,SRT,TAny*,PT1,PT2,PT3,PT4,PT5,PT6,PT7,PT8> temp(P1,P2,P3,P4,P5,P6,P7,P8,F);}; |
|
479 |
|
480 #define T_MEMBER0(CT,pCT,MRT,F) {TCMem<CT,CT*,MRT,TInt,TInt,TInt,TInt,TInt,TInt,TInt,TInt> temp(pCT,F);}; |
|
481 #define T_MEMBER1(CT,pCT,MRT,F,PT1,P1) {TCMem<CT,CT*,MRT,PT1,TInt,TInt,TInt,TInt,TInt,TInt,TInt> temp(pCT,P1,F);}; |
|
482 #define T_MEMBER2(CT,pCT,MRT,F,PT1,P1,PT2,P2) {TCMem<CT,CT*,MRT,PT1,PT2,TInt,TInt,TInt,TInt,TInt,TInt> temp(pCT,P1,P2,F);}; |
|
483 #define T_MEMBER3(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,TInt,TInt,TInt,TInt,TInt> temp(pCT,P1,P2,P3,F);}; |
|
484 #define T_MEMBER4(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,PT4,TInt,TInt,TInt,TInt> temp(pCT,P1,P2,P3,P4,F);}; |
|
485 #define T_MEMBER5(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,PT4,PT5,TInt,TInt,TInt> temp(pCT,P1,P2,P3,P4,P5,F);}; |
|
486 #define T_MEMBER6(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,PT4,PT5,PT6,TInt,TInt> temp(pCT,P1,P2,P3,P4,P5,P6,F);}; |
|
487 #define T_MEMBER7(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6,PT7,P7) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,PT4,PT5,PT6,PT7,TInt> temp(pCT,P1,P2,P3,P4,P5,P6,P7,F); }; |
|
488 #define T_MEMBER8(CT,pCT,MRT,F,PT1,P1,PT2,P2,PT3,P3,PT4,P4,PT5,P5,PT6,P6,PT7,P7,PT8,P8) {TCMem<CT,CT*,MRT,PT1,PT2,PT3,PT4,PT5,PT6,PT7,PT8> temp(pCT,P1,P2,P3,P4,P5,P6,P7,P8,F);}; |
|
489 |