OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
automacr.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4/// \file
5/// Automation Symbol Table, Command, and Proxy Macro Definitions
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_AUTOMACR_H)
9#define OCF_AUTOMACR_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16#include <ocf/autodefs.h>
17
18//
19// Suppress "Functions taking class-by-value arg(s) are not expanded inline"
20//
21#if defined(BI_COMP_BORLANDC)
22# pragma warn .inl
23#endif
24
25
26namespace ocf {
27
28//----------------------------------------------------------------------------
29//
30// Macros for defining symbol tables
31//
32//----------------------------------------------------------------------------
33//
34// DEFINE_AUTOCLASS(C++ClassName)
35//
36// EXPOSE_METHOD(IntName, ReturnTypeName, ExtName, DocString, HelpContext)
37// EXPOSE_PROPRW(IntName, PropTypeName, ExtName, DocString, HelpContext)
38// EXPOSE_PROPRO(IntName, PropTypeName, ExtName, DocString, HelpContext)
39// EXPOSE_PROPWO(IntName, PropTypeName, ExtName, DocString, HelpContext)
40// EXPOSE_APPLICATION( AppTypeName, ExtName, DocString, HelpContext)
41// EXPOSE_QUIT( ExtName, DocString, HelpContext)
42//
43// REQUIRED_ARG(TypeName, ExtArgName)
44// OPTIONAL_ARG(TypeName, ExtArgName, DefaultValueString)
45//
46// EXPOSE_INHERIT(C++ClassName, ExtClassName)
47// EXPOSE_DELEGATE(C++ClassName, ExtClassName, AddressAdjusterFunction)
48//
49// EXPOSE_FACTORY(C++ClassName, ExtClassName, C++BaseClass)
50//
51// END_AUTOCLASS(C++ClassName , Typeflags, ExtName, DocString, HelpContext)
52//
53// For automated classes which are, inherit from, or delegate to COM objects:
54// Specify the aggregator function for a pre-existing object of the aggreate.
55//
56// DEFINE_AUTOAGGREGATE(C++ClassName, AggregatorFunction)
57// END_AUTOAGGREGATE(C++ClassName, ExtClassName, DocString, HelpContext)
58//
59//----------------------------------------------------------------------------
60
61#define DEFINE_AUTOCLASS(cls) \
62 TAutoSymbol cls::SymbolTable[] = {
63
64#define END_AUTOCLASS(cls, flags, name, doc, help) {{name},{doc}, 0, \
65 flags,0,TAutoSymbol::InitAutoDestructor(cls::TCommand_dtr::Build),help} }; \
66 TAutoClass cls::ClassInfo(cls::SymbolTable, cls::SymbolTable + \
67 (sizeof(cls::SymbolTable)/sizeof(TAutoSymbol) - 1), typeid(cls), 0);
68
69#define DEFINE_AUTOAGGREGATE(cls, aggregator) \
70 IUnknown& cls::Aggregator(ObjectPtr inst, TUnknown& inner) \
71 { return ((cls*)inst)->aggregator(inner); } \
72 DEFINE_AUTOCLASS(cls)
73
74#define END_AUTOAGGREGATE(cls, flags, name, doc, help) {{name},{doc}, 0, \
75 flags,0,TAutoSymbol::InitAutoDestructor(cls::TCommand_dtr::Build),help} }; \
76 TAutoClass cls::ClassInfo(cls::SymbolTable, cls::SymbolTable + \
77 (sizeof(cls::SymbolTable)/sizeof(TAutoSymbol)-1),typeid(cls),cls::Aggregator);
78
80 struct TCommand_ {
81 static TAutoCommand* Build(ObjectPtr,int,TAutoStack&) {return 0;}
82 };
83};
84
85#define DEFINE_AUTOEVENTCLASS(cls) \
86 class cls {static TAutoClass ClassInfo; static TAutoSymbol SymbolTable[]; \
87 typedef TAutoEventDummy ThisClass; };\
88 TAutoSymbol cls::SymbolTable[] = {
89
90#define END_AUTOEVENTCLASS(cls, flags, name, doc, help) {{name},{doc}, 0, \
91 flags|tfEventSource, 0, 0,help} }; \
92 TAutoClass cls::ClassInfo(cls::SymbolTable, cls::SymbolTable + \
93 (sizeof(cls::SymbolTable)/sizeof(TAutoSymbol) - 1), typeid(cls), 0);
94
95#define DEFINE_AUTODISPATCH(cls) DEFINE_AUTOCLASS(cls)
96#define END_AUTODISPATCH(cls) END_AUTOCLASS(cls, 0, 0, 0)
97
98#define EXPOSE_METHOD(cmd, cls, name, doc, help) {{name},{doc},\
99 asMethod, -1, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
100
101#define EXPOSE_METHOD_ID(id, cmd, cls, name, doc, help) {{name}, {doc},\
102 asMethod, id, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
103
104#define EXPOSE_PROPRW(cmd, cls, name, doc, help) {{name},{doc},\
105 asGetSet, -1, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
106
107#define EXPOSE_PROPRW_ID(id, cmd, cls, name, doc, help) {{name},{doc},\
108 asGetSet, id, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
109
110#define EXPOSE_PROPRO(cmd, cls, name, doc, help) {{name},{doc},\
111 asGet, -1, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
112
113#define EXPOSE_PROPRO_ID(id, cmd, cls, name, doc, help) {{name},{doc},\
114 asGet, id, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
115
116#define EXPOSE_PROPWO(cmd, cls, name, doc, help) {{name},{doc},\
117 asSet, -1, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
118
119#define EXPOSE_PROPWO_ID(id, cmd, cls, name, doc, help) {{name},{doc},\
120 asSet, id, &cls::ClassInfo, ThisClass::TCommand_##cmd::Build, help},
121
122#define EXPOSE_APPLICATION(cls, name, doc, help) {{name},{doc},\
123 asGet, -1, &cls::ClassInfo, ThisClass::TCommand_app::Build, help},
124
125#define EXPOSE_QUIT(name, doc, help) {{name},{doc},\
126 asMethod, -1, &TAutoVoid::ClassInfo, AutoQuitBuild, help},
127
128#define REQUIRED_ARG(cls, name) {{name}, {0}, \
129 asArgument, 0, &cls::ClassInfo, 0, 0},
130
131#define OPTIONAL_ARG(cls, name, dflt) {{name}, {dflt}, \
132 asArgument, 0, &cls::ClassInfo, 0, 0},
133
134#define EXPOSE_DELEGATE(cls, name, locator) {{name}, {0}, \
135 asClass, 0, &cls::ClassInfo, TAutoSymbol::InitTypeConvert(locator), 0},
136
137#define EXPOSE_INHERIT(cls, name) {{name}, {0}, asClass, 0, &cls::ClassInfo, \
138 TAutoSymbol::InitTypeConvert(TTypeConvert<cls,ThisClass>::Cast), 0},
139
140#define EXPOSE_FACTORY(cls, name, base) {{name}, {0}, asFactory, 0, \
141 &cls::ClassInfo, TAutoSymbol::InitTypeConvert(TTypeConvert<cls,base>::Cast), 0},
142
143#define EXPOSE_ITERATOR(cls, doc, help) {{_T("_NewEnum")},{doc}, asIterator, \
144 -4, &cls::ClassInfo, TAutoSymbol::InitAutoIterator(ThisClass::TIterator::Build), help},
145
146//
147// Macros to define enumeration lists
148//
149// DEFINE_AUTOENUM(EnumName, TAuto????)
150// AUTOENUM(EnumString1, constval1)
151// AUTOENUM(EnumString2, constval2)
152// AUTOENUM(EnumString3, constval3)
153// END_AUTOENUM(EnumName, TAuto????)
154//
155
156#define DEFINE_AUTOENUM(cls, type) \
157 TAutoEnumVal<type##Enum> cls##_Table[] = {
158
159#define AUTOENUM(name, val) {{name}, val},
160
161#define END_AUTOENUM(cls, type) }; \
162 struct cls { static TAutoEnumT<type##Enum> ClassInfo; }; \
163 TAutoEnumT<type##Enum> cls::ClassInfo(cls##_Table, \
164 sizeof(cls##_Table)/sizeof(TAutoEnumVal<type##Enum>),type::ClassInfo.GetType());
165
166typedef short TAutoShortEnum;
167typedef long TAutoLongEnum;
168typedef LPCTSTR TAutoStringEnum;
169typedef float TAutoFloatEnum;
170typedef double TAutoDoubleEnum;
171typedef bool TAutoBoolEnum;
174typedef unsigned char TAutoByteEnum;
175
176//----------------------------------------------------------------------------
177//
178// Macros for defining command objects
179//
180//----------------------------------------------------------------------------
181//
182// DECLARE_AUTOCLASS(C++ClassName)
183// AUTOFUNC0 (InternalName, FuncName, Options)
184// AUTOFUNC1 (InternalName, FuncName, RetType, Arg1Type, Options)
185// AUTOFUNC2 (InternalName, FuncName, RetType, Arg1Type, Arg2Type, Options)
186// AUTOFUNC0V(InternalName, FuncName, Options) // void return
187// AUTOFUNC1V(InternalName, FuncName, Arg1Type, Options) // void return
188// AUTOFUNC2V(InternalName, FuncName, Arg1Type, Arg2Type, Options)
189// AUTODATA (InternalName, DataMember, DataType, Options)
190// AUTODATARO(InternalName, DataMember, DataType, Options)
191// AUTOPROP (InternalName, GetFuncName, SetFuncName, DataType, Options)
192// AUTOFLAG (InternalName, DataMember, BitMask, Options)
193// AUTOBUILD0(InternalName, Options)
194// AUTOBUILD1(InternalName, Arg1Type, Options)
195// AUTOBUILD2(InternalName, Arg1Type, Arg2Type, Options)
196// AUTOPROXY (InternalName, ProxyMember, Options)
197// AUTOITERATOR(AccessExpr, StateDefs, InitCode, TestExpr, StepCode)
198// AUTODETACH // invalidates external references upon object destruction
199//
200// For automated classes which are, inherit from, or delegate to COM objects,
201// use the following macro in place of DECLARE_AUTOCLASS:
202//
203// DECLARE_AUTOAGGREGATE(C++ClassName)
204//
205//----------------------------------------------------------------------------
206
207//
208// Macros to place in final argument to add capabilites, else leave empty
209//
210#define AUTOUNDO(code) TAutoCommand* Undo(){code} // declare an undo method
211#define AUTORECORD(code) int Record(TAutoStack& args){code}; // record method
212#define AUTOINVOKE(code) TAutoCommand& Invoke(){code return *this;}// override
213#define AUTOVALIDATE(condition) bool Validate() { return condition; }
214#define AUTONOHOOK TAutoCommand& Invoke() {Execute();}
215#define AUTOREPORT(errcode) long Report() {return errcode;}
216
217//----------------------------------------------------------------------------
218
219//
220// Autoclass declaration, adding derived TAutoCommand class with this pointer
221//
222#define DECLARE_AUTOCLASS(cls) \
223 public: \
224 static TAutoClass ClassInfo; \
225 protected: \
226 static TAutoSymbol SymbolTable[]; \
227 class TThisCommand : public TAutoCommand { \
228 protected: \
229 TThisCommand(cls* obj, int attr):TAutoCommand(attr),This(obj){} \
230 cls* This; \
231 }; \
232 typedef cls ThisClass; \
233 class TCommand_app : public TAutoCommand { \
234 public: \
235 TCommand_app(int attr, TServedObject* app) \
236 : TAutoCommand(attr), Val(app) {} \
237 void Return(TAutoVal& v) {v=(IDispatch*)Val;} \
238 TServedObject* Val; \
239 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
240 { return new TCommand_app(attr, args.Owner->GetAppObject()); } \
241 }; \
242 class TCommand_dtr : public TThisCommand { \
243 public: \
244 TCommand_dtr(ThisClass* obj, int attr) \
245 : TThisCommand(obj, attr) {} \
246 void Execute(){if (Attr == TObjectDescriptor::PostQuit) \
247 ::PostQuitMessage(0);\
248 else delete This;} \
249 static TAutoCommand* Build(ObjectPtr obj,int attr) \
250 { return new TCommand_dtr((ThisClass*)obj, attr); }\
251 }; friend class TCommand_dtr;
252
253#define DECLARE_AUTODISPATCH(cls) \
254 public: \
255 static TAutoClass ClassInfo; \
256 protected: \
257 static TAutoSymbol SymbolTable[]; \
258 class TThisCommand : public TAutoCommand { \
259 protected: \
260 TThisCommand(cls* obj, int attr):TAutoCommand(attr),This(obj){} \
261 cls* This; \
262 }; typedef cls ThisClass;
263
264//
265// Autoclass declaration for COM-aggregatable classes
266//
267
268#define DECLARE_AUTOAGGREGATE(cls) \
269 public: \
270 static IUnknown& Aggregator(ObjectPtr inst, TUnknown& inner); \
271 DECLARE_AUTOCLASS(cls)
272
273//
274// Command object class definition for methods or get-only properties
275//
276#define RETARG(t) void Return(TAutoVal& v){v=Val;} t Val;
277#define RETARGO(t) void Return(TAutoVal& v){v=(TObjectDescriptor)Val;} TAutoObject<t> Val;
278
279#define AUTOFUNC_(name, invoke, defs, defargs, bldargs, ctrargs, setargs) \
280 class TCommand_##name : public TThisCommand { \
281 public: typedef TCommand_##name ThisCmd; \
282 defs defargs \
283 TCommand_##name(ThisClass* obj, int attr ctrargs) \
284 : TThisCommand(obj, attr) setargs {} \
285 void Execute() {invoke} \
286 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
287 { return new TCommand_##name((ThisClass*)obj, attr bldargs); }\
288 }; friend class TCommand_##name;
289
290#define AUTOFUNC_ARG0(name, invoke, defs) \
291 class TCommand_##name : public TThisCommand { \
292 public: typedef TCommand_##name ThisCmd; \
293 defs \
294 TCommand_##name(ThisClass* obj, int attr) \
295 : TThisCommand(obj, attr){} \
296 void Execute() {invoke} \
297 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
298 { return new TCommand_##name((ThisClass*)obj, attr); }\
299 }; friend class TCommand_##name;
300
301#define AUTOFUNC_ARG0_D(name, invoke) \
302 class TCommand_##name : public TThisCommand { \
303 public: typedef TCommand_##name ThisCmd; \
304 TCommand_##name(ThisClass* obj, int attr) \
305 : TThisCommand(obj, attr){} \
306 void Execute() {invoke} \
307 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
308 { return new TCommand_##name((ThisClass*)obj, attr); }\
309 }; friend class TCommand_##name;
310
311#define AUTOFUNC_ARG1(name, invoke, defs, defargs) \
312 class TCommand_##name : public TThisCommand { \
313 public: typedef TCommand_##name ThisCmd; \
314 defs defargs \
315 TCommand_##name(ThisClass* obj, int attr) \
316 : TThisCommand(obj, attr){} \
317 void Execute() {invoke} \
318 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
319 { return new TCommand_##name((ThisClass*)obj, attr); }\
320 }; friend class TCommand_##name;
321
322#define AUTOFUNC_ARG1_D(name, invoke) \
323 class TCommand_##name : public TThisCommand { \
324 public: typedef TCommand_##name ThisCmd; \
325 TCommand_##name(ThisClass* obj, int attr) \
326 : TThisCommand(obj, attr){} \
327 void Execute() {invoke} \
328 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
329 { return new TCommand_##name((ThisClass*)obj, attr); }\
330 }; friend class TCommand_##name;
331
332#define AUTOFUNC_ARG2(name, invoke, defs, defargs, bldargs) \
333 class TCommand_##name : public TThisCommand { \
334 public: typedef TCommand_##name ThisCmd; \
335 defs defargs \
336 TCommand_##name(ThisClass* obj, int attr ) \
337 : TThisCommand(obj, attr) {} \
338 void Execute() {invoke} \
339 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
340 { return new TCommand_##name((ThisClass*)obj, attr bldargs); }\
341 }; friend class TCommand_##name;
342
343#define AUTOFUNC_ARG3(name, invoke, defs, defargs, bldargs, ctrargs) \
344 class TCommand_##name : public TThisCommand { \
345 public: typedef TCommand_##name ThisCmd; \
346 defs defargs \
347 TCommand_##name(ThisClass* obj, int attr ctrargs) \
348 : TThisCommand(obj, attr) {} \
349 void Execute() {invoke} \
350 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
351 { return new TCommand_##name((ThisClass*)obj, attr bldargs); }\
352 }; friend class TCommand_##name;
353
354#define AUTOFUNC_ARG4 AUTOFUNC_
355
356// Command object class definition for properties with both get and set
357//
358#define AUTOPROP_(name, getcode, setcode, defs, type) \
359 class TCommand_##name : public TThisCommand { \
360 public: typedef TCommand_##name ThisCmd; \
361 defs RETARG(type) \
362 TCommand_##name(ThisClass* obj, int attr) : TThisCommand(obj, attr) {} \
363 TCommand_##name(ThisClass* obj, int attr, type arg) \
364 : TThisCommand(obj, attr), Val(arg) {} \
365 void Execute() {if (IsPropSet()) {setcode} else {getcode}} \
366 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
367 { return (attr & asGet) ? \
368 new TCommand_##name((ThisClass*)obj, attr) : \
369 new TCommand_##name((ThisClass*)obj, attr, args[TAutoStack::SetValue]);} \
370 }; friend class TCommand_##name;
371
372#if !defined(BI_TYPECASTOPERATOR_BUG)
373#define AUTOPROPBUG_ AUTOPROP_
374#else
375// Command object class definition for properties with both get and set
376//
377#define AUTOPROPBUG_(name, getcode, setcode, defs, type) \
378 class TCommand_##name : public TThisCommand { \
379 public: typedef TCommand_##name ThisCmd; \
380 defs RETARG(type) \
381 TCommand_##name(ThisClass* obj, int attr) : TThisCommand(obj, attr) {} \
382 TCommand_##name(ThisClass* obj, int attr, type arg) \
383 : TThisCommand(obj, attr), Val(arg) {} \
384 void Execute() {if (IsPropSet()) {setcode} else {getcode}} \
385 static TAutoCommand* Build(ObjectPtr obj,int attr,TAutoStack& args) \
386 { return (attr & asGet) ? \
387 new TCommand_##name((ThisClass*)obj, attr) : \
388 new TCommand_##name((ThisClass*)obj, attr,(type)(args[TAutoStack::SetValue]).operator type());}\
389 }; friend class TCommand_##name;
390#endif
391
392
393//
394// Command object class definition for constructor commands
395//
396#define AUTOBUILD_(name, invoke, defs, defargs, bldargs, ctrargs, setargs) \
397 class TCommand_##name : public TAutoCommand {\
398 public: \
399 defs defargs RETARG(TAutoMono<ThisClass>) \
400 TCommand_##name(int attr ctrargs) : TAutoCommand(attr) setargs {} \
401 void Execute() {invoke} \
402 static TAutoCommand* Build(ObjectPtr, int attr, TAutoStack& args) \
403 { return new TCommand_##name(attr bldargs); } \
404 };
405
406#define AUTOBUILD_ARG0(name, invoke, defs) \
407 class TCommand_##name : public TAutoCommand {\
408 public: \
409 defs RETARG(TAutoMono<ThisClass>) \
410 TCommand_##name(int attr ) : TAutoCommand(attr) {} \
411 void Execute() {invoke} \
412 static TAutoCommand* Build(ObjectPtr, int attr, TAutoStack& args) \
413 { return new TCommand_##name(attr); } \
414 };
415
416#define AUTOBUILD_ARG1(name, invoke, defs, defargs) \
417 class TCommand_##name : public TAutoCommand {\
418 public: \
419 defs defargs RETARG(TAutoMono<ThisClass>) \
420 TCommand_##name(int attr) : TAutoCommand(attr){} \
421 void Execute() {invoke} \
422 static TAutoCommand* Build(ObjectPtr, int attr, TAutoStack& args) \
423 { return new TCommand_##name(attr); } \
424 };
425
426#define AUTOBUILD_ARG2(name, invoke, defs, defargs, bldargs) \
427 class TCommand_##name : public TAutoCommand {\
428 public: \
429 defs defargs RETARG(TAutoMono<ThisClass>) \
430 TCommand_##name(int attr) : TAutoCommand(attr){} \
431 void Execute() {invoke} \
432 static TAutoCommand* Build(ObjectPtr, int attr, TAutoStack& args) \
433 { return new TCommand_##name(attr bldargs); } \
434 };
435
436#define AUTOBUILD_ARG3(name, invoke, defs, defargs, bldargs, ctrargs) \
437 class TCommand_##name : public TAutoCommand {\
438 public: \
439 defs defargs RETARG(TAutoMono<ThisClass>) \
440 TCommand_##name(int attr ctrargs) : TAutoCommand(attr) {} \
441 void Execute() {invoke} \
442 static TAutoCommand* Build(ObjectPtr, int attr, TAutoStack& args) \
443 { return new TCommand_##name(attr bldargs); } \
444 };
445
446#define AUTOBUILD_ARG4 AUTOBUILD_
447
448//
449// Command object class definition for external object property
450//
451#define AUTOPROXY(name, proxy, defs) \
452 AUTOPROP_(name, Val=This->proxy;, This->proxy.Bind(Val);, defs, IDispatch*)
453
454//
455// Iterator class definition
456//
457#define AUTOITERATOR(state, init, test, step, extract) \
458 class TIterator : public TAutoIterator { \
459 public: \
460 ThisClass* This; \
461 state; \
462 void Init() {init;} \
463 bool Test() {return test;} \
464 void Step() {step;} \
465 void Return(TAutoVal& v) {v=extract;} \
466 TIterator* Copy() {return new TIterator(*this);} \
467 TIterator(ThisClass* obj, TAutoCreator& creator, IUnknown* owner, TLangId lang) \
468 : This(obj), TAutoIterator(creator, owner, lang) {} \
469 static TAutoIterator* Build(ObjectPtr obj, TAutoCreator& creator, \
470 IUnknown* owner, TLangId lang) \
471 { return new TIterator((ThisClass*)obj, creator, owner, lang); }\
472 }; friend class TIterator;
473
474#define AUTOITERATOR_DECLARE(state) \
475 class TIterator : public TAutoIterator { \
476 public: \
477 ThisClass* This; \
478 state; \
479 void Init(); \
480 bool Test(); \
481 void Step(); \
482 void Return(TAutoVal& v); \
483 TIterator* Copy() {return new TIterator(*this);} \
484 TIterator(ThisClass* obj, TAutoCreator& creator, IUnknown* owner, TLangId lang) \
485 : This(obj), TAutoIterator(creator, owner, lang) {} \
486 static TAutoIterator* Build(ObjectPtr obj, TAutoCreator& creator, \
487 IUnknown* owner, TLangId lang) \
488 { return new TIterator((ThisClass*)obj, creator, owner, lang); }\
489 }; friend class TIterator;
490
491//
492// Macros for defining lists of arguments
493//
494
495#define DEFARGS0(t0) t0 Val;
496#define DEFARGS1(t1) t1 Arg1;
497#define DEFARGS2(t1,t2) t1 Arg1;t2 Arg2;
498#define DEFARGS3(t1,t2,t3) t1 Arg1;t2 Arg2;t3 Arg3;
499#define DEFARGS4(t1,t2,t3,t4) t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;
500#define DEFARGS5(t1,t2,t3,t4,t5) t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;
501#define DEFARGS6(t1,t2,t3,t4,t5,t6) t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;t6 Arg6;
502#define DEFARGS7(t1,t2,t3,t4,t5,t6,t7) \
503 t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;t6 Arg6;t7 Arg7;
504#define DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8) \
505 t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;t6 Arg6;t7 Arg7;t8 Arg8;
506#define DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9) \
507 t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;t6 Arg6;t7 Arg7;t8 Arg8;t9 Arg9;
508#define DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) \
509 t1 Arg1;t2 Arg2;t3 Arg3;t4 Arg4;t5 Arg5;t6 Arg6;t7 Arg7;t8 Arg8;t9 Arg9;t10 Arg10;
510
511#define BLDARGS0(t0) ,(t0)args[TAutoStack::SetValue]
512#define BLDARGS1(t1) ,(t1)args[0]
513#define BLDARGS2(t1,t2) ,(t1)args[0],(t2)args[1]
514#define BLDARGS3(t1,t2,t3) ,(t1)args[0],(t2)args[1],(t3)args[2]
515#define BLDARGS4(t1,t2,t3,t4) \
516 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3]
517#define BLDARGS5(t1,t2,t3,t4,t5) \
518 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4]
519#define BLDARGS6(t1,t2,t3,t4,t5,t6) \
520 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4],(t6)args[5]
521#define BLDARGS7(t1,t2,t3,t4,t5,t6,t7) \
522 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4] \
523 ,(t6)args[5],(t7)args[6]
524#define BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8) \
525 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4] \
526 ,(t6)args[5],(t7)args[6],(t8)args[7]
527#define BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9) \
528 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4] \
529 ,(t6)args[5],(t7)args[6],(t8)args[7],(t9)args[8]
530#define BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) \
531 ,(t1)args[0],(t2)args[1],(t3)args[2],(t4)args[3],(t5)args[4] \
532 ,(t6)args[5],(t7)args[6],(t8)args[7],(t9)args[8],(t10)args[9]
533
534#define CTRARGS0(t0) ,t0 val
535#define CTRARGS1(t1) ,t1 arg1
536#define CTRARGS2(t1,t2) ,t1 arg1,t2 arg2
537#define CTRARGS3(t1,t2,t3) ,t1 arg1,t2 arg2,t3 arg3
538#define CTRARGS4(t1,t2,t3,t4) ,t1 arg1,t2 arg2,t3 arg3,t4 arg4
539#define CTRARGS5(t1,t2,t3,t4,t5) ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5
540#define CTRARGS6(t1,t2,t3,t4,t5,t6) ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5,t6 arg6
541#define CTRARGS7(t1,t2,t3,t4,t5,t6,t7) ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5,t6 arg6,t7 arg7
542#define CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8) \
543 ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5,t6 arg6,t7 arg7,t8 arg8
544#define CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9) \
545 ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5,t6 arg6,t7 arg7,t8 arg8,t9 arg9
546#define CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) \
547 ,t1 arg1,t2 arg2,t3 arg3,t4 arg4,t5 arg5,t6 arg6,t7 arg7,t8 arg8,t9 arg9,t10 arg10
548
549#define SETARGS0 ,Val(val)
550#define SETARGS1 ,Arg1(arg1)
551#define SETARGS2 ,Arg1(arg1),Arg2(arg2)
552#define SETARGS3 ,Arg1(arg1),Arg2(arg2),Arg3(arg3)
553#define SETARGS4 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4)
554#define SETARGS5 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5)
555#define SETARGS6 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5),Arg6(arg6)
556#define SETARGS7 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5),Arg6(arg6), \
557 Arg7(arg7)
558#define SETARGS8 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5),Arg6(arg6), \
559 Arg7(arg7),Arg8(arg8)
560#define SETARGS9 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5),Arg6(arg6), \
561 Arg7(arg7),Arg8(arg8),Arg9(arg9)
562#define SETARGS10 ,Arg1(arg1),Arg2(arg2),Arg3(arg3),Arg4(arg4),Arg5(arg5),Arg6(arg6), \
563 Arg7(arg7),Arg8(arg8),Arg9(arg9),Arg10(arg10)
564
565#define AUTOFUNC0(name, func, ret, defs) \
566 AUTOFUNC_ARG1(name, Val=This->func();, defs, RETARG(ret))
567// AUTOFUNC_(name, Val=This->func();, defs, RETARG(ret), , , )
568#define AUTOFUNC0O(name, func, ret, defs) \
569 AUTOFUNC_ARG1(name, Val=This->func();, defs, RETARGO(ret))
570// AUTOFUNC_(name, Val=This->func();, defs, RETARG(ret), , , )
571
572
573#define AUTOFUNC0R(name, func, ret) \
574 AUTOFUNC_ARG0(name, Val=This->func();, RETARG(ret))
575#define AUTOFUNC0OR(name, func, ret) \
576 AUTOFUNC_ARG0(name, Val=This->func();, RETARGO(ret))
577
578#define AUTOFUNC0V(name, func, defs) \
579 AUTOFUNC_ARG0(name, This->func();, defs)
580// AUTOFUNC_(name, This->func();, defs, , , , )
581
582#define AUTOFUNC0V3 AUTOFUNC0V
583
584#define AUTOFUNC0V2(name, func) \
585 AUTOFUNC_ARG1_D(name, This->func();)
586
587#define AUTOFUNC1(name, func, ret,type1, defs) \
588 AUTOFUNC_ARG4(name, Val=This->func(Arg1);, defs, RETARG(ret) \
589 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
590#define AUTOFUNC1O(name, func, ret,type1, defs) \
591 AUTOFUNC_ARG4(name, Val=This->func(Arg1);, defs, RETARGO(ret) \
592 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
593
594#define AUTOFUNC1R(name, func, ret,type1) \
595 AUTOFUNC_ARG4(name, Val=This->func(Arg1);, public:, RETARG(ret) \
596 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
597#define AUTOFUNC1OR(name, func, ret,type1) \
598 AUTOFUNC_ARG4(name, Val=This->func(Arg1);, public:, RETARGO(ret) \
599 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
600
601#define AUTOFUNC1V(name, func, type1, defs) \
602 AUTOFUNC_ARG4(name, This->func(Arg1);, defs, \
603 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
604
605#define AUTOFUNC2(name, func, ret,t1,t2, defs) \
606 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2);, defs, RETARG(ret) \
607 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
608#define AUTOFUNC2O(name, func, ret,t1,t2, defs) \
609 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2);, defs, RETARGO(ret) \
610 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
611
612#define AUTOFUNC2V(name, func, t1,t2, defs) \
613 AUTOFUNC_ARG4(name, This->func(Arg1,Arg2);, defs, \
614 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
615
616#define AUTOFUNC2V4(name, func, t1,t2) \
617 AUTOFUNC_ARG4(name, This->func(Arg1,Arg2);, public:, \
618 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
619
620#define AUTOFUNC3(name, func, ret,t1,t2,t3, defs) \
621 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2,Arg3);, defs, RETARG(ret) \
622 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
623#define AUTOFUNC3O(name, func, ret,t1,t2,t3, defs) \
624 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2,Arg3);, defs, RETARGO(ret) \
625 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
626
627#define AUTOFUNC3V(name, func, t1,t2,t3, defs) \
628 AUTOFUNC_ARG4(name, This->func(Arg1,Arg2,Arg3);, defs, \
629 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
630
631#define AUTOFUNC4(name, func, ret,t1,t2,t3,t4, defs) \
632 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2,Arg3,Arg4);, defs, RETARG(ret) \
633 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
634#define AUTOFUNC4O(name, func, ret,t1,t2,t3,t4, defs) \
635 AUTOFUNC_ARG4(name, Val=This->func(Arg1,Arg2,Arg3,Arg4);, defs, RETARGO(ret) \
636 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
637
638#define AUTOFUNC4V(name, func, t1,t2,t3,t4, defs) \
639 AUTOFUNC_ARG4(name, This->func(Arg1,Arg2,Arg3,Arg4);, defs,\
640 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
641
642#define AUTOFUNC5(name,func,ret,t1,t2,t3,t4,t5,defs) \
643 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5);,defs,RETARG(ret) \
644 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),SETARGS5)
645#define AUTOFUNC5O(name,func,ret,t1,t2,t3,t4,t5,defs) \
646 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5);,defs,RETARGO(ret) \
647 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),SETARGS5)
648
649#define AUTOFUNC5V(name,func,t1,t2,t3,t4,t5,defs) \
650 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5);,defs, \
651 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),SETARGS5)
652
653#define AUTOFUNC6(name,func,ret,t1,t2,t3,t4,t5,t6,defs) \
654 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs,RETARG(ret) \
655 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
656#define AUTOFUNCO6(name,func,ret,t1,t2,t3,t4,t5,t6,defs) \
657 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs,RETARGO(ret) \
658 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
659
660#define AUTOFUNC6V(name,func,t1,t2,t3,t4,t5,t6,defs) \
661 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs, \
662 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), \
663 CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
664
665#define AUTOFUNC7(name,func,ret,t1,t2,t3,t4,t5,t6,t7,defs) \
666 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs,RETARG(ret) \
667 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
668 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
669#define AUTOFUNC7O(name,func,ret,t1,t2,t3,t4,t5,t6,t7,defs) \
670 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs,RETARGO(ret) \
671 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
672 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
673
674#define AUTOFUNC7V(name,func,t1,t2,t3,t4,t5,t6,t7,defs) \
675 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs, \
676 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
677 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
678
679#define AUTOFUNC8(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
680 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs,RETARG(ret) \
681 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
682 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
683#define AUTOFUNC8O(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
684 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs,RETARGO(ret) \
685 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
686 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
687
688#define AUTOFUNC8V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
689 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs, \
690 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
691 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
692
693#define AUTOFUNC9(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
694 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs,RETARG(ret) \
695 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
696 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
697#define AUTOFUNC9O(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
698 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs,RETARGO(ret) \
699 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
700 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
701
702#define AUTOFUNC9V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
703 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs, \
704 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
705 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
706
707#define AUTOFUNC10(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
708 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs,RETARG(ret) \
709 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
710 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
711#define AUTOFUNC10O(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
712 AUTOFUNC_ARG4(name,Val=This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs,RETARGO(ret) \
713 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
714 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
715
716#define AUTOFUNC10V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
717 AUTOFUNC_ARG4(name,This->func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs, \
718 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
719 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
720
721#define AUTOSTAT0(name, func, ret, defs) \
722 AUTOFUNC_ARG1(name, Val=func();, defs, RETARG(ret))
723// AUTOFUNC_(name, Val=func();, defs, RETARG(ret), , , )
724
725#define AUTOSTAT0V(name, func, defs) \
726 AUTOFUNC_ARG0(name, func();, defs)
727// AUTOFUNC_(name, func();, defs, , , , )
728
729#define AUTOSTAT1(name, func, ret,type1, defs) \
730 AUTOFUNC_ARG4(name, Val=func(Arg1);, defs, RETARG(ret) \
731 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
732
733#define AUTOSTAT1V(name, func, type1, defs) \
734 AUTOFUNC_ARG4(name, func(Arg1);, defs, \
735 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
736
737#define AUTOSTAT2(name, func, ret,t1,t2, defs) \
738 AUTOFUNC_ARG4(name, Val=func(Arg1,Arg2);, defs, RETARG(ret) \
739 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
740
741#define AUTOSTAT2V(name, func, t1,t2, defs) \
742 AUTOFUNC_ARG4(name, func(Arg1,Arg2);, defs, \
743 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
744
745#define AUTOSTAT3(name, func, ret,t1,t2,t3, defs) \
746 AUTOFUNC_ARG4(name, Val=func(Arg1,Arg2,Arg3);, defs, RETARG(ret) \
747 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
748
749#define AUTOSTAT3V(name, func, t1,t2,t3, defs) \
750 AUTOFUNC_ARG4(name, func(Arg1,Arg2,Arg3);, defs, \
751 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
752
753#define AUTOSTAT4(name, func, ret,t1,t2,t3,t4, defs) \
754 AUTOFUNC_ARG4(name, Val=func(Arg1,Arg2,Arg3,Arg4);, defs, RETARG(ret) \
755 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
756
757#define AUTOSTAT4V(name, func, t1,t2,t3,t4, defs) \
758 AUTOFUNC_ARG4(name, func(Arg1,Arg2,Arg3,Arg4);, defs,\
759 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
760
761#define AUTOSTAT5(name,func,ret,t1,t2,t3,t4,t5,defs) \
762 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5);,defs,RETARG(ret) \
763 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),SETARGS5)
764
765#define AUTOSTAT5V(name,func,t1,t2,t3,t4,t5,defs) \
766 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5);,defs, \
767 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),SETARGS5)
768
769#define AUTOSTAT6(name,func,ret,t1,t2,t3,t4,t5,t6,defs) \
770 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs,RETARG(ret) \
771 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
772
773#define AUTOSTAT6V(name,func,t1,t2,t3,t4,t5,t6,defs) \
774 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs, \
775 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
776
777#define AUTOSTAT7(name,func,ret,t1,t2,t3,t4,t5,t6,t7,defs) \
778 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs,RETARG(ret) \
779 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
780 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
781
782#define AUTOSTAT7V(name,func,t1,t2,t3,t4,t5,t6,t7,defs) \
783 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs, \
784 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
785 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
786
787#define AUTOSTAT8(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
788 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs,RETARG(ret) \
789 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
790 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
791
792#define AUTOSTAT8V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
793 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs, \
794 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
795 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
796
797#define AUTOSTAT9(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
798 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs,RETARG(ret) \
799 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
800 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
801
802#define AUTOSTAT9V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
803 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs, \
804 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
805 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
806
807#define AUTOSTAT10(name,func,ret,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
808 AUTOFUNC_ARG4(name,Val=func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs,RETARG(ret) \
809 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
810 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
811
812#define AUTOSTAT10V(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
813 AUTOFUNC_ARG4(name,func(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs, \
814 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
815 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
816
817
818#define AUTOPROP( name, get, set, type, defs) \
819 AUTOPROP_(name, Val=This->get();, This->set(Val);, defs, type)
820
821#define AUTOPROPBUG( name, get, set, type, defs) \
822 AUTOPROPBUG_(name, Val=This->get();, This->set(Val);, defs, type)
823
824#define AUTOPROPRO(name, get, type, defs) \
825 AUTOFUNC0( name, get, type, defs)
826
827#define AUTOPROPWO( name, set, type, defs) \
828 AUTOFUNC_(name, This->set(Val);, defs, \
829 DEFARGS0(type), BLDARGS0(type), CTRARGS0(type), SETARGS0)
830
831#define AUTODATA( name, data, type, defs) \
832 AUTOPROP_(name, Val=This->data;, This->data=Val;, defs, type)
833
834#define AUTODATARO(name, data, type, defs) \
835 AUTOFUNC_ARG1(name, Val=This->data;, defs, RETARG(type))
836// AUTOFUNC_(name, Val=This->data;, defs, RETARG(type), , , )
837
838#define AUTOTHIS(name, type, defs) \
839 AUTOFUNC_ARG1(name, Val=*This;, defs, RETARG(type))
840// AUTOFUNC_(name, Val=*This;, defs, RETARG(type), , , )
841
842#define AUTOFLAG( name, data, mask, defs) \
843 AUTOPROP_(name, Val=(TBool)((This->data & (mask)) != 0);, \
844 if (Val) This->data|=(mask); else This->data&=~(mask);, defs, TBool)
845
846#define AUTOBUILD0(name, defs) \
847 AUTOBUILD_ARG0(name, Val = new ThisClass();, defs)
848// AUTOBUILD_(name, Val = new ThisClass();, defs, , , , )
849
850#define AUTOBUILD1(name, type1, defs) \
851 AUTOBUILD_ARG4(name, Val = new ThisClass(Arg1);, defs, \
852 DEFARGS1(type1), BLDARGS1(type1), CTRARGS1(type1), SETARGS1)
853
854#define AUTOBUILD2(name, t1,t2, defs) \
855 AUTOBUILD_ARG4(name, Val = new ThisClass(Arg1,Arg2);, defs, \
856 DEFARGS2(t1,t2), BLDARGS2(t1,t2), CTRARGS2(t1,t2), SETARGS2)
857
858#define AUTOBUILD3(name, t1,t2,t3, defs) \
859 AUTOBUILD_ARG4(name, Val = new ThisClass(Arg1,Arg2,Arg3);, defs, \
860 DEFARGS3(t1,t2,t3), BLDARGS3(t1,t2,t3), CTRARGS3(t1,t2,t3), SETARGS3)
861
862#define AUTOBUILD4(name, t1,t2,t3,t4, defs) \
863 AUTOBUILD_ARG4(name, Val = new ThisClass(Arg1,Arg2,Arg3,Arg4);, defs, \
864 DEFARGS4(t1,t2,t3,t4), BLDARGS4(t1,t2,t3,t4), CTRARGS4(t1,t2,t3,t4), SETARGS4)
865
866#define AUTOBUILD5(name,func,t1,t2,t3,t4,t5,defs) \
867 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5);,defs, \
868 DEFARGS5(t1,t2,t3,t4,t5),BLDARGS5(t1,t2,t3,t4,t5),CTRARGS5(t1,t2,t3,t4,t5),\
869 SETARGS5)
870
871#define AUTOBUILD6(name,func,t1,t2,t3,t4,t5,t6,defs) \
872 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6);,defs, \
873 DEFARGS6(t1,t2,t3,t4,t5,t6),BLDARGS6(t1,t2,t3,t4,t5,t6), \
874 CTRARGS6(t1,t2,t3,t4,t5,t6),SETARGS6)
875
876#define AUTOBUILD7(name,func,t1,t2,t3,t4,t5,t6,t7,defs) \
877 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7);,defs,\
878 DEFARGS7(t1,t2,t3,t4,t5,t6,t7),BLDARGS7(t1,t2,t3,t4,t5,t6,t7), \
879 CTRARGS7(t1,t2,t3,t4,t5,t6,t7),SETARGS7)
880
881#define AUTOBUILD8(name,func,t1,t2,t3,t4,t5,t6,t7,t8,defs) \
882 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8);,defs, \
883 DEFARGS8(t1,t2,t3,t4,t5,t6,t7,t8),BLDARGS8(t1,t2,t3,t4,t5,t6,t7,t8), \
884 CTRARGS8(t1,t2,t3,t4,t5,t6,t7,t8),SETARGS8)
885
886#define AUTOBUILD9(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,defs) \
887 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9);,defs, \
888 DEFARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),BLDARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9), \
889 CTRARGS9(t1,t2,t3,t4,t5,t6,t7,t8,t9),SETARGS9)
890
891#define AUTOBUILD10(name,func,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,defs) \
892 AUTOBUILD_ARG4(name,Val=new ThisClass(Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10);,defs, \
893 DEFARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),BLDARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), \
894 CTRARGS10(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10),SETARGS10)
895
896#define AUTODETACH \
897 struct TDetach : public TAutoDetach { \
898 ~TDetach(){Notify((int)&((ThisClass*)0)->dtr_notify,typeid(ThisClass));} \
899 } dtr_notify; friend struct TDetach;
900
901//----------------------------------------------------------------------------
902//
903// Macros for defining automation proxy call wrappers
904//
905//----------------------------------------------------------------------------
906//
907// RetType|void C++ClassName::C++MethodName(C++ArgumentList)
908// {
909// AUTONAMES?(FunctionName&NamedArgs) // ? = named argument count
910// AUTOARGS?(ArgumentList) // ? = total argument count
911// AUTOCALL_? // ? = call type and return value type
912// }
913//
914//----------------------------------------------------------------------------
915
916#define AUTOCALL_ASSIGN \
917 ExtObjRef operator =(ExtObjRef ifc) {return TAutoProxy::operator =(ifc);}
918
919#define _A(a) "\0" a
920
921#define AUTONAMES0(id) static TAutoDispId i_(this, id);
922#define AUTONAMES1(id,n1) static TAutoDispIds<1> i_(this, id _A(n1));
923#define AUTONAMES2(id,n1,n2) static TAutoDispIds<2> i_(this, id _A(n2)_A(n1));
924#define AUTONAMES3(id,n1,n2,n3) \
925 static TAutoDispIds<3> i_(this, id _A(n3)_A(n2)_A(n1));
926#define AUTONAMES4(id,n1,n2,n3,n4) \
927 static TAutoDispIds<4> i_(this, id _A(n4)_A(n3)_A(n2)_A(n1));
928#define AUTONAMES5(id,n1,n2,n3,n4,n5) \
929 static TAutoDispIds<5> i_(this, id _A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
930#define AUTONAMES6(id,n1,n2,n3,n4,n5,n6) \
931 static TAutoDispIds<6> i_(this, id _A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
932#define AUTONAMES7(id,n1,n2,n3,n4,n5,n6,n7) \
933 static TAutoDispIds<7> i_(this,id,_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
934#define AUTONAMES8(id,n1,n2,n3,n4,n5,n6,n7,n8) \
935 static TAutoDispIds<8> i_(this,id,_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
936#define AUTONAMES9(id,n1,n2,n3,n4,n5,n6,n7,n8,n9) \
937 static TAutoDispIds<9> i_(this,id,_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
938#define AUTONAMES10(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10) \
939 static TAutoDispIds<10> i_(this,id,_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
940
941#define AUTONAMES11(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11) static TAutoDispIds<11> i_(this, id, _A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
942#define AUTONAMES12(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12) static TAutoDispIds<12> i_(this, id, _A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
943#define AUTONAMES13(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13) static TAutoDispIds<13> i_(this, id, _A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
944#define AUTONAMES14(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14) static TAutoDispIds<14> i_(this, id, _A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
945#define AUTONAMES15(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15) static TAutoDispIds<15> i_(this, id, _A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
946#define AUTONAMES16(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16) static TAutoDispIds<16> i_(this, id, _A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
947#define AUTONAMES17(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17) static TAutoDispIds<17> i_(this, id, _A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
948#define AUTONAMES18(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18) static TAutoDispIds<18> i_(this, id, _A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
949#define AUTONAMES19(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19) static TAutoDispIds<19> i_(this, id, _A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
950#define AUTONAMES20(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20) static TAutoDispIds<20> i_(this, id, _A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
951#define AUTONAMES21(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21) static TAutoDispIds<21> i_(this, id, _A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
952#define AUTONAMES22(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22) static TAutoDispIds<22> i_(this, id, _A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
953#define AUTONAMES23(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23) static TAutoDispIds<23> i_(this, id, _A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
954#define AUTONAMES24(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24) static TAutoDispIds<24> i_(this, id, _A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
955#define AUTONAMES25(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25) static TAutoDispIds<25> i_(this, id, _A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
956#define AUTONAMES26(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26) static TAutoDispIds<26> i_(this, id, _A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
957#define AUTONAMES27(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27) static TAutoDispIds<27> i_(this, id, _A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
958#define AUTONAMES28(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28) static TAutoDispIds<28> i_(this, id, _A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
959#define AUTONAMES29(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29) static TAutoDispIds<29> i_(this, id, _A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
960#define AUTONAMES30(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30) static TAutoDispIds<30> i_(this, id, _A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
961#define AUTONAMES31(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31) static TAutoDispIds<31> i_(this, id, _A(n31)_A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
962#define AUTONAMES32(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32) static TAutoDispIds<32> i_(this, id, _A(n32)_A(n31)_A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
963#define AUTONAMES33(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33) static TAutoDispIds<33> i_(this, id, _A(n33)_A(n32)_A(n31)_A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
964#define AUTONAMES34(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34) static TAutoDispIds<34> i_(this, id, _A(n34)_A(n33)_A(n32)_A(n31)_A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
965#define AUTONAMES35(id,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35) static TAutoDispIds<35> i_(this, id, _A(n35)_A(n34)_A(n33)_A(n32)_A(n31)_A(n30)_A(n29)_A(n28)_A(n27)_A(n26)_A(n25)_A(n24)_A(n23)_A(n22)_A(n21)_A(n20)_A(n19)_A(n18)_A(n17)_A(n16)_A(n15)_A(n14)_A(n13)_A(n12)_A(n11)_A(n10)_A(n9)_A(n8)_A(n7)_A(n6)_A(n5)_A(n4)_A(n3)_A(n2)_A(n1));
966
967
968#define AUTOARGS0() TAutoArgs<0>a_;
969#define AUTOARGS1(a1) TAutoArgs<1>a_; a_[1]=a1;
970#define AUTOARGS2(a1,a2) TAutoArgs<2>a_; a_[1]=a1; a_[2]=a2;
971#define AUTOARGS3(a1,a2,a3) TAutoArgs<3>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3;
972#define AUTOARGS4(a1,a2,a3,a4) \
973 TAutoArgs<4>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4;
974#define AUTOARGS5(a1,a2,a3,a4,a5) \
975 TAutoArgs<5>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5;
976#define AUTOARGS6(a1,a2,a3,a4,a5,a6) \
977 TAutoArgs<6>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5;a_[6]=a6;
978#define AUTOARGS7(a1,a2,a3,a4,a5,a6,a7) \
979 TAutoArgs<7>a_;a_[1]=a1;a_[2]=a2;a_[3]=a3;a_[4]=a4;a_[5]=a5; \
980 a_[6]=a6;a_[7]=a7;
981#define AUTOARGS8(a1,a2,a3,a4,a5,a6,a7,a8) \
982 TAutoArgs<8>a_;a_[1]=a1;a_[2]=a2;a_[3]=a3;a_[4]=a4;a_[5]=a5; \
983 a_[6]=a6;a_[7]=a7;a_[8]=a8;
984#define AUTOARGS9(a1,a2,a3,a4,a5,a6,a7,a8,a9) \
985 TAutoArgs<9>a_;a_[1]=a1;a_[2]=a2;a_[3]=a3;a_[4]=a4;a_[5]=a5; \
986 a_[6]=a6;a_[7]=a7;a_[8]=a8;a_[9]=a9;
987#define AUTOARGS10(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
988 TAutoArgs<10>a_;a_[1]=a1;a_[2]=a2;a_[3]=a3;a_[4]=a4;a_[5]=a5; \
989 a_[6]=a6;a_[7]=a7;a_[8]=a8;a_[9]=a9;a_[10]=a10;
990
991
992#define AUTOARGS11(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) TAutoArgs<11>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11;
993#define AUTOARGS12(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) TAutoArgs<12>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12;
994#define AUTOARGS13(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) TAutoArgs<13>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13;
995#define AUTOARGS14(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) TAutoArgs<14>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14;
996#define AUTOARGS15(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) TAutoArgs<15>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15;
997#define AUTOARGS16(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16) TAutoArgs<16>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16;
998#define AUTOARGS17(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17) TAutoArgs<17>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17;
999#define AUTOARGS18(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18) TAutoArgs<18>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18;
1000#define AUTOARGS19(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19) TAutoArgs<19>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19;
1001#define AUTOARGS20(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20) TAutoArgs<20>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20;
1002#define AUTOARGS21(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21) TAutoArgs<21>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21;
1003#define AUTOARGS22(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22) TAutoArgs<22>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22;
1004#define AUTOARGS23(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23) TAutoArgs<23>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23;
1005#define AUTOARGS24(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24) TAutoArgs<24>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24;
1006#define AUTOARGS25(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25) TAutoArgs<25>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25;
1007#define AUTOARGS26(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26) TAutoArgs<26>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26;
1008#define AUTOARGS27(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27) TAutoArgs<27>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27;
1009#define AUTOARGS28(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28) TAutoArgs<28>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28;
1010#define AUTOARGS29(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29) TAutoArgs<29>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29;
1011#define AUTOARGS30(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30) TAutoArgs<30>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30;
1012#define AUTOARGS31(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31) TAutoArgs<31>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31;
1013#define AUTOARGS31(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31) TAutoArgs<31>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31;
1014#define AUTOARGS32(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32) TAutoArgs<32>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31; a_[32]=a32;
1015#define AUTOARGS33(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33) TAutoArgs<33>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31; a_[32]=a32; a_[33]=a33;
1016#define AUTOARGS34(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34) TAutoArgs<34>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31; a_[32]=a32; a_[33]=a33; a_[34]=a34;
1017#define AUTOARGS35(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35) TAutoArgs<35>a_; a_[1]=a1; a_[2]=a2; a_[3]=a3; a_[4]=a4; a_[5]=a5; a_[6]=a6; a_[7]=a7; a_[8]=a8; a_[9]=a9; a_[10]=a10; a_[11]=a11; a_[12]=a12; a_[13]=a13; a_[14]=a14; a_[15]=a15; a_[16]=a16; a_[17]=a17; a_[18]=a18; a_[19]=a19; a_[20]=a20; a_[21]=a21; a_[22]=a22; a_[23]=a23; a_[24]=a24; a_[25]=a25; a_[26]=a26; a_[27]=a27; a_[28]=a28; a_[29]=a29; a_[30]=a30; a_[31]=a31; a_[32]=a32; a_[33]=a33; a_[34]=a34; a_[35]=a35;
1018
1019#define AUTOCALL_METHOD_RET return Invoke(acMethod, a_, i_, i_);
1020#define AUTOCALL_METHOD_VOID Invoke(acMethod|acVoidRet, a_, i_, i_);
1021#define AUTOCALL_METHOD_REF(prx) prx.Bind(Invoke(acMethod, a_, i_, i_));
1022#define AUTOCALL_METHOD_CONV(t) return t(Invoke(acMethod, a_, i_, i_));
1023
1024#define AUTOCALL_PROP_GET return Invoke(acPropGet, a_, i_, i_);
1025#define AUTOCALL_PROP_SET(val) a_[0]=val; Invoke(acPropSet, a_, i_, i_);
1026#define AUTOCALL_PROP_REF(prx) prx.Bind(Invoke(acPropGet, a_, i_, i_));
1027#define AUTOCALL_PROP_CONV(t) return t(Invoke(acPropGet, a_, i_, i_));
1028
1029
1030//
1031// Special automation macro for default 'IDispatch::Invoke' handling
1032//
1033// DISPID_CATCH_ALL is a MEMBERID which is treated specially by both the
1034// TServedObject and TDispatch implementation of 'Invoke'. When found in a
1035// class symbol table, the handler associate with this ID is called for any
1036// method for which a specific handler was not specified. This makes the
1037// associated function a 'catch-all'.
1038//
1039// NOTE: *USE WITH CARE*
1040//
1041// This support makes it ideal for event sinking. It allows a single handler
1042// to be called for all custom events. See the TOcControlEvent class for more
1043// information.
1044//
1045#define DISPID_CATCH_ALL (-999)
1046
1047#define AUTOFUNCX(name, func, ret, defs) \
1048 AUTOFUNC_(name, Val=(ret)This->func( (long *)Args);, defs, \
1049 RETARG(ret) DEFARGSX, BLDARGSX, CTRARGSX, SETARGSX)
1050
1051#define DEFARGSX TAutoStack *Args;
1052#define BLDARGSX ,&args
1053#define CTRARGSX ,TAutoStack *args
1054#define SETARGSX ,Args(args)
1055
1056
1057} // OCF namespace
1058
1059
1060#endif // OCF_AUTOMACR_H
OLE Automation Class Definitions.
Automation abstract base class for command objects.
Definition autodefs.h:846
Automation argument stack abstraction.
Definition autodefs.h:813
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
TAutoDate TAutoDateEnum
Definition automacr.h:173
short TAutoShortEnum
Definition automacr.h:166
void * ObjectPtr
Definition autodefs.h:84
TAutoCurrency TAutoCurrencyEnum
Definition automacr.h:172
float TAutoFloatEnum
Definition automacr.h:169
double TAutoDoubleEnum
Definition automacr.h:170
LPCTSTR TAutoStringEnum
Definition automacr.h:168
bool TAutoBoolEnum
Definition automacr.h:171
long TAutoLongEnum
Definition automacr.h:167
unsigned char TAutoByteEnum
Definition automacr.h:174
static TAutoCommand * Build(ObjectPtr, int, TAutoStack &)
Definition automacr.h:81