0000: 2f 2f 20 63 6f 6e 74 65 78 74 69 6d 70 6c 2e 68 // contextimpl.h
0010: 70 70 0d 0a 23 70 72 61 67 6d 61 20 6f 6e 63 65 pp..#pragma once
0020: 0d 0a 23 70 72 61 67 6d 61 20 77 61 72 6e 69 6e ..#pragma warnin
0030: 67 28 64 69 73 61 62 6c 65 3a 20 34 37 38 36 29 g(disable: 4786)
0040: 09 2f 2f 20 cf ee e4 e0 e2 eb ff e5 ec 20 e2 ee .// ......... ..
0050: f0 ed e8 ed e3 e8 20 ee e1 20 f1 eb e8 f8 ea ee ...... .. ......
0060: ec 20 e4 eb e8 ed ed fb f5 20 e8 ec e5 ed e0 f5 . ....... ......
0070: 0d 0a 2f 2a 0d 0a 28 f1 29 20 c0 eb e5 ea f1 e0 ../*..(.) ......
0080: ed e4 f0 20 ce f0 e5 f4 ea ee e2 20 74 65 6c 65 ... ....... tele
0090: 70 61 74 40 69 6e 62 6f 78 2e 72 75 0d 0a 0d 0a pat@inbox.ru....
00a0: c7 e0 e3 ee eb ee e2 ee f7 ed fb e9 20 f4 e0 e9 ............ ...
00b0: eb 20 e4 eb ff 20 f0 e5 e0 eb e8 e7 e0 f6 e8 e8 . ... ..........
00c0: 20 43 42 4c 43 6f 6e 74 65 78 74 27 ed fb f5 20 CBLContext'...
00d0: ee e1 fa e5 ea f2 ee e2 2e 0d 0a c8 f1 ef ee eb ................
00e0: fc e7 ee e2 e0 ed e8 e5 3a 0d 0a c4 eb ff 20 ee ........:..... .
00f0: e1 fa ff e2 eb e5 ed e8 ff 20 ea eb e0 f1 f1 e0 ......... ......
0100: 2c 20 e0 e2 f2 ee ec e0 f2 e8 f7 e5 f1 ea e8 20 , .............
0110: f0 e5 e3 e8 f1 f2 f0 e8 f0 f3 e5 ec ee e3 ee 20 ...............
0120: e4 eb ff 20 d1 ee e7 e4 e0 f2 fc ce e1 fa e5 ea ... ............
0130: f2 2c 20 ee e1 fa ff e2 e8 f2 e5 20 f1 e2 ee e9 ., ........ ....
0140: 20 ea eb e0 f1 f1 20 ea e0 ea 0d 0a 0d 0a 20 20 ..... .......
0150: 63 6c 61 73 73 20 c2 e0 f8 ca eb e0 f1 f1 20 3a class ........ :
0160: 20 70 75 62 6c 69 63 20 43 43 6f 6e 74 65 78 74 public CContext
0170: 49 6d 70 6c 3c c2 e0 f8 ca eb e0 f1 f1 3e 0d 0a Impl<........>..
0180: 0d 0a eb e8 e1 ee 2c 20 e5 f1 eb e8 20 ea eb e0 ......, .... ...
0190: f1 f1 20 ed e5 20 e4 ee eb e6 e5 ed 20 f1 ee e7 .. .. ...... ...
01a0: e4 e0 e2 e0 f2 fc f1 ff 20 f7 e5 f0 e5 e7 20 d1 ........ ..... .
01b0: ee e7 e4 e0 f2 fc ce e1 fa e5 ea f2 2c 20 f2 ee ............, ..
01c0: 20 f2 e0 ea 3a 0d 0a 0d 0a 20 20 63 6c 61 73 73 ...:.... class
01d0: 20 c2 e0 f8 ca eb e0 f1 f1 20 3a 20 70 75 62 6c ........ : publ
01e0: 69 63 20 43 43 6f 6e 74 65 78 74 49 6d 70 6c 3c ic CContextImpl<
01f0: c2 e0 f8 ca eb e0 f1 f1 2c 20 6e 6f 5f 69 6e 69 ........, no_ini
0200: 74 5f 64 6f 6e 65 3e 0d 0a 0d 0a 0d 0a cf e5 f0 t_done>.........
0210: e5 e4 20 ee e1 fa ff e2 eb e5 ed e8 e5 ec 20 ec .. ........... .
0220: e5 f2 ee e4 ee e2 20 e8 20 f1 e2 ee e9 f1 f2 e2 ...... . .......
0230: 20 ea ee ed f2 e5 ea f1 f2 e0 20 e8 f1 ef ee eb ......... .....
0240: fc e7 f3 e9 f2 e5 20 ec e0 ea f0 ee f1 0d 0a 09 ...... .........
0250: 0d 0a 09 42 4c 5f 42 45 47 49 4e 5f 43 4f 4e 54 ...BL_BEGIN_CONT
0260: 45 58 54 28 22 45 6e 67 6c 69 73 68 4e 61 6d 65 EXT("EnglishName
0270: 22 2c 20 22 d0 f3 f1 f1 ea ee e5 c8 ec ff 22 29 ", "..........")
0280: 3b 0d 0a 0d 0a ce ed 20 e7 e0 e4 e0 e5 f2 20 e8 ;...... ...... .
0290: ec e5 ed e0 20 f2 e8 ef e0 20 31 d1 20 e4 eb ff .... .... 1. ...
02a0: 20 fd f2 ee e3 ee 20 ea eb e0 f1 f1 e0 20 28 e2 ..... ...... (.
02b0: ee e7 e2 f0 e0 f9 e0 fe f2 f1 ff 20 e2 20 d2 e8 ........... . ..
02c0: ef c7 ed e0 f7 e5 ed e8 ff d1 f2 f0 29 20 e8 20 ............) .
02d0: e2 e2 ee e4 e8 f2 0d 0a ed e5 ee e1 f5 ee e4 e8 ................
02e0: ec fb e5 20 e4 eb ff 20 f0 e5 e0 eb e8 e7 e0 f6 ... ... ........
02f0: e8 e8 20 e4 e5 f2 e0 eb e8 2e 0d 0a 0d 0a c4 eb .. .............
0300: ff 20 f1 ee e7 e4 e0 ed e8 ff 20 ec e5 f2 ee e4 . ........ .....
0310: ee e2 20 ea ee ed f2 e5 ea f1 f2 ed ee e3 ee 20 .. ............
0320: ee e1 fa e5 ea f2 e0 20 e8 f1 ef ee eb fc e7 f3 ....... ........
0330: e9 f2 e5 20 ec e0 ea f0 ee f1 fb 20 e2 20 ee e1 ... ....... . ..
0340: fa ff e2 eb e5 ed e8 e8 20 ea eb e0 f1 f1 e0 3a ........ ......:
0350: 0d 0a 42 4c 5f 50 52 4f 43 20 2d 20 ee e1 fa ff ..BL_PROC - ....
0360: e2 eb ff e5 f2 20 ef f0 ee f6 e5 e4 f3 f0 f3 20 ..... .........
0370: ea ee ed f2 e5 ea f1 f2 e0 0d 0a 42 4c 5f 46 55 ...........BL_FU
0380: 4e 43 20 2d 20 ee e1 fa ff e2 eb ff e5 f2 20 f4 NC - ......... .
0390: f3 ed ea f6 e8 fe 20 ea ee ed f2 e5 ea f1 f2 e0 ...... .........
03a0: 0d 0a 42 4c 5f 50 52 4f 43 5f 57 49 54 48 5f 44 ..BL_PROC_WITH_D
03b0: 45 46 56 41 4c 20 2d 20 ee e1 fa ff e2 eb ff e5 EFVAL - ........
03c0: f2 20 ef f0 ee f6 e5 e4 f3 f0 f3 20 ea ee ed f2 . ......... ....
03d0: e5 ea f1 f2 e0 2c 20 ef f0 e8 ed e8 ec e0 fe f9 ....., .........
03e0: f3 fe 20 ef e0 f0 e0 ec e5 f2 f0 fb 20 ef ee 20 .. ......... ..
03f0: f3 ec ee eb f7 e0 ed e8 fe 0d 0a 42 4c 5f 46 55 ...........BL_FU
0400: 4e 43 5f 57 49 54 48 5f 44 45 46 56 41 4c 20 2d NC_WITH_DEFVAL -
0410: 20 ee e1 fa ff e2 eb ff e5 f2 20 f4 f3 ed ea f6 ......... .....
0420: e8 fe 20 ea ee ed f2 e5 ea f1 f2 e0 2c 20 ef f0 .. ........., ..
0430: e8 ed e8 ec e0 fe f9 f3 fe 20 ef e0 f0 e0 ec e5 ......... ......
0440: f2 f0 fb 20 ef ee 20 f3 ec ee eb f7 e0 ed e8 fe ... .. .........
0450: 0d 0a 0d 0a c2 20 ea e0 f7 e5 f1 f2 e2 e5 20 ef ..... ........ .
0460: e0 f0 e0 ec e5 f2 f0 ee e2 20 fd f2 e8 20 ec e0 ......... ... ..
0470: ea f0 ee f1 fb 20 ef f0 e8 ed e8 ec e0 fe f2 3a ..... .........:
0480: 0d 0a c0 ed e3 eb e8 e9 f1 ea ee e5 c8 ec ff 09 ................
0490: 09 09 2d 20 e7 e0 e4 e0 e5 f2 20 e0 ed e3 eb e8 ..- ...... .....
04a0: e9 f1 ea ee e5 20 e8 ec ff 20 ec e5 f2 ee e4 e0 ..... ... ......
04b0: 20 ea ee ed f2 e5 ea f1 f2 e0 0d 0a 22 d0 f3 f1 ..........."...
04c0: f1 ea ee e5 c8 ec ff 22 09 09 09 2d 20 e7 e0 e4 ......."...- ...
04d0: e0 e5 f2 20 f0 f3 f1 f1 ea ee e5 20 e8 ec ff 20 ... ....... ...
04e0: ec e5 f2 ee e4 e0 20 ea ee ed f2 e5 ea f1 f2 e0 ...... .........
04f0: 0d 0a ca ee eb e8 f7 e5 f1 f2 e2 ee cf e0 f0 e0 ................
0500: ec e5 f2 f0 ee e2 09 2d 20 e7 e0 e4 e0 e5 f2 20 .......- ......
0510: ea ee eb e8 f7 e5 f1 f2 e2 ee 20 ef e0 f0 e0 ec .......... .....
0520: e5 f2 f0 ee e2 20 ec e5 f2 ee e4 e0 0d 0a 0d 0a ..... ..........
0530: c4 e0 ed ed fb e5 20 ec e0 ea f0 ee f1 fb 20 f1 ...... ....... .
0540: ee e7 e4 e0 fe f2 20 ed e5 ee e1 f5 ee e4 e8 ec ...... .........
0550: f3 fe 20 e8 ed f4 f0 e0 f1 f2 f0 f3 ea f2 f3 f0 .. .............
0560: f3 20 e4 eb ff 20 f0 e5 e0 eb e8 e7 e0 f6 e8 e8 . ... ..........
0570: 20 43 42 4c 43 6f 6e 74 65 78 74 2c 20 e8 20 ee CBLContext, . .
0580: e1 fa ff e2 eb ff fe f2 20 ec e5 f2 ee e4 fb 0d ........ .......
0590: 0a 09 69 6e 74 20 c0 ed e3 eb e8 e9 f1 ea ee e5 ..int ..........
05a0: c8 ec ff 28 43 56 61 6c 75 65 2a 2a 20 70 70 50 ...(CValue** ppP
05b0: 61 72 61 6d 73 29 20 e4 eb ff 20 ef f0 ee f6 e5 arams) ... .....
05c0: e4 f3 f0 0d 0a 09 e8 eb e8 0d 0a 09 69 6e 74 20 ............int
05d0: c0 ed e3 eb e8 e9 f1 ea ee e5 c8 ec ff 28 43 56 .............(CV
05e0: 61 6c 75 65 26 20 72 65 74 56 61 6c 2c 20 43 56 alue& retVal, CV
05f0: 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 alue** ppParams)
0600: 20 e4 eb ff 20 f4 f3 ed ea f6 e8 e9 2e 0d 0a d2 ... ...........
0610: ee 20 e5 f1 f2 fc 20 ed e5 ef ee f1 f0 e5 e4 f1 . .... .........
0620: f2 e2 e5 ed ed ee 20 ef ee f1 eb e5 20 ec e0 ea ...... ..... ...
0630: f0 ee f1 e0 20 ec ee e6 ed ee 20 eb e8 e1 ee 20 .... ..... ....
0640: ef ee f1 f2 e0 e2 e8 f2 fc 20 3b 20 e8 20 f0 e5 ......... ; . ..
0650: e0 eb e8 e7 ee e2 e0 f2 fc 20 ec e5 f2 ee e4 20 ......... .....
0660: e2 ed e5 20 ea eb e0 f1 f1 e0 2c 0d 0a eb e8 e1 ... ......,.....
0670: ee 20 f1 f0 e0 e7 f3 20 ed e0 ef e8 f1 e0 f2 fc . ..... ........
0680: 20 f0 e5 e0 eb e8 e7 e0 f6 e8 fe 20 ec e5 f2 ee .......... ....
0690: e4 e0 2e 0d 0a cd e0 ef f0 e8 ec e5 f0 3a 0d 0a .............:..
06a0: 0d 0a 09 2f 2f 20 c2 20 e7 e0 e3 ee eb ee e2 ea ...// . ........
06b0: e5 20 ea eb e0 f1 f1 e0 0d 0a 09 42 4c 5f 50 52 . .........BL_PR
06c0: 4f 43 28 54 65 73 74 2c 20 22 dd f2 ee d2 e5 f1 OC(Test, "......
06d0: f2 22 2c 20 30 29 0d 0a 09 7b 0d 0a 09 09 41 66 .", 0)...{....Af
06e0: 78 4d 65 73 73 61 67 65 42 6f 78 28 22 54 65 73 xMessageBox("Tes
06f0: 74 22 29 3b 0d 0a 09 09 72 65 74 75 72 6e 20 54 t");....return T
0700: 52 55 45 3b 0d 0a 09 7d 0d 0a 0d 0a eb e8 e1 ee RUE;...}........
0710: 20 f2 e0 ea 3a 0d 0a 0d 0a 09 2f 2f 20 c2 20 e7 ...:.....// . .
0720: e0 e3 ee eb ee e2 ea e5 20 ea eb e0 f1 f1 e0 0d ........ .......
0730: 0a 09 42 4c 5f 50 52 4f 43 28 54 65 73 74 2c 20 ..BL_PROC(Test,
0740: 22 dd f2 ee d2 e5 f1 f2 22 2c 20 30 29 3b 0d 0a ".......", 0);..
0750: 0d 0a 2f 2f 20 c2 ed e5 20 ea eb e0 f1 f1 e0 3a ..// ... ......:
0760: 0d 0a 69 6e 74 20 43 4d 79 43 6f 6e 74 65 78 74 ..int CMyContext
0770: 43 6c 61 73 73 3a 3a 54 65 73 74 28 43 56 61 6c Class::Test(CVal
0780: 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 0d 0a ue** ppParams)..
0790: 7b 0d 0a 09 41 66 78 4d 65 73 73 61 67 65 42 6f {...AfxMessageBo
07a0: 78 28 22 54 65 73 74 22 29 3b 0d 0a 09 72 65 74 x("Test");...ret
07b0: 75 72 6e 20 54 52 55 45 3b 0d 0a 7d 0d 0a 0d 0a urn TRUE;..}....
07c0: c4 eb ff 20 ec e5 f2 ee e4 ee e2 2c 20 ef f0 e8 ... ......., ...
07d0: ed e8 ec e0 fe f9 e8 f5 20 e7 ed e0 f7 e5 ed e8 ........ .......
07e0: ff 20 ef ee 20 f3 ec ee eb f7 e0 ed e8 fe 2c 20 . .. .........,
07f0: ed e5 ee e1 f5 ee e4 e8 ec ee 20 ee e1 fa ff e2 .......... .....
0800: e8 f2 fc 20 f4 f3 ed ea f6 e8 fe 20 ea eb e0 f1 ... ....... ....
0810: f1 e0 20 e2 e8 e4 e0 0d 0a 69 6e 74 20 c0 ed e3 .. ......int ...
0820: eb e8 e9 f1 ea ee e5 c8 ec ff 5f 47 65 74 44 65 .........._GetDe
0830: 66 56 61 6c 28 69 6e 74 20 6e 50 61 72 61 6d 2c fVal(int nParam,
0840: 20 43 56 61 6c 75 65 2a 20 70 56 61 6c 29 0d 0a CValue* pVal)..
0850: f7 f2 ee 20 f3 e4 ee e1 ed ee 20 e4 e5 eb e0 f2 ... ...... .....
0860: fc 20 ec e0 ea f0 ee f1 ee ec 0d 0a 0d 0a 20 20 . ............
0870: 42 4c 5f 44 45 46 56 41 4c 5f 46 4f 52 28 c0 ed BL_DEFVAL_FOR(..
0880: e3 eb e8 e9 f1 ea ee e5 c8 ec ff 29 0d 0a 0d 0a ...........)....
0890: 0d 0a c4 eb ff 20 ee e1 fa ff e2 eb e5 ed e8 ff ..... ..........
08a0: 20 f1 e2 ee e9 f1 f2 e2 20 ea ee ed f2 e5 ea f1 ....... .......
08b0: f2 e0 20 e8 f1 ef ee eb fc e7 f3 e9 f2 e5 20 ec .. ........... .
08c0: e0 ea f0 ee f1 fb 3a 0d 0a 0d 0a 42 4c 5f 50 52 ......:....BL_PR
08d0: 4f 50 5f 52 4f 09 2d 20 e7 e0 e4 e0 e5 f2 20 f1 OP_RO.- ...... .
08e0: e2 ee e9 f1 f2 e2 ee 20 f2 ee eb fc ea ee 20 e4 ....... ...... .
08f0: eb ff 20 f7 f2 e5 ed e8 ff 0d 0a 42 4c 5f 50 52 .. ........BL_PR
0900: 4f 50 5f 57 4f 09 2d 20 e7 e0 e4 e0 e5 f2 20 f1 OP_WO.- ...... .
0910: e2 ee e9 f1 f2 e2 ee 20 f2 ee eb fc ea ee 20 e4 ....... ...... .
0920: eb ff 20 e7 e0 ef e8 f1 e8 0d 0a 42 4c 5f 50 52 .. ........BL_PR
0930: 4f 50 5f 52 57 09 2d 20 e7 e0 e4 e0 e5 f2 20 f1 OP_RW.- ...... .
0940: e2 ee e9 f1 f2 e2 ee 20 e4 eb ff 20 f7 f2 e5 ed ....... ... ....
0950: e8 ff 2f e7 e0 ef e8 f1 e8 0d 0a 0d 0a cf e0 f0 ../.............
0960: e0 ec e5 f2 f0 fb 20 ec e0 ea f0 ee f1 ee e2 3a ...... ........:
0970: 0d 0a c0 ed e3 eb e8 e9 f1 ea ee e5 c8 ec ff 09 ................
0980: 2d 20 c7 e0 e4 e0 e5 f2 20 e0 ed e3 eb e8 e9 f1 - ...... .......
0990: ea ee e5 20 e8 ec ff 20 f1 e2 ee e9 f1 f2 e2 e0 ... ... ........
09a0: 0d 0a 22 d0 f3 f1 f1 ea ee e5 c8 ec ff 22 09 2d .."..........".-
09b0: 20 c7 e0 e4 e0 e5 f2 20 f0 f3 f1 f1 ea ee e5 20 ...... .......
09c0: e8 ec ff 20 f1 e2 ee e9 f1 f2 e2 e0 0d 0a 0d 0a ... ............
09d0: cc e0 ea f0 ee f1 fb 20 f1 ee e7 e4 e0 fe f2 20 ....... .......
09e0: e8 ec e5 ed e0 20 ee e1 f0 e0 e1 ee f2 f7 e8 ea ..... ..........
09f0: ee e2 20 f1 e2 ee e9 f1 f2 e2 20 ea e0 ea 0d 0a .. ....... .....
0a00: 69 6e 74 20 47 65 74 5f c0 ed e3 eb e8 e9 f1 ea int Get_........
0a10: ee e5 c8 ec ff 28 43 56 61 6c 75 65 26 20 76 61 .....(CValue& va
0a20: 6c 75 65 29 20 63 6f 6e 73 74 20 2d 20 e4 eb ff lue) const - ...
0a30: 20 f7 f2 e5 ed e8 ff 0d 0a 69 6e 74 20 53 65 74 ........int Set
0a40: 5f c0 ed e3 eb e8 e9 f1 ea ee e5 c8 ec ff 28 43 _.............(C
0a50: 56 61 6c 75 65 20 63 6f 6e 73 74 26 20 76 61 6c Value const& val
0a60: 75 65 29 20 2d 20 e4 eb ff 20 e7 e0 ef e8 f1 e8 ue) - ... ......
0a70: 0d 0a 0d 0a d1 f0 e0 e7 f3 20 ef ee f1 eb e5 20 ......... .....
0a80: ec e0 ea f0 ee f1 e0 20 ec ee e6 ed ee 20 eb e8 ....... ..... ..
0a90: e1 ee 20 ef ee f1 f2 e0 e2 e8 f2 fc 20 3b 20 e8 .. ......... ; .
0aa0: 20 f0 e5 e0 eb e8 e7 ee e2 e0 f2 fc 20 ee e1 f0 ........... ...
0ab0: e0 e1 ee f2 f7 e8 ea 20 e2 ed e5 20 ea eb e0 f1 ....... ... ....
0ac0: f1 e0 2c 0d 0a eb e8 e1 ee 20 f1 f0 e0 e7 f3 20 ..,...... .....
0ad0: ed e0 ef e8 f1 e0 f2 fc 20 f0 e5 e0 eb e8 e7 e0 ........ .......
0ae0: f6 e8 fe 20 ee e1 f0 e0 e1 ee f2 f7 e8 ea e0 20 ... ...........
0af0: 2d 20 e4 eb ff 20 42 4c 5f 50 52 4f 50 5f 52 4f - ... BL_PROP_RO
0b00: 20 e8 20 42 4c 5f 50 52 4f 50 5f 52 57 0d 0a ee . BL_PROP_RW...
0b10: e1 f0 e0 e1 ee f2 f7 e8 ea 20 f7 f2 e5 ed e8 ff ......... ......
0b20: 2c 20 e4 eb ff 20 42 4c 5f 50 52 4f 50 5f 57 4f , ... BL_PROP_WO
0b30: 20 2d 20 ee e1 f0 e0 e1 ee f2 f7 e8 ea 20 e7 e0 - .......... ..
0b40: ef e8 f1 e8 2e 0d 0a cf f0 e8 20 ee e1 fa ff e2 .......... .....
0b50: eb e5 ed e8 e8 20 f1 e2 ee e9 f1 f2 e2 e0 20 e4 ..... ........ .
0b60: eb ff 20 f7 f2 e5 ed e8 ff 2f e7 e0 ef e8 f1 e8 .. ....../......
0b70: 20 e4 eb ff 20 ed e0 ef e8 f1 e0 ed e8 ff 20 ee ... ......... .
0b80: e1 f0 e0 e1 ee f2 f7 e8 ea e0 20 e7 e0 ef e8 f1 .......... .....
0b90: e8 0d 0a e8 f1 ef ee eb fc e7 f3 e9 f2 e5 20 ec .............. .
0ba0: e0 ea f0 ee f1 0d 0a 42 4c 5f 50 52 4f 50 5f 57 .......BL_PROP_W
0bb0: 52 49 54 45 28 c0 ed e3 eb e8 e9 f1 ea ee e5 c8 RITE(...........
0bc0: ec ff 29 0d 0a 0d 0a cf ee f1 eb e5 20 f3 ea e0 ..)......... ...
0bd0: e7 e0 ed e8 ff 20 e2 f1 e5 f5 20 ec e5 f2 ee e4 ..... .... .....
0be0: ee e2 2f f1 e2 ee e9 f1 f2 e2 20 ea ee ed f2 e5 ../....... .....
0bf0: ea f1 f2 e0 2c 20 e2 f1 f2 e0 e2 fc f2 e5 20 ec ...., ........ .
0c00: e0 ea f0 ee f1 0d 0a 0d 0a 20 09 42 4c 5f 45 4e ......... .BL_EN
0c10: 44 5f 43 4f 4e 54 45 58 54 28 29 3b 0d 0a 0d 0a D_CONTEXT();....
0c20: c4 eb ff 20 e0 e2 f2 ee f0 e5 e3 e8 f1 f2 f0 e0 ... ............
0c30: f6 e8 e8 20 e2 e0 f8 e5 e3 ee 20 ea eb e0 f1 f1 ... ...... .....
0c40: e0 20 e4 eb ff 20 d1 ee e7 e4 e0 f2 fc ce e1 fa . ... ..........
0c50: e5 ea f2 2c 20 e2 20 f4 e0 e9 eb e5 20 f0 e5 e0 ..., . ..... ...
0c60: eb e8 e7 e0 f6 e8 e8 0d 0a ea eb e0 f1 f1 e0 20 ...............
0c70: e8 f1 ef ee eb fc e7 f3 e9 f2 e5 20 ec e0 ea f0 ........... ....
0c80: ee f1 3a 0d 0a 0d 0a 20 20 42 4c 5f 49 4e 49 54 ..:.... BL_INIT
0c90: 5f 43 4f 4e 54 45 58 54 28 c8 ec ff c2 e0 f8 e5 _CONTEXT(.......
0ca0: e3 ee ca eb e0 f1 f1 e0 29 3b 0d 0a 0d 0a 20 cf ........);.... .
0cb0: f0 e8 ec e5 f0 20 ea eb e0 f1 f1 e0 3a 0d 0a 2f ..... ......:../
0cc0: 2f 20 f4 e0 e9 eb 20 2e 68 0d 0a 0d 0a 63 6c 61 / .... .h....cla
0cd0: 73 73 20 43 54 65 73 74 42 4c 20 3a 20 70 75 62 ss CTestBL : pub
0ce0: 6c 69 63 20 43 43 6f 6e 74 65 78 74 49 6d 70 6c lic CContextImpl
0cf0: 3c 43 54 65 73 74 42 4c 3e 0d 0a 7b 0d 0a 70 75 <CTestBL>..{..pu
0d00: 62 6c 69 63 3a 0d 0a 09 42 4c 5f 42 45 47 49 4e blic:...BL_BEGIN
0d10: 5f 43 4f 4e 54 45 58 54 28 22 54 65 73 74 42 4c _CONTEXT("TestBL
0d20: 22 2c 20 22 d2 e5 f1 f2 ca ee ed f2 e5 ea f1 f2 ", "............
0d30: 22 29 3b 0d 0a 0d 0a 09 42 4c 5f 50 52 4f 43 28 ");.....BL_PROC(
0d40: 54 65 73 74 2c 20 22 d2 e5 f1 f2 22 2c 20 30 29 Test, "....", 0)
0d50: 3b 0d 0a 0d 0a 09 6c 6f 6e 67 20 6d 5f 61 3b 0d ;.....long m_a;.
0d60: 0a 0d 0a 09 42 4c 5f 50 52 4f 43 28 44 6f 42 6f ....BL_PROC(DoBo
0d70: 78 2c 20 22 cf ee ea e0 e7 e0 f2 fc 22 2c 20 30 x, "........", 0
0d80: 29 0d 0a 09 7b 0d 0a 09 09 41 66 78 4d 65 73 73 )...{....AfxMess
0d90: 61 67 65 42 6f 78 28 22 44 6f 42 6f 78 22 29 3b ageBox("DoBox");
0da0: 0d 0a 09 09 72 65 74 75 72 6e 20 54 52 55 45 3b ....return TRUE;
0db0: 0d 0a 09 7d 0d 0a 0d 0a 09 42 4c 5f 46 55 4e 43 ...}.....BL_FUNC
0dc0: 28 53 6f 6d 65 46 75 6e 63 2c 20 22 cf f0 ee e2 (SomeFunc, "....
0dd0: e5 f0 ea e0 22 2c 20 30 29 0d 0a 09 7b 0d 0a 09 ....", 0)...{...
0de0: 09 72 65 74 56 61 6c 3d 31 3b 0d 0a 09 09 72 65 .retVal=1;....re
0df0: 74 75 72 6e 20 54 52 55 45 3b 0d 0a 09 7d 0d 0a turn TRUE;...}..
0e00: 0d 0a 09 42 4c 5f 50 52 4f 43 5f 57 49 54 48 5f ...BL_PROC_WITH_
0e10: 44 45 46 56 41 4c 28 44 65 66 54 65 73 74 2c 20 DEFVAL(DefTest,
0e20: 22 d1 d3 ec ee eb f7 e0 ed e8 e5 ec 22 2c 20 31 "...........", 1
0e30: 29 0d 0a 09 7b 0d 0a 09 09 43 53 74 72 69 6e 67 )...{....CString
0e40: 20 74 78 74 3d 70 70 50 61 72 61 6d 73 5b 30 5d txt=ppParams[0]
0e50: 2d 3e 47 65 74 53 74 72 69 6e 67 28 29 3b 0d 0a ->GetString();..
0e60: 09 09 69 66 28 21 74 78 74 2e 49 73 45 6d 70 74 ..if(!txt.IsEmpt
0e70: 79 28 29 29 0d 0a 09 09 09 41 66 78 4d 65 73 73 y()).....AfxMess
0e80: 61 67 65 42 6f 78 28 74 78 74 29 3b 0d 0a 09 09 ageBox(txt);....
0e90: 72 65 74 75 72 6e 20 54 52 55 45 3b 0d 0a 09 7d return TRUE;...}
0ea0: 0d 0a 09 42 4c 5f 44 45 46 56 41 4c 5f 46 4f 52 ...BL_DEFVAL_FOR
0eb0: 28 44 65 66 54 65 73 74 29 0d 0a 09 7b 0d 0a 09 (DefTest)...{...
0ec0: 09 69 66 28 6e 50 61 72 61 6d 3d 3d 30 29 0d 0a .if(nParam==0)..
0ed0: 09 09 7b 0d 0a 09 09 09 69 66 28 70 56 61 6c 75 ..{.....if(pValu
0ee0: 65 29 0d 0a 09 09 09 09 2a 70 56 61 6c 75 65 3d e)......*pValue=
0ef0: 22 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 21 21 22 "Hello World!!!"
0f00: 3b 0d 0a 09 09 09 72 65 74 75 72 6e 20 54 52 55 ;.....return TRU
0f10: 45 3b 0d 0a 09 09 7d 0d 0a 09 09 72 65 74 75 72 E;....}....retur
0f20: 6e 20 46 41 4c 53 45 3b 0d 0a 09 7d 0d 0a 0d 0a n FALSE;...}....
0f30: 09 42 4c 5f 50 52 4f 50 5f 52 4f 28 53 6f 6d 65 .BL_PROP_RO(Some
0f40: 50 72 6f 70 2c 20 22 cd e5 f7 f2 ee 22 29 0d 0a Prop, ".....")..
0f50: 09 7b 0d 0a 09 09 76 61 6c 75 65 3d 22 54 65 73 .{....value="Tes
0f60: 74 20 6f 66 20 53 6f 6d 65 20 50 72 6f 70 22 3b t of Some Prop";
0f70: 0d 0a 09 09 72 65 74 75 72 6e 20 54 52 55 45 3b ....return TRUE;
0f80: 0d 0a 09 7d 0d 0a 09 42 4c 5f 50 52 4f 50 5f 57 ...}...BL_PROP_W
0f90: 4f 28 53 6f 6d 65 57 72 69 74 65 2c 20 22 d2 ee O(SomeWrite, "..
0fa0: eb fc ea ee c7 e0 ef e8 f1 fc 22 29 0d 0a 09 7b ..........")...{
0fb0: 0d 0a 09 09 72 65 74 75 72 6e 20 54 52 55 45 3b ....return TRUE;
0fc0: 0d 0a 09 7d 0d 0a 0d 0a 09 42 4c 5f 50 52 4f 50 ...}.....BL_PROP
0fd0: 5f 52 57 28 52 65 61 64 57 72 69 74 65 2c 20 22 _RW(ReadWrite, "
0fe0: cf e8 f8 e8 d7 e8 f2 e0 e9 22 29 0d 0a 09 7b 0d .........")...{.
0ff0: 0a 09 09 76 61 6c 75 65 3d 6d 5f 61 3b 0d 0a 09 ...value=m_a;...
1000: 09 72 65 74 75 72 6e 20 54 52 55 45 3b 0d 0a 09 .return TRUE;...
1010: 7d 0d 0a 09 42 4c 5f 50 52 4f 50 5f 57 52 49 54 }...BL_PROP_WRIT
1020: 45 28 52 65 61 64 57 72 69 74 65 29 0d 0a 09 7b E(ReadWrite)...{
1030: 0d 0a 09 09 6d 5f 61 3d 76 61 6c 75 65 2e 47 65 ....m_a=value.Ge
1040: 74 4e 75 6d 65 72 69 63 28 29 3b 0d 0a 09 09 72 tNumeric();....r
1050: 65 74 75 72 6e 20 54 52 55 45 3b 0d 0a 09 7d 0d eturn TRUE;...}.
1060: 0a 0d 0a 09 42 4c 5f 45 4e 44 5f 43 4f 4e 54 45 ....BL_END_CONTE
1070: 58 54 28 29 3b 0d 0a 7d 3b 0d 0a 2e 2e 2e 2e 20 XT();..};......
1080: 0d 0a 0d 0a 2f 2f f4 e0 e9 eb 20 2e 63 70 70 0d ....//.... .cpp.
1090: 0a 42 4c 5f 49 4e 49 54 5f 43 4f 4e 54 45 58 54 .BL_INIT_CONTEXT
10a0: 28 43 54 65 73 74 42 4c 29 3b 0d 0a 0d 0a 69 6e (CTestBL);....in
10b0: 74 20 43 54 65 73 74 42 4c 3a 3a 54 65 73 74 28 t CTestBL::Test(
10c0: 43 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d CValue** ppParam
10d0: 73 29 0d 0a 7b 0d 0a 09 41 66 78 4d 65 73 73 61 s)..{...AfxMessa
10e0: 67 65 42 6f 78 28 22 54 65 73 74 22 29 3b 0d 0a geBox("Test");..
10f0: 09 72 65 74 75 72 6e 20 54 52 55 45 3b 0d 0a 7d .return TRUE;..}
1100: 0d 0a 0d 0a c4 eb ff 20 e8 ed e8 f6 e8 e0 eb e8 ....... ........
1110: e7 e0 f6 e8 e8 20 e8 20 f0 e5 e3 e8 f1 f2 f0 e0 ..... . ........
1120: f6 e8 e8 20 e2 f1 e5 f5 20 ea eb e0 f1 f1 ee e2 ... .... .......
1130: 20 ea ee ed f2 e5 ea f1 f2 e0 0d 0a ef f0 e8 20 ..............
1140: e8 ed e8 f6 e8 e0 eb e8 e7 e0 f6 e8 e8 20 ea ee ............. ..
1150: ec ef ee ed e5 ed f2 fb 20 e2 fb e7 ee e2 e8 f2 ........ .......
1160: e5 20 ec e5 f2 ee e4 3a 0d 0a 20 20 63 6f 6e 74 . .....:.. cont
1170: 65 78 74 5f 6f 62 6a 3a 3a 43 43 6f 6e 74 65 78 ext_obj::CContex
1180: 74 42 61 73 65 3a 3a 49 6e 69 74 41 6c 6c 43 6f tBase::InitAllCo
1190: 6e 74 65 78 74 43 6c 61 73 73 65 73 28 29 3b 0d ntextClasses();.
11a0: 0a 0d 0a cf f0 e8 20 e2 fb e3 f0 f3 e7 ea e5 20 ...... ........
11b0: ea ee ec ef ee ed e5 ed f2 fb 20 e2 fb e7 ee e2 .......... .....
11c0: e8 f2 e5 20 ec e5 f2 ee e4 3a 0d 0a 20 20 63 6f ... .....:.. co
11d0: 6e 74 65 78 74 5f 6f 62 6a 3a 3a 43 43 6f 6e 74 ntext_obj::CCont
11e0: 65 78 74 42 61 73 65 3a 3a 44 6f 6e 65 41 6c 6c extBase::DoneAll
11f0: 43 6f 6e 74 65 78 74 43 6c 61 73 73 65 73 28 29 ContextClasses()
1200: 0d 0a 2a 2f 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 ..*/....namespac
1210: 65 20 63 6f 6e 74 65 78 74 5f 6f 62 6a 7b 0d 0a e context_obj{..
1220: 2f 2f 20 ce f1 ed ee e2 ed ee e9 20 ff e7 fb ea // ........ ....
1230: 20 ea ee ed f4 e8 e3 f3 f0 e0 f6 e8 e8 0d 0a 69 ..............i
1240: 6e 74 20 5f 5f 64 65 63 6c 73 70 65 63 28 73 65 nt __declspec(se
1250: 6c 65 63 74 61 6e 79 29 20 64 65 66 4c 61 6e 67 lectany) defLang
1260: 3d 30 3b 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 =0;....namespace
1270: 20 73 74 72 5f 66 69 6e 64 7b 0d 0a 2f 2f 20 d2 str_find{..// .
1280: e0 e1 eb e8 f6 e0 20 ed e8 e6 ed e5 f0 e5 e3 e8 ...... .........
1290: f1 f2 f0 ee e2 fb f5 20 f1 e8 ec e2 ee eb ee e2 ....... ........
12a0: 0d 0a 44 57 4f 52 44 20 5f 5f 64 65 63 6c 73 70 ..DWORD __declsp
12b0: 65 63 28 73 65 6c 65 63 74 61 6e 79 29 20 6c 6f ec(selectany) lo
12c0: 74 61 62 6c 65 5b 32 35 36 5d 3d 7b 30 7d 3b 0d table[256]={0};.
12d0: 0a 7d 2f 2f 6e 61 6d 65 73 70 61 63 65 20 73 74 .}//namespace st
12e0: 72 5f 66 69 6e 64 0d 0a 0d 0a 2f 2f 20 c7 e0 f0 r_find....// ...
12f0: e0 ed e5 e5 20 ee e1 fa ff e2 e8 ec 20 ed f3 e6 .... ....... ...
1300: ed fb e5 20 f1 e5 e3 ec e5 ed f2 fb 0d 0a 23 70 ... ..........#p
1310: 72 61 67 6d 61 20 64 61 74 61 5f 73 65 67 28 22 ragma data_seg("
1320: 2e 62 6c 63 24 61 22 29 0d 0a 23 70 72 61 67 6d .blc$a")..#pragm
1330: 61 20 64 61 74 61 5f 73 65 67 28 22 2e 62 6c 63 a data_seg(".blc
1340: 24 62 22 29 0d 0a 23 70 72 61 67 6d 61 20 64 61 $b")..#pragma da
1350: 74 61 5f 73 65 67 28 22 2e 62 6c 63 24 63 22 29 ta_seg(".blc$c")
1360: 0d 0a 23 70 72 61 67 6d 61 20 64 61 74 61 5f 73 ..#pragma data_s
1370: 65 67 28 22 2e 62 6c 63 24 64 22 29 0d 0a 23 70 eg(".blc$d")..#p
1380: 72 61 67 6d 61 20 64 61 74 61 5f 73 65 67 28 22 ragma data_seg("
1390: 2e 62 6c 63 24 65 22 29 0d 0a 23 70 72 61 67 6d .blc$e")..#pragm
13a0: 61 20 64 61 74 61 5f 73 65 67 28 29 0d 0a 2f 2f a data_seg()..//
13b0: 20 d3 ea e0 e6 e5 ec 20 eb e8 ed ea e5 f0 f3 20 ...... .......
13c0: e2 20 ea ee ed e5 f7 ed ee ec 20 f4 e0 e9 eb e5 . ........ .....
13d0: 20 f1 eb e8 f2 fc 20 f1 e5 e3 ec e5 ed f2 fb 20 ..... ........
13e0: 2e 62 6c 63 20 e8 20 2e 64 61 74 61 0d 0a 23 70 .blc . .data..#p
13f0: 72 61 67 6d 61 20 63 6f 6d 6d 65 6e 74 28 6c 69 ragma comment(li
1400: 6e 6b 65 72 2c 20 22 2f 4d 45 52 47 45 3a 2e 62 nker, "/MERGE:.b
1410: 6c 63 3d 2e 64 61 74 61 22 29 0d 0a 0d 0a 74 79 lc=.data")....ty
1420: 70 65 64 65 66 20 76 6f 69 64 20 28 2a 50 5f 56 pedef void (*P_V
1430: 56 29 28 29 3b 0d 0a 0d 0a 5f 5f 64 65 63 6c 73 V)();....__decls
1440: 70 65 63 20 28 61 6c 6c 6f 63 61 74 65 28 22 2e pec (allocate(".
1450: 62 6c 63 24 61 22 29 29 20 50 5f 56 56 20 5f 5f blc$a")) P_VV __
1460: 64 65 63 6c 73 70 65 63 28 73 65 6c 65 63 74 61 declspec(selecta
1470: 6e 79 29 20 70 42 4c 49 6e 69 74 3d 4e 55 4c 4c ny) pBLInit=NULL
1480: 3b 0d 0a 5f 5f 64 65 63 6c 73 70 65 63 20 28 61 ;..__declspec (a
1490: 6c 6c 6f 63 61 74 65 28 22 2e 62 6c 63 24 63 22 llocate(".blc$c"
14a0: 29 29 20 50 5f 56 56 20 5f 5f 64 65 63 6c 73 70 )) P_VV __declsp
14b0: 65 63 28 73 65 6c 65 63 74 61 6e 79 29 20 70 42 ec(selectany) pB
14c0: 4c 49 6e 69 74 44 6f 6e 65 3d 4e 55 4c 4c 3b 0d LInitDone=NULL;.
14d0: 0a 5f 5f 64 65 63 6c 73 70 65 63 20 28 61 6c 6c .__declspec (all
14e0: 6f 63 61 74 65 28 22 2e 62 6c 63 24 65 22 29 29 ocate(".blc$e"))
14f0: 20 50 5f 56 56 20 5f 5f 64 65 63 6c 73 70 65 63 P_VV __declspec
1500: 28 73 65 6c 65 63 74 61 6e 79 29 20 70 42 4c 44 (selectany) pBLD
1510: 6f 6e 65 3d 4e 55 4c 4c 3b 0d 0a 0d 0a 2f 2f 20 one=NULL;....//
1520: c1 e0 e7 ee e2 e0 ff 20 f0 e5 e0 eb e8 e7 e0 f6 ....... ........
1530: e8 ff 20 ec e5 f2 ee e4 ee e2 2c 20 ef f0 e0 ea .. ......., ....
1540: f2 e8 f7 e5 f1 ea e8 20 e2 f1 e5 e3 e4 e0 20 ee ....... ...... .
1550: e4 e8 ed e0 ea ee e2 ee 20 f0 e5 e0 eb e8 e7 f3 ........ .......
1560: e5 ec fb f5 0d 0a 63 6c 61 73 73 20 43 43 6f 6e ......class CCon
1570: 74 65 78 74 42 61 73 65 20 3a 20 70 75 62 6c 69 textBase : publi
1580: 63 20 43 42 4c 43 6f 6e 74 65 78 74 0d 0a 7b 0d c CBLContext..{.
1590: 0a 70 75 62 6c 69 63 3a 0d 0a 09 43 43 6f 6e 74 .public:...CCont
15a0: 65 78 74 42 61 73 65 28 29 3a 43 42 4c 43 6f 6e extBase():CBLCon
15b0: 74 65 78 74 28 29 7b 7d 0d 0a 09 76 69 72 74 75 text(){}...virtu
15c0: 61 6c 20 63 68 61 72 20 63 6f 6e 73 74 2a 20 20 al char const*
15d0: 47 65 74 43 6f 64 65 28 76 6f 69 64 29 63 6f 6e GetCode(void)con
15e0: 73 74 09 09 7b 72 65 74 75 72 6e 20 4e 55 4c 4c st..{return NULL
15f0: 3b 7d 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 ;}...virtual int
1600: 20 20 47 65 74 44 65 73 74 72 6f 79 55 6e 52 65 GetDestroyUnRe
1610: 66 64 28 76 6f 69 64 29 63 6f 6e 73 74 09 7b 72 fd(void)const.{r
1620: 65 74 75 72 6e 20 54 52 55 45 3b 7d 0d 0a 09 76 eturn TRUE;}...v
1630: 69 72 74 75 61 6c 20 43 4f 62 6a 49 44 20 47 65 irtual CObjID Ge
1640: 74 49 44 28 76 6f 69 64 29 63 6f 6e 73 74 09 09 tID(void)const..
1650: 09 09 7b 72 65 74 75 72 6e 20 43 4f 62 6a 49 44 ..{return CObjID
1660: 28 29 3b 7d 0d 0a 09 76 69 72 74 75 61 6c 20 6c ();}...virtual l
1670: 6f 6e 67 20 20 47 65 74 54 79 70 65 49 44 28 76 ong GetTypeID(v
1680: 6f 69 64 29 63 6f 6e 73 74 09 09 09 7b 72 65 74 oid)const...{ret
1690: 75 72 6e 20 31 30 30 3b 7d 0d 0a 09 76 69 72 74 urn 100;}...virt
16a0: 75 61 6c 20 43 54 79 70 65 20 47 65 74 56 61 6c ual CType GetVal
16b0: 75 65 54 79 70 65 28 76 6f 69 64 29 63 6f 6e 73 ueType(void)cons
16c0: 74 09 09 7b 72 65 74 75 72 6e 20 43 54 79 70 65 t..{return CType
16d0: 28 31 30 30 29 3b 7d 0d 0a 09 76 69 72 74 75 61 (100);}...virtua
16e0: 6c 20 69 6e 74 20 20 49 73 45 78 61 63 74 56 61 l int IsExactVa
16f0: 6c 75 65 28 76 6f 69 64 29 63 6f 6e 73 74 09 09 lue(void)const..
1700: 7b 72 65 74 75 72 6e 20 54 52 55 45 3b 7d 0d 0a {return TRUE;}..
1710: 09 76 69 72 74 75 61 6c 20 69 6e 74 20 20 49 73 .virtual int Is
1720: 4f 6c 65 43 6f 6e 74 65 78 74 28 76 6f 69 64 29 OleContext(void)
1730: 63 6f 6e 73 74 09 09 7b 72 65 74 75 72 6e 20 46 const..{return F
1740: 41 4c 53 45 3b 7d 0d 0a 09 76 69 72 74 75 61 6c ALSE;}...virtual
1750: 20 69 6e 74 20 20 49 73 53 65 72 69 61 6c 69 7a int IsSerializ
1760: 61 62 6c 65 28 76 6f 69 64 29 09 09 09 7b 72 65 able(void)...{re
1770: 74 75 72 6e 20 46 41 4c 53 45 3b 7d 0d 0a 09 76 turn FALSE;}...v
1780: 69 72 74 75 61 6c 20 69 6e 74 20 20 53 61 76 65 irtual int Save
1790: 54 6f 53 74 72 69 6e 67 28 43 53 74 72 69 6e 67 ToString(CString
17a0: 20 26 29 09 09 7b 72 65 74 75 72 6e 20 46 41 4c &)..{return FAL
17b0: 53 45 3b 7d 0d 0a 09 76 69 72 74 75 61 6c 20 76 SE;}...virtual v
17c0: 6f 69 64 20 49 6e 69 74 4f 62 6a 65 63 74 28 43 oid InitObject(C
17d0: 54 79 70 65 20 63 6f 6e 73 74 20 26 74 29 09 09 Type const &t)..
17e0: 7b 7d 0d 0a 09 76 69 72 74 75 61 6c 20 76 6f 69 {}...virtual voi
17f0: 64 20 49 6e 69 74 4f 62 6a 65 63 74 28 4c 50 43 d InitObject(LPC
1800: 53 54 52 20 6c 70 4e 61 6d 65 29 09 09 7b 7d 0d STR lpName)..{}.
1810: 0a 09 0d 0a 0d 0a 09 73 74 61 74 69 63 20 76 6f .......static vo
1820: 69 64 20 49 6e 69 74 41 6c 6c 43 6f 6e 74 65 78 id InitAllContex
1830: 74 43 6c 61 73 73 65 73 28 29 0d 0a 09 7b 0d 0a tClasses()...{..
1840: 09 09 64 65 66 4c 61 6e 67 3d 47 65 74 4d 65 74 ..defLang=GetMet
1850: 61 44 61 74 61 28 29 2d 3e 47 65 74 54 61 73 6b aData()->GetTask
1860: 44 65 66 28 29 2d 3e 47 65 74 44 65 66 61 75 6c Def()->GetDefaul
1870: 74 4c 61 6e 67 75 61 67 65 28 29 3b 0d 0a 09 09 tLanguage();....
1880: 66 6f 72 28 69 6e 74 20 69 3d 30 3b 69 3c 32 35 for(int i=0;i<25
1890: 36 3b 69 2b 2b 29 0d 0a 09 09 09 73 74 72 5f 66 6;i++).....str_f
18a0: 69 6e 64 3a 3a 6c 6f 74 61 62 6c 65 5b 69 5d 3d ind::lotable[i]=
18b0: 28 44 57 4f 52 44 29 43 68 61 72 4c 6f 77 65 72 (DWORD)CharLower
18c0: 28 28 4c 50 53 54 52 29 69 29 3b 0d 0a 09 09 66 ((LPSTR)i);....f
18d0: 6f 72 28 50 5f 56 56 2a 20 70 70 49 6e 69 74 3d or(P_VV* ppInit=
18e0: 26 70 42 4c 49 6e 69 74 2b 31 3b 70 70 49 6e 69 &pBLInit+1;ppIni
18f0: 74 3c 26 70 42 4c 49 6e 69 74 44 6f 6e 65 3b 70 t<&pBLInitDone;p
1900: 70 49 6e 69 74 2b 2b 29 0d 0a 09 09 09 69 66 28 pInit++).....if(
1910: 2a 70 70 49 6e 69 74 29 0d 0a 09 09 09 09 28 2a *ppInit)......(*
1920: 70 70 49 6e 69 74 29 28 29 3b 0d 0a 09 7d 0d 0a ppInit)();...}..
1930: 0d 0a 09 73 74 61 74 69 63 20 76 6f 69 64 20 44 ...static void D
1940: 6f 6e 65 41 6c 6c 43 6f 6e 74 65 78 74 43 6c 61 oneAllContextCla
1950: 73 73 65 73 28 29 0d 0a 09 7b 0d 0a 09 09 66 6f sses()...{....fo
1960: 72 28 50 5f 56 56 2a 20 70 70 44 6f 6e 65 3d 26 r(P_VV* ppDone=&
1970: 70 42 4c 49 6e 69 74 44 6f 6e 65 2b 31 3b 70 70 pBLInitDone+1;pp
1980: 44 6f 6e 65 3c 26 70 42 4c 44 6f 6e 65 3b 70 70 Done<&pBLDone;pp
1990: 44 6f 6e 65 2b 2b 29 0d 0a 09 09 09 69 66 28 2a Done++).....if(*
19a0: 70 70 44 6f 6e 65 29 0d 0a 09 09 09 09 28 2a 70 ppDone)......(*p
19b0: 70 44 6f 6e 65 29 28 29 3b 0d 0a 09 7d 0d 0a 7d pDone)();...}..}
19c0: 3b 0d 0a 0d 0a 2f 2a 0d 0a ce ef e8 f1 e0 ed e8 ;..../*.........
19d0: e5 20 ec e5 f5 e0 ed e8 e7 ec e0 20 f0 e5 e0 eb . ......... ....
19e0: e8 e7 e0 f6 e8 e8 2e 0d 0a d1 e4 e5 eb e0 ed e0 ................
19f0: 20 ed e0 20 ee f1 ed ee e2 e5 20 e1 e0 e7 ee e2 .. ...... .....
1a00: ee e3 ee 20 f8 e0 e1 eb ee ed ed ee e3 ee 20 ea ... .......... .
1a10: eb e0 f1 f1 e0 2c 20 e2 20 ea ee f2 ee f0 ee ec ....., . .......
1a20: 20 ef e0 f0 e0 ec e5 f2 f0 ee ec 20 f8 e0 e1 eb .......... ....
1a30: ee ed e0 0d 0a e7 e0 e4 e0 e5 f2 f1 ff 20 ea ee ............. ..
1a40: ed e5 f7 ed fb e9 20 ea eb e0 f1 f1 2c 20 e4 eb ...... ....., ..
1a50: ff 20 e8 f1 ef ee eb fc e7 ee e2 e0 ed e8 ff 20 . .............
1a60: f1 f2 e0 f2 e8 f7 e5 f1 ea ee e3 ee 20 ef ee eb ............ ...
1a70: e8 ec ee f0 f4 e8 e7 ec e0 2e 0d 0a 0d 0a ca e0 ................
1a80: e6 e4 fb e9 20 ec e5 f2 ee e4 2f f1 e2 ee e9 f1 .... ...../.....
1a90: f2 e2 ee 20 ee ef e8 f1 fb e2 e0 e5 f2 f1 ff 20 ... ...........
1aa0: ed ee e2 fb ec 20 f2 e8 ef ee ec 2c 20 e2 fb ef ..... ....., ...
1ab0: ee eb ed ff f9 e8 ec 20 ee ef f0 e5 e4 e5 eb e5 ....... ........
1ac0: ed ed fb e5 20 f2 f0 e5 e1 ee e2 e0 ed e8 ff 2e .... ...........
1ad0: 0d 0a c8 20 e4 eb ff 20 ec e5 f2 ee e4 ee e2 2c ... ... .......,
1ae0: 20 e8 20 e4 eb ff 20 f1 e2 ee e9 f1 f2 e2 20 fd . ... ....... .
1af0: f2 e8 20 f2 f0 e5 e1 ee e2 e0 ed e8 ff 20 f2 e0 .. .......... ..
1b00: ea ee e2 fb 3a 0d 0a 2d 20 ca e0 e6 e4 fb e9 20 ....:..- ......
1b10: f2 e8 ef 20 e4 ee eb e6 e5 ed 20 e8 ec e5 f2 fc ... ...... .....
1b20: 20 f1 f1 fb eb ea f3 20 70 72 65 76 20 ed e0 20 ...... prev ..
1b30: f2 e8 ef 20 ef f0 e5 e4 fb e4 f3 f9 e5 e3 ee 20 ... ...........
1b40: ec e5 f2 ee e4 e0 2f f1 e2 ee e9 f1 f2 e2 e0 3a ....../........:
1b50: 0d 0a 09 74 79 70 65 64 65 66 20 cf f0 e5 e4 fb ...typedef .....
1b60: e4 f3 f9 e8 e9 d2 e8 ef 20 70 72 65 76 3b 0d 0a ........ prev;..
1b70: 2d 20 ca e0 e6 e4 fb e9 20 f2 e8 ef 20 e4 ee eb - ...... ... ...
1b80: e6 e5 ed 20 e8 ec e5 f2 fc 20 ef e5 f0 e5 f7 e8 ... ..... ......
1b90: f1 eb e5 ed e8 e5 20 76 61 6c 2c 20 f0 e0 e2 ed ...... val, ....
1ba0: ee e5 20 76 61 6c 20 ef f0 e5 e4 fb e4 f3 f9 e5 .. val .........
1bb0: e3 ee 20 f2 e8 ef e0 20 ef eb fe f1 20 31 3a 0d .. .... .... 1:.
1bc0: 0a 09 65 6e 75 6d 7b 76 61 6c 3d 70 72 65 76 3a ..enum{val=prev:
1bd0: 3a 76 61 6c 2b 31 7d 3b 0d 0a 2d 20 ca e0 e6 e4 :val+1};..- ....
1be0: fb e9 20 f2 e8 ef 20 e4 ee eb e6 e5 ed 20 e8 ec .. ... ...... ..
1bf0: e5 f2 fc 20 ec e5 f2 ee e4 fb 3a 0d 0a 09 73 74 ... ......:...st
1c00: 61 74 69 63 20 4c 50 43 53 54 52 20 47 65 74 52 atic LPCSTR GetR
1c10: 75 73 4e 61 6d 65 28 29 3b 20 2f 2f 20 e2 ee e7 usName(); // ...
1c20: e2 f0 e0 f9 e0 e5 f2 20 f0 f3 f1 f1 ea ee e5 20 ....... .......
1c30: e8 ec ff 20 ec e5 f2 ee e4 e0 2f f1 e2 ee e9 f1 ... ....../.....
1c40: f2 e2 e0 0d 0a 09 73 74 61 74 69 63 20 4c 50 43 ......static LPC
1c50: 53 54 52 20 47 65 74 45 6e 67 4e 61 6d 65 28 29 STR GetEngName()
1c60: 3b 20 2f 2f 20 e2 ee e7 e2 f0 e0 f9 e0 e5 f2 20 ; // ..........
1c70: e0 ed e3 eb e8 e9 f1 ea ee e5 20 e8 ec ff 20 ec .......... ... .
1c80: e5 f2 ee e4 e0 2f f1 e2 ee e9 f1 f2 e2 e0 0d 0a ...../..........
1c90: 0d 0a c4 eb ff 20 ee ef e8 f1 e0 ed e8 e9 20 ec ..... ........ .
1ca0: e5 f2 ee e4 ee e2 20 f2 e8 ef 20 ea f0 ee ec e5 ...... ... .....
1cb0: 20 fd f2 ee e3 ee 20 e4 ee eb e6 e5 ed 20 e8 ec ..... ...... ..
1cc0: e5 f2 fc 3a 0d 0a 2d 20 ef e5 f0 e5 f7 e8 f1 eb ...:..- ........
1cd0: e5 ed e8 e5 20 49 73 46 75 6e 63 20 3d 20 30 20 .... IsFunc = 0
1ce0: 7c 20 31 2c 20 ef ee ea e0 e7 fb e2 e0 e5 f2 2c | 1, ..........,
1cf0: 20 ef f0 ee f6 e5 e4 f3 f0 e0 20 fd f2 ee 20 e8 ......... ... .
1d00: eb e8 20 f4 f3 ed ea f6 e8 ff 2e 0d 0a 2d 20 ef .. ..........- .
1d10: e5 f0 e5 f7 e8 f1 eb e5 ed e8 e5 20 49 73 44 65 ........... IsDe
1d20: 66 56 61 6c 20 3d 20 30 20 7c 20 31 2c 20 ef ee fVal = 0 | 1, ..
1d30: ea e0 e7 fb e2 e0 e5 f2 2c 20 e5 f1 f2 fc 20 eb ........, .... .
1d40: e8 20 f3 20 ec e5 f2 ee e4 e0 20 ef e0 f0 e0 ec . . ...... .....
1d50: e5 f2 f0 fb 20 ef ee 20 f3 ec ee eb f7 e0 ed e8 .... .. ........
1d60: fe 2e 0d 0a 2d 20 ef e5 f0 e5 f7 e8 f1 eb e5 ed ....- ..........
1d70: e8 e5 20 6e 50 61 72 61 6d 2c 20 ef ee ea e0 e7 .. nParam, .....
1d80: fb e2 e0 e5 f2 2c 20 f1 ea ee eb fc ea ee 20 ef ....., ....... .
1d90: e0 f0 e0 ec e5 f2 f0 ee e2 20 f3 20 ec e5 f2 ee ......... . ....
1da0: e4 e0 2e 0d 0a 2d 20 ec e5 f2 ee e4 fb 3a 0d 0a .....- ......:..
1db0: 09 73 74 61 74 69 63 20 69 6e 74 20 43 61 6c 6c .static int Call
1dc0: 50 72 6f 63 28 54 2a 20 70 74 72 2c 20 43 56 61 Proc(T* ptr, CVa
1dd0: 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 3b lue** ppParams);
1de0: 09 09 09 09 09 09 2f 2f 20 c2 fb e7 ee e2 20 ea ......// ..... .
1df0: e0 ea 20 ef f0 ee f6 e5 e4 f3 f0 fb 0d 0a 09 73 .. ............s
1e00: 74 61 74 69 63 20 69 6e 74 20 43 61 6c 6c 46 75 tatic int CallFu
1e10: 6e 63 28 54 2a 20 70 74 72 2c 20 43 56 61 6c 75 nc(T* ptr, CValu
1e20: 65 26 20 72 65 74 56 61 6c 2c 20 43 56 61 6c 75 e& retVal, CValu
1e30: 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 3b 09 09 e** ppParams);..
1e40: 2f 2f 20 c2 fb e7 ee e2 20 ea e0 ea 20 f4 f3 ed // ..... ... ...
1e50: ea f6 e8 e8 0d 0a 09 73 74 61 74 69 63 20 69 6e .......static in
1e60: 74 20 47 65 74 44 65 66 56 61 6c 28 63 6f 6e 73 t GetDefVal(cons
1e70: 74 20 54 2a 20 70 74 72 2c 20 69 6e 74 20 6e 50 t T* ptr, int nP
1e80: 61 72 61 6d 2c 20 43 56 61 6c 75 65 2a 20 70 50 aram, CValue* pP
1e90: 61 72 61 6d 29 3b 09 09 2f 2f 20 cf ee eb f3 f7 aram);..// .....
1ea0: e8 f2 fc 20 ef e0 f0 e0 ec e5 f2 f0 20 ef ee 20 ... ........ ..
1eb0: f3 ec ee eb f7 e0 ed e8 fe 0d 0a 0d 0a c4 eb ff ................
1ec0: 20 ee ef e8 f1 e0 ed e8 e9 20 ef e0 f0 e0 ec e5 ........ ......
1ed0: f2 f0 ee e2 20 f2 e8 ef 20 e4 ee eb e6 e5 ed 20 .... ... ......
1ee0: e8 ec e5 f2 fc 3a 0d 0a 2d 20 ef e5 f0 e5 f7 e8 .....:..- ......
1ef0: f1 eb e5 ed e8 e5 20 49 73 52 65 61 64 09 3d 20 ...... IsRead.=
1f00: 30 20 7c 20 31 2c 20 ef ee ea e0 e7 fb e2 e0 e5 0 | 1, .........
1f10: f2 2c 20 e4 ee f1 f2 f3 ef ed ee 20 eb e8 20 f1 ., ........ .. .
1f20: e2 ee e9 f1 f2 e2 ee 20 e4 eb ff 20 f7 f2 e5 ed ....... ... ....
1f30: e8 ff 0d 0a 2d 20 ef e5 f0 e5 f7 e8 f1 eb e5 ed ....- ..........
1f40: e8 e5 20 49 73 57 72 69 74 65 09 3d 20 30 20 7c .. IsWrite.= 0 |
1f50: 20 31 2c 20 ef ee ea e0 e7 fb e2 e0 e5 f2 2c 20 1, ..........,
1f60: e4 ee f1 f2 f3 ef ed ee 20 eb e8 20 f1 e2 ee e9 ........ .. ....
1f70: f1 f2 e2 ee 20 e4 eb ff 20 e7 e0 ef e8 f1 e8 0d .... ... .......
1f80: 0a 2d 20 ec e5 f2 ee e4 fb 3a 0d 0a 09 73 74 61 .- ......:...sta
1f90: 74 69 63 20 69 6e 74 20 52 65 61 64 28 63 6f 6e tic int Read(con
1fa0: 73 74 20 54 2a 20 70 74 72 2c 20 43 56 61 6c 75 st T* ptr, CValu
1fb0: 65 26 20 76 61 6c 75 65 29 3b 09 2f 2f 20 c2 fb e& value);.// ..
1fc0: e7 ee e2 20 e4 eb ff 20 f7 f2 e5 ed e8 ff 0d 0a ... ... ........
1fd0: 09 73 74 61 74 69 63 20 69 6e 74 20 57 72 69 74 .static int Writ
1fe0: 65 28 54 2a 20 70 74 72 2c 20 43 56 61 6c 75 65 e(T* ptr, CValue
1ff0: 20 63 6f 6e 73 74 26 20 76 61 6c 75 65 29 3b 09 const& value);.
2000: 2f 2f 20 c2 fb e7 ee e2 20 e4 eb ff 20 e7 e0 ef // ..... ... ...
2010: e8 f1 e8 0d 0a 0d 0a d2 e8 ef 20 ef e5 f0 e2 ee .......... .....
2020: e3 ee 20 ec e5 f2 ee e4 e0 2f f1 e2 ee e9 f1 f2 .. ....../......
2030: e2 e0 20 e2 20 ea e0 f7 e5 f1 f2 e2 e5 20 ef f0 .. . ........ ..
2040: e5 e4 fb e4 f3 f9 e5 e3 ee 20 f2 e8 ef e0 20 e4 ......... .... .
2050: ee eb e6 e5 ed 20 e8 f1 ef ee eb fc e7 ee e2 e0 ..... ..........
2060: f2 fc 20 f2 e8 ef 20 66 69 72 73 74 5f 64 65 66 .. ... first_def
2070: 2e 0d 0a c2 20 f1 e0 ec ee ec 20 ea eb e0 f1 f1 .... ..... .....
2080: e5 20 e4 ee eb e6 ed fb 20 e1 fb f2 fc 20 ee ef . ...... .... ..
2090: f0 e5 e4 e5 eb e5 ed fb 20 f2 e8 ef fb 20 65 6e ........ .... en
20a0: 64 6d 65 74 68 73 20 e4 eb ff 20 ec e5 f2 ee e4 dmeths ... .....
20b0: ee e2 20 e8 20 65 6e 64 70 72 6f 70 73 20 e4 eb .. . endprops ..
20c0: ff 20 f1 e2 ee e9 f1 f2 e2 2c 0d 0a e2 20 ea ee . .......,... ..
20d0: f2 ee f0 fb f5 20 f3 ea e0 e7 fb e2 e0 fe f2 f1 ..... ..........
20e0: ff 20 f1 f1 fb eb ea e0 20 70 72 65 76 20 ed e0 . ...... prev ..
20f0: 20 f2 e8 ef 20 ef ee f1 eb e5 e4 ed e5 e3 ee 20 ... ..........
2100: e8 e7 20 f0 e5 e0 eb e8 e7 f3 e5 ec fb f5 20 ec .. ........... .
2110: e5 f2 ee e4 ee e2 2f f1 e2 ee e9 f1 f2 e2 2c 0d ....../.......,.
2120: 0a e8 20 ef e5 f0 e5 f7 e8 f1 eb e5 ed e8 e5 20 .. ............
2130: 76 61 6c 2c 20 f0 e0 e2 ed ee e5 20 76 61 6c 20 val, ...... val
2140: f2 e8 ef e0 20 ef ee f1 eb e5 e4 ed e5 e3 ee 20 .... ..........
2150: ec e5 f2 ee e4 e0 2f f1 e2 ee e9 f1 f2 e2 e0 20 ....../........
2160: ef eb fe f1 20 ee e4 e8 ed 2e 0d 0a 0d 0a c2 f1 .... ...........
2170: e5 20 fd f2 ee 20 f5 ee e7 ff e9 f1 f2 e2 ee 20 . ... .........
2180: f3 ef f0 ff f2 e0 ed ee 20 e2 20 ec e0 ea f0 ee ........ . .....
2190: f1 fb 20 42 4c 5f 42 45 47 49 4e 5f 43 4f 4e 54 .. BL_BEGIN_CONT
21a0: 45 58 54 2c 20 42 4c 5f 50 52 4f 43 2c 20 42 4c EXT, BL_PROC, BL
21b0: 5f 46 55 4e 43 2c 0d 0a 42 4c 5f 45 4e 44 5f 43 _FUNC,..BL_END_C
21c0: 4f 4e 54 45 58 54 20 e8 20 f2 ef 2e 0d 0a 0d 0a ONTEXT . .......
21d0: d0 e5 e0 eb e8 e7 e0 f6 e8 ff 20 f7 e5 f0 e5 e7 .......... .....
21e0: 20 f2 e8 ef 20 54 3a 3a 65 6e 64 6d 65 74 68 73 ... T::endmeths
21f0: 20 e8 20 54 3a 3a 65 6e 64 70 72 6f 70 73 20 ef . T::endprops .
2200: ee eb f3 f7 e0 e5 f2 20 e4 ee f1 f2 f3 ef 20 ea ....... ...... .
2210: 20 f1 ef e8 f1 ea f3 20 f2 e8 ef ee e2 0d 0a ec ...... ........
2220: e5 f2 ee e4 ee e2 2f f1 e2 ee e9 f1 f2 e2 20 ea ....../....... .
2230: ee ed f2 e5 ea f1 f2 e0 2c 20 e8 20 ee e1 f0 e0 ........, . ....
2240: e1 e0 f2 fb e2 e0 ff 20 e5 e3 ee 20 f5 e8 f2 f0 ....... ... ....
2250: fb ec e8 20 f8 e0 e1 eb ee ed e0 ec e8 2c 20 e3 ... ........., .
2260: e5 ed e5 f0 e8 f0 f3 e5 f2 0d 0a ee ef f2 e8 ec ................
2270: e0 eb fc ed fb e9 20 ea ee e4 20 f0 e5 e0 eb e8 ...... ... .....
2280: e7 e0 f6 e8 e8 20 e2 e8 f0 f2 f3 e0 eb fc ed fb ..... ..........
2290: f5 20 f4 f3 ed ea f6 e8 e9 20 43 42 4c 43 6f 6e . ....... CBLCon
22a0: 74 65 78 74 27 e0 2e 0d 0a 2a 2f 0d 0a 0d 0a 2f text'....*/..../
22b0: 2f 20 ce f1 ed ee e2 e0 20 e8 ed f4 f0 e0 f1 f2 / ...... .......
22c0: f0 f3 ea f2 f3 f0 fb 20 f0 e0 e1 ee f2 fb 20 f1 ....... ...... .
22d0: 20 ee ef e8 f1 e0 ed e8 ff ec e8 20 ec e5 f2 ee .......... ....
22e0: e4 ee e2 2f f1 e2 ee e9 f1 f2 e2 0d 0a 73 74 72 .../.........str
22f0: 75 63 74 20 66 69 72 73 74 5f 64 65 66 0d 0a 7b uct first_def..{
2300: 0d 0a 09 65 6e 75 6d 0d 0a 09 7b 0d 0a 09 09 76 ...enum...{....v
2310: 61 6c 09 09 3d 2d 31 2c 0d 0a 09 09 49 73 46 75 al..=-1,....IsFu
2320: 6e 63 09 3d 2d 31 2c 0d 0a 09 09 6e 50 61 72 61 nc.=-1,....nPara
2330: 6d 09 3d 2d 31 2c 0d 0a 09 09 49 73 44 65 66 56 m.=-1,....IsDefV
2340: 61 6c 3d 2d 31 2c 0d 0a 09 09 49 73 52 65 61 64 al=-1,....IsRead
2350: 09 3d 2d 31 2c 0d 0a 09 09 49 73 57 72 69 74 65 .=-1,....IsWrite
2360: 09 3d 2d 31 2c 0d 0a 09 7d 3b 0d 0a 7d 3b 0d 0a .=-1,...};..};..
2370: 0d 0a 2f 2f 20 cd e0 e1 ee f0 20 e0 eb e3 ee f0 ..// ..... .....
2380: e8 f2 ec ee e2 20 e4 eb ff 20 ee f1 f3 f9 e5 f1 ..... ... ......
2390: f2 e2 eb e5 ed e8 ff 20 ef ee e8 f1 ea e0 20 ed ....... ...... .
23a0: ee ec e5 f0 e0 20 ef ee 20 f1 f2 f0 ee ea e5 0d ..... .. .......
23b0: 0a 6e 61 6d 65 73 70 61 63 65 20 73 74 72 5f 66 .namespace str_f
23c0: 69 6e 64 7b 0d 0a 0d 0a 73 74 61 74 69 63 20 69 ind{....static i
23d0: 6e 6c 69 6e 65 20 44 57 4f 52 44 20 73 79 6d 62 nline DWORD symb
23e0: 6f 6c 28 4c 50 43 53 54 52 20 70 74 72 29 7b 72 ol(LPCSTR ptr){r
23f0: 65 74 75 72 6e 20 73 74 61 74 69 63 5f 63 61 73 eturn static_cas
2400: 74 3c 44 57 4f 52 44 3e 28 73 74 61 74 69 63 5f t<DWORD>(static_
2410: 63 61 73 74 3c 42 59 54 45 3e 28 2a 70 74 72 29 cast<BYTE>(*ptr)
2420: 29 3b 7d 0d 0a 0d 0a 2f 2f 20 ca ee ef e8 f0 f3 );}....// ......
2430: e5 f2 20 f1 f2 f0 ee ea f3 20 e2 20 e1 f3 f4 e5 .. ...... . ....
2440: f0 20 e2 20 ed e8 e6 ed e5 ec 20 f0 e5 e3 e8 f1 . . ...... .....
2450: f2 f0 e5 0d 0a 73 74 61 74 69 63 20 69 6e 6c 69 .....static inli
2460: 6e 65 20 76 6f 69 64 20 6d 61 6b 65 6c 6f 77 65 ne void makelowe
2470: 72 28 4c 50 43 53 54 52 26 20 70 74 72 2c 20 4c r(LPCSTR& ptr, L
2480: 50 53 54 52 20 62 75 66 29 0d 0a 7b 0d 0a 09 66 PSTR buf)..{...f
2490: 6f 72 28 3b 3b 29 0d 0a 09 7b 0d 0a 09 09 44 57 or(;;)...{....DW
24a0: 4f 52 44 20 73 3d 6c 6f 74 61 62 6c 65 5b 73 79 ORD s=lotable[sy
24b0: 6d 62 6f 6c 28 70 74 72 29 5d 3b 0d 0a 09 09 2a mbol(ptr)];....*
24c0: 62 75 66 3d 73 74 61 74 69 63 5f 63 61 73 74 3c buf=static_cast<
24d0: 63 68 61 72 3e 28 73 29 3b 0d 0a 09 09 69 66 28 char>(s);....if(
24e0: 21 73 29 0d 0a 09 09 09 72 65 74 75 72 6e 3b 0d !s).....return;.
24f0: 0a 09 09 62 75 66 2b 2b 3b 0d 0a 09 09 70 74 72 ...buf++;....ptr
2500: 2b 2b 3b 0d 0a 09 7d 0d 0a 7d 0d 0a 2f 2f 20 d1 ++;...}..}..// .
2510: f0 e0 e2 ed e8 e2 e0 e5 f2 20 ed e0 20 f0 e0 e2 ......... .. ...
2520: e5 ed f1 f2 e2 ee 20 f1 f2 f0 ee ea e8 2c 20 e3 ...... ......, .
2530: e4 e5 20 70 74 72 31 20 e8 20 70 74 72 32 20 2d .. ptr1 . ptr2 -
2540: 20 eb fe e1 e0 ff 20 f1 f2 f0 ee ea e0 0d 0a 73 ..... ........s
2550: 74 61 74 69 63 20 69 6e 6c 69 6e 65 20 42 4f 4f tatic inline BOO
2560: 4c 20 63 6f 6d 70 61 72 65 55 55 28 4c 50 43 53 L compareUU(LPCS
2570: 54 52 20 70 74 72 31 2c 20 4c 50 43 53 54 52 20 TR ptr1, LPCSTR
2580: 70 74 72 32 29 0d 0a 7b 0d 0a 09 77 68 69 6c 65 ptr2)..{...while
2590: 28 73 79 6d 62 6f 6c 28 70 74 72 31 29 20 26 26 (symbol(ptr1) &&
25a0: 20 6c 6f 74 61 62 6c 65 5b 73 79 6d 62 6f 6c 28 lotable[symbol(
25b0: 70 74 72 31 29 5d 20 3d 3d 20 6c 6f 74 61 62 6c ptr1)] == lotabl
25c0: 65 5b 73 79 6d 62 6f 6c 28 70 74 72 32 29 5d 29 e[symbol(ptr2)])
25d0: 0d 0a 09 09 70 74 72 31 2b 2b 2c 70 74 72 32 2b ....ptr1++,ptr2+
25e0: 2b 3b 0d 0a 09 72 65 74 75 72 6e 20 73 79 6d 62 +;...return symb
25f0: 6f 6c 28 70 74 72 31 29 3d 3d 73 79 6d 62 6f 6c ol(ptr1)==symbol
2600: 28 70 74 72 32 29 3b 0d 0a 7d 0d 0a 0d 0a 2f 2f (ptr2);..}....//
2610: 20 d1 f0 e0 e2 ed e8 e2 e0 e5 f2 20 ed e0 20 f0 .......... .. .
2620: e0 e2 e5 ed f1 f2 e2 ee 20 f1 f2 f0 ee ea e8 2c ........ ......,
2630: 20 e3 e4 e5 20 70 74 72 31 20 2d 20 f1 f2 f0 ee ... ptr1 - ....
2640: ea e0 20 e2 20 ed e8 e6 ed e5 ec 20 f0 e5 e3 e8 .. . ...... ....
2650: f1 f2 f0 e5 2c 0d 0a 2f 2f 20 e0 20 70 74 72 32 ....,..// . ptr2
2660: 20 2d 20 eb fe e1 e0 ff 20 f1 f2 f0 ee ea e0 0d - ..... .......
2670: 0a 73 74 61 74 69 63 20 69 6e 6c 69 6e 65 20 42 .static inline B
2680: 4f 4f 4c 20 63 6f 6d 70 61 72 65 4c 55 28 4c 50 OOL compareLU(LP
2690: 43 53 54 52 20 70 74 72 31 2c 20 4c 50 43 53 54 CSTR ptr1, LPCST
26a0: 52 20 70 74 72 32 29 0d 0a 7b 0d 0a 09 77 68 69 R ptr2)..{...whi
26b0: 6c 65 28 73 79 6d 62 6f 6c 28 70 74 72 31 29 20 le(symbol(ptr1)
26c0: 26 26 20 73 79 6d 62 6f 6c 28 70 74 72 31 29 20 && symbol(ptr1)
26d0: 3d 3d 20 6c 6f 74 61 62 6c 65 5b 73 79 6d 62 6f == lotable[symbo
26e0: 6c 28 70 74 72 32 29 5d 29 0d 0a 09 09 70 74 72 l(ptr2)])....ptr
26f0: 31 2b 2b 2c 70 74 72 32 2b 2b 3b 0d 0a 09 72 65 1++,ptr2++;...re
2700: 74 75 72 6e 20 73 79 6d 62 6f 6c 28 70 74 72 31 turn symbol(ptr1
2710: 29 3d 3d 73 79 6d 62 6f 6c 28 70 74 72 32 29 3b )==symbol(ptr2);
2720: 0d 0a 7d 0d 0a 0d 0a 2f 2f 20 d1 f0 e0 e2 ed e8 ..}....// ......
2730: e2 e0 e5 f2 20 ed e0 20 f0 e0 e2 e5 ed f1 f2 e2 .... .. ........
2740: ee 20 f1 f2 f0 ee ea e8 2c 20 e3 e4 e5 20 70 74 . ......, ... pt
2750: 72 31 20 e8 20 70 74 72 32 20 2d 20 f1 f2 f0 ee r1 . ptr2 - ....
2760: ea e8 20 e2 20 ed e8 e6 ed e5 ec 20 f0 e5 e3 e8 .. . ...... ....
2770: f1 f2 f0 e5 0d 0a 73 74 61 74 69 63 20 69 6e 6c ......static inl
2780: 69 6e 65 20 42 4f 4f 4c 20 63 6f 6d 70 61 72 65 ine BOOL compare
2790: 4c 4c 28 4c 50 43 53 54 52 20 70 74 72 31 2c 20 LL(LPCSTR ptr1,
27a0: 4c 50 43 53 54 52 20 70 74 72 32 29 0d 0a 7b 0d LPCSTR ptr2)..{.
27b0: 0a 09 77 68 69 6c 65 28 73 79 6d 62 6f 6c 28 70 ..while(symbol(p
27c0: 74 72 31 29 20 26 26 20 73 79 6d 62 6f 6c 28 70 tr1) && symbol(p
27d0: 74 72 31 29 20 3d 3d 20 73 79 6d 62 6f 6c 28 70 tr1) == symbol(p
27e0: 74 72 32 29 29 0d 0a 09 09 70 74 72 31 2b 2b 2c tr2))....ptr1++,
27f0: 70 74 72 32 2b 2b 3b 0d 0a 09 72 65 74 75 72 6e ptr2++;...return
2800: 20 73 79 6d 62 6f 6c 28 70 74 72 31 29 3d 3d 73 symbol(ptr1)==s
2810: 79 6d 62 6f 6c 28 70 74 72 32 29 3b 0d 0a 7d 0d ymbol(ptr2);..}.
2820: 0a 0d 0a 2f 2f 20 d1 f2 f0 e0 f2 e5 e3 e8 e8 20 ...// .........
2830: ef ee e8 f1 ea e0 20 ed ee ec e5 f0 e0 20 fd eb ...... ...... ..
2840: e5 ec e5 ed f2 e0 20 ef ee 20 e5 e3 ee 20 e8 ec ...... .. ... ..
2850: e5 ed e8 0d 0a 0d 0a 2f 2f 20 d1 f2 f0 e0 f2 e5 .......// ......
2860: e3 e8 ff 20 ef f0 e8 20 ee f2 f1 f3 f2 f1 f2 e2 ... ... ........
2870: e8 e8 20 fd eb e5 ec e5 ed f2 ee e2 0d 0a 74 65 .. ...........te
2880: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
2890: 54 3e 0d 0a 73 74 72 75 63 74 20 6e 6f 66 6e 64 T>..struct nofnd
28a0: 5f 70 6f 6c 0d 0a 7b 0d 0a 09 73 74 61 74 69 63 _pol..{...static
28b0: 20 76 6f 69 64 20 4f 6e 49 6e 69 74 46 69 72 73 void OnInitFirs
28c0: 74 4f 62 6a 65 63 74 28 29 7b 7d 0d 0a 09 73 74 tObject(){}...st
28d0: 61 74 69 63 20 69 6e 74 20 46 69 6e 64 28 4c 50 atic int Find(LP
28e0: 43 53 54 52 20 6e 61 6d 65 29 7b 72 65 74 75 72 CSTR name){retur
28f0: 6e 20 2d 31 3b 7d 0d 0a 7d 3b 0d 0a 0d 0a 2f 2f n -1;}..};....//
2900: 20 d1 f2 f0 e0 f2 e5 e3 e8 ff 20 ef f0 e8 20 ed ......... ... .
2910: e0 eb e8 f7 e8 e8 20 e2 f1 e5 e3 ee 20 ee e4 ed ...... ..... ...
2920: ee e3 ee 20 fd eb e5 ec e5 ed f2 e0 0d 0a 74 65 ... ..........te
2930: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
2940: 54 3e 0d 0a 73 74 72 75 63 74 20 6f 6e 65 66 6e T>..struct onefn
2950: 64 5f 70 6f 6c 0d 0a 7b 0d 0a 09 73 74 61 74 69 d_pol..{...stati
2960: 63 20 76 6f 69 64 20 4f 6e 49 6e 69 74 46 69 72 c void OnInitFir
2970: 73 74 4f 62 6a 65 63 74 28 29 7b 7d 0d 0a 09 73 stObject(){}...s
2980: 74 61 74 69 63 20 69 6e 74 20 46 69 6e 64 28 4c tatic int Find(L
2990: 50 43 53 54 52 20 6e 61 6d 65 29 0d 0a 09 7b 0d PCSTR name)...{.
29a0: 0a 09 09 69 66 28 6e 61 6d 65 20 26 26 20 28 63 ...if(name && (c
29b0: 6f 6d 70 61 72 65 55 55 28 6e 61 6d 65 2c 20 54 ompareUU(name, T
29c0: 3a 3a 70 72 65 76 3a 3a 47 65 74 52 75 73 4e 61 ::prev::GetRusNa
29d0: 6d 65 28 29 29 20 7c 7c 0d 0a 09 09 09 63 6f 6d me()) ||.....com
29e0: 70 61 72 65 55 55 28 6e 61 6d 65 2c 20 54 3a 3a pareUU(name, T::
29f0: 70 72 65 76 3a 3a 47 65 74 45 6e 67 4e 61 6d 65 prev::GetEngName
2a00: 28 29 29 29 29 0d 0a 09 09 09 72 65 74 75 72 6e ()))).....return
2a10: 20 30 3b 0d 0a 09 09 72 65 74 75 72 6e 20 2d 31 0;....return -1
2a20: 3b 0d 0a 09 7d 0d 0a 7d 3b 0d 0a 0d 0a 2f 2f 20 ;...}..};....//
2a30: d1 f2 f0 e0 f2 e5 e3 e8 ff 20 ef ee e8 f1 ea e0 ......... ......
2a40: 20 ef f0 e8 20 ea ee eb e8 f7 e5 f1 f2 e2 e5 20 ... ..........
2a50: fd eb e5 ec e5 ed f2 ee e2 20 ee f2 20 32 20 e4 ......... .. 2 .
2a60: ee 20 33 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 . 3..template<ty
2a70: 70 65 6e 61 6d 65 20 54 3e 0d 0a 73 74 72 75 63 pename T>..struc
2a80: 74 20 73 69 6d 70 6c 65 66 6e 64 5f 70 6f 6c 0d t simplefnd_pol.
2a90: 0a 7b 0d 0a 09 73 74 61 74 69 63 20 76 6f 69 64 .{...static void
2aa0: 20 4f 6e 49 6e 69 74 46 69 72 73 74 4f 62 6a 65 OnInitFirstObje
2ab0: 63 74 28 29 7b 7d 0d 0a 09 73 74 61 74 69 63 20 ct(){}...static
2ac0: 69 6e 74 20 46 69 6e 64 28 4c 50 43 53 54 52 20 int Find(LPCSTR
2ad0: 6e 61 6d 65 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 name)...{....if(
2ae0: 21 6e 61 6d 65 29 0d 0a 09 09 09 72 65 74 75 72 !name).....retur
2af0: 6e 20 2d 31 3b 0d 0a 09 09 63 68 61 72 20 62 75 n -1;....char bu
2b00: 66 5b 35 31 32 5d 3b 0d 0a 09 09 6d 61 6b 65 6c f[512];....makel
2b10: 6f 77 65 72 28 6e 61 6d 65 2c 20 62 75 66 29 3b ower(name, buf);
2b20: 0d 0a 09 09 72 65 74 75 72 6e 20 66 69 6e 64 28 ....return find(
2b30: 62 75 66 2c 20 28 54 3a 3a 70 72 65 76 2a 29 4e buf, (T::prev*)N
2b40: 55 4c 4c 29 3b 0d 0a 09 7d 0d 0a 09 74 65 6d 70 ULL);...}...temp
2b50: 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e late<typename M>
2b60: 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 20 66 69 ...static int fi
2b70: 6e 64 28 4c 50 43 53 54 52 20 62 75 66 2c 20 4d nd(LPCSTR buf, M
2b80: 2a 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 63 6f 6d *)...{....if(com
2b90: 70 61 72 65 4c 55 28 62 75 66 2c 20 4d 3a 3a 47 pareLU(buf, M::G
2ba0: 65 74 52 75 73 4e 61 6d 65 28 29 29 20 7c 7c 0d etRusName()) ||.
2bb0: 0a 09 09 09 63 6f 6d 70 61 72 65 4c 55 28 62 75 ....compareLU(bu
2bc0: 66 2c 20 4d 3a 3a 47 65 74 45 6e 67 4e 61 6d 65 f, M::GetEngName
2bd0: 28 29 29 29 0d 0a 09 09 09 72 65 74 75 72 6e 20 ())).....return
2be0: 4d 3a 3a 76 61 6c 3b 0d 0a 09 09 72 65 74 75 72 M::val;....retur
2bf0: 6e 20 66 69 6e 64 28 62 75 66 2c 20 28 4d 3a 3a n find(buf, (M::
2c00: 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 7d prev*)NULL);...}
2c10: 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 73 74 61 ...template<>sta
2c20: 74 69 63 20 69 6e 74 20 66 69 6e 64 3c 66 69 72 tic int find<fir
2c30: 73 74 5f 64 65 66 3e 28 4c 50 43 53 54 52 20 62 st_def>(LPCSTR b
2c40: 75 66 2c 20 66 69 72 73 74 5f 64 65 66 2a 20 70 uf, first_def* p
2c50: 29 7b 72 65 74 75 72 6e 20 2d 31 3b 7d 0d 0a 7d ){return -1;}..}
2c60: 3b 0d 0a 0d 0a 2f 2f 20 d1 f2 f0 e0 f2 e5 e3 e8 ;....// ........
2c70: ff 20 ef f0 e8 20 ea ee eb e8 f7 e5 f1 f2 e2 e5 . ... ..........
2c80: 20 fd eb e5 ec e5 ed f2 ee e2 20 e1 ee eb fc f8 ......... .....
2c90: e5 20 33 0d 0a 73 74 72 75 63 74 20 68 73 5f 66 . 3..struct hs_f
2ca0: 69 6e 64 5f 6e 65 61 72 65 73 74 5f 62 69 67 67 ind_nearest_bigg
2cb0: 65 72 0d 0a 7b 0d 0a 09 74 65 6d 70 6c 61 74 65 er..{...template
2cc0: 3c 69 6e 74 20 49 3e 09 73 74 72 75 63 74 20 68 <int I>.struct h
2cd0: 61 73 68 73 69 7a 65 7b 65 6e 75 6d 7b 76 61 6c ashsize{enum{val
2ce0: 20 3d 20 68 61 73 68 73 69 7a 65 3c 49 20 2b 20 = hashsize<I +
2cf0: 31 3e 3a 3a 76 61 6c 7d 3b 7d 3b 0d 0a 09 23 64 1>::val};};...#d
2d00: 65 66 69 6e 65 20 48 41 53 48 5f 53 49 5a 45 28 efine HASH_SIZE(
2d10: 70 61 72 29 20 74 65 6d 70 6c 61 74 65 3c 3e 73 par) template<>s
2d20: 74 72 75 63 74 20 68 61 73 68 73 69 7a 65 3c 70 truct hashsize<p
2d30: 61 72 3e 7b 65 6e 75 6d 7b 76 61 6c 3d 70 61 72 ar>{enum{val=par
2d40: 7d 3b 7d 0d 0a 09 48 41 53 48 5f 53 49 5a 45 28 };}...HASH_SIZE(
2d50: 31 33 29 3b 20 48 41 53 48 5f 53 49 5a 45 28 31 13); HASH_SIZE(1
2d60: 39 29 3b 20 48 41 53 48 5f 53 49 5a 45 28 32 39 9); HASH_SIZE(29
2d70: 29 3b 20 48 41 53 48 5f 53 49 5a 45 28 33 37 29 ); HASH_SIZE(37)
2d80: 3b 20 48 41 53 48 5f 53 49 5a 45 28 34 37 29 3b ; HASH_SIZE(47);
2d90: 20 48 41 53 48 5f 53 49 5a 45 28 35 33 29 3b 0d HASH_SIZE(53);.
2da0: 0a 7d 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 68 73 .};....struct hs
2db0: 5f 73 69 6d 70 6c 65 5f 63 61 6c 63 0d 0a 7b 0d _simple_calc..{.
2dc0: 0a 09 74 65 6d 70 6c 61 74 65 3c 69 6e 74 20 49 ..template<int I
2dd0: 3e 73 74 72 75 63 74 20 68 61 73 68 73 69 7a 65 >struct hashsize
2de0: 7b 65 6e 75 6d 7b 20 76 61 6c 20 3d 20 28 49 20 {enum{ val = (I
2df0: 2b 20 49 20 2f 20 32 29 20 7c 20 31 7d 3b 7d 3b + I / 2) | 1};};
2e00: 0d 0a 7d 3b 0d 0a 0d 0a 74 65 6d 70 6c 61 74 65 ..};....template
2e10: 3c 42 4f 4f 4c 20 49 3e 20 73 74 72 75 63 74 20 <BOOL I> struct
2e20: 68 73 5f 73 65 6c 65 63 74 6f 72 20 7b 20 74 79 hs_selector { ty
2e30: 70 65 64 65 66 20 68 73 5f 66 69 6e 64 5f 6e 65 pedef hs_find_ne
2e40: 61 72 65 73 74 5f 62 69 67 67 65 72 20 74 79 70 arest_bigger typ
2e50: 65 3b 7d 3b 0d 0a 74 65 6d 70 6c 61 74 65 3c 3e e;};..template<>
2e60: 20 73 74 72 75 63 74 20 68 73 5f 73 65 6c 65 63 struct hs_selec
2e70: 74 6f 72 3c 46 41 4c 53 45 3e 7b 20 74 79 70 65 tor<FALSE>{ type
2e80: 64 65 66 20 68 73 5f 73 69 6d 70 6c 65 5f 63 61 def hs_simple_ca
2e90: 6c 63 20 74 79 70 65 3b 7d 3b 0d 0a 0d 0a 74 65 lc type;};....te
2ea0: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
2eb0: 54 2c 20 69 6e 74 20 49 3e 20 73 74 72 75 63 74 T, int I> struct
2ec0: 20 68 73 5f 67 65 74 20 7b 09 65 6e 75 6d 7b 76 hs_get {.enum{v
2ed0: 61 6c 20 3d 20 54 3a 3a 68 61 73 68 73 69 7a 65 al = T::hashsize
2ee0: 3c 49 3e 3a 3a 76 61 6c 7d 3b 7d 3b 0d 0a 0d 0a <I>::val};};....
2ef0: 74 65 6d 70 6c 61 74 65 3c 69 6e 74 20 49 3e 0d template<int I>.
2f00: 0a 73 74 72 75 63 74 20 68 61 73 68 73 69 7a 65 .struct hashsize
2f10: 73 0d 0a 7b 0d 0a 09 65 6e 75 6d 7b 20 76 61 6c s..{...enum{ val
2f20: 20 3d 20 68 73 5f 67 65 74 3c 68 73 5f 73 65 6c = hs_get<hs_sel
2f30: 65 63 74 6f 72 3c 28 49 20 3c 20 35 33 20 3f 20 ector<(I < 53 ?
2f40: 54 52 55 45 20 3a 20 46 41 4c 53 45 29 3e 3a 3a TRUE : FALSE)>::
2f50: 74 79 70 65 2c 20 49 3e 3a 3a 76 61 6c 20 7d 3b type, I>::val };
2f60: 0d 0a 7d 3b 0d 0a 0d 0a 0d 0a 74 65 6d 70 6c 61 ..};......templa
2f70: 74 65 3c 74 79 70 65 6e 61 6d 65 20 54 3e 0d 0a te<typename T>..
2f80: 73 74 72 75 63 74 20 68 61 73 68 66 6e 64 5f 70 struct hashfnd_p
2f90: 6f 6c 0d 0a 7b 0d 0a 09 65 6e 75 6d 7b 0d 0a 09 ol..{...enum{...
2fa0: 09 43 6f 75 6e 74 3d 54 3a 3a 76 61 6c 2c 0d 0a .Count=T::val,..
2fb0: 09 09 48 61 73 68 53 69 7a 65 3d 68 61 73 68 73 ..HashSize=hashs
2fc0: 69 7a 65 73 3c 43 6f 75 6e 74 2a 32 3e 3a 3a 76 izes<Count*2>::v
2fd0: 61 6c 2c 0d 0a 09 7d 3b 0d 0a 09 73 74 72 75 63 al,...};...struc
2fe0: 74 20 41 73 73 6f 63 20 2f 2f 20 d1 f2 f0 f3 ea t Assoc // .....
2ff0: f2 f3 f0 e0 20 e4 eb ff 20 f5 f0 e0 ed e5 ed e8 .... ... .......
3000: ff 20 e4 e0 ed ed fb f5 20 ee 20 ef e0 f0 e0 f5 . ...... . .....
3010: 20 ea eb fe f7 2d ed ee ec e5 f0 0d 0a 09 7b 0d ....-........{.
3020: 0a 09 09 41 73 73 6f 63 28 69 6e 74 20 70 2c 20 ...Assoc(int p,
3030: 42 59 54 45 2a 20 62 75 66 29 3a 70 6f 73 28 70 BYTE* buf):pos(p
3040: 29 2c 20 73 74 72 4b 65 79 28 62 75 66 29 7b 7d ), strKey(buf){}
3050: 0d 0a 09 09 44 57 4f 52 44 20 68 61 73 68 3b 0d ....DWORD hash;.
3060: 0a 09 09 42 59 54 45 20 2a 73 74 72 4b 65 79 3b ...BYTE *strKey;
3070: 0d 0a 09 09 69 6e 74 20 70 6f 73 3b 0d 0a 09 09 ....int pos;....
3080: 41 73 73 6f 63 20 2a 6e 65 78 74 3b 0d 0a 09 7d Assoc *next;...}
3090: 3b 0d 0a 0d 0a 09 41 73 73 6f 63 2a 20 70 70 48 ;.....Assoc* ppH
30a0: 61 73 68 54 61 62 6c 65 5b 48 61 73 68 53 69 7a ashTable[HashSiz
30b0: 65 5d 3b 09 2f 2f 20 f5 fd f8 2d f2 e0 e1 eb e8 e];.// ...-.....
30c0: f6 e0 2e 20 cc e0 f1 f1 e8 e2 20 f3 ea e0 e7 e0 ... ...... .....
30d0: f2 e5 eb e5 e9 20 ed e0 20 ee e4 ed ee f1 e2 ff ..... .. .......
30e0: e7 ed fb e5 20 f1 ef e8 f1 ea e8 20 f1 20 ea eb .... ...... . ..
30f0: fe f7 e0 ec e8 0d 0a 09 0d 0a 09 73 74 61 74 69 ...........stati
3100: 63 20 44 57 4f 52 44 20 47 65 74 48 61 73 68 28 c DWORD GetHash(
3110: 4c 50 43 54 53 54 52 20 6b 65 79 2c 20 44 57 4f LPCTSTR key, DWO
3120: 52 44 26 20 5f 68 61 73 68 2c 20 42 59 54 45 20 RD& _hash, BYTE
3130: 2a 62 75 66 29 0d 0a 09 7b 0d 0a 09 09 5f 68 61 *buf)...{...._ha
3140: 73 68 3d 30 3b 0d 0a 09 09 66 6f 72 28 3b 3b 29 sh=0;....for(;;)
3150: 0d 0a 09 09 7b 0d 0a 09 09 09 44 57 4f 52 44 20 ....{.....DWORD
3160: 73 79 6d 62 3d 6c 6f 74 61 62 6c 65 5b 73 79 6d symb=lotable[sym
3170: 62 6f 6c 28 6b 65 79 29 5d 3b 0d 0a 09 09 09 2a bol(key)];.....*
3180: 62 75 66 3d 73 74 61 74 69 63 5f 63 61 73 74 3c buf=static_cast<
3190: 42 59 54 45 3e 28 73 79 6d 62 29 3b 0d 0a 09 09 BYTE>(symb);....
31a0: 09 69 66 28 21 73 79 6d 62 29 0d 0a 09 09 09 09 .if(!symb)......
31b0: 72 65 74 75 72 6e 20 5f 68 61 73 68 20 25 20 48 return _hash % H
31c0: 61 73 68 53 69 7a 65 3b 0d 0a 09 09 09 5f 68 61 ashSize;....._ha
31d0: 73 68 3d 28 5f 68 61 73 68 3c 3c 31 29 5e 73 79 sh=(_hash<<1)^sy
31e0: 6d 62 3b 0d 0a 09 09 09 62 75 66 2b 2b 3b 0d 0a mb;.....buf++;..
31f0: 09 09 09 6b 65 79 2b 2b 3b 0d 0a 09 09 7d 0d 0a ...key++;....}..
3200: 09 7d 0d 0a 09 0d 0a 09 68 61 73 68 66 6e 64 5f .}......hashfnd_
3210: 70 6f 6c 28 29 7b 6d 65 6d 73 65 74 28 70 70 48 pol(){memset(ppH
3220: 61 73 68 54 61 62 6c 65 2c 20 30 2c 20 73 69 7a ashTable, 0, siz
3230: 65 6f 66 28 70 70 48 61 73 68 54 61 62 6c 65 29 eof(ppHashTable)
3240: 29 3b 7d 0d 0a 09 7e 68 61 73 68 66 6e 64 5f 70 );}...~hashfnd_p
3250: 6f 6c 28 29 0d 0a 09 7b 0d 0a 09 09 69 6e 74 20 ol()...{....int
3260: 63 6e 74 3d 43 6f 75 6e 74 2a 32 3b 0d 0a 09 09 cnt=Count*2;....
3270: 66 6f 72 28 69 6e 74 20 69 3d 30 3b 69 3c 48 61 for(int i=0;i<Ha
3280: 73 68 53 69 7a 65 20 26 26 20 63 6e 74 3b 69 2b shSize && cnt;i+
3290: 2b 29 0d 0a 09 09 7b 0d 0a 09 09 09 41 73 73 6f +)....{.....Asso
32a0: 63 2a 20 70 41 73 73 6f 63 3d 70 70 48 61 73 68 c* pAssoc=ppHash
32b0: 54 61 62 6c 65 5b 69 5d 3b 0d 0a 09 09 09 77 68 Table[i];.....wh
32c0: 69 6c 65 28 70 41 73 73 6f 63 29 0d 0a 09 09 09 ile(pAssoc).....
32d0: 7b 0d 0a 09 09 09 09 64 65 6c 65 74 65 20 5b 5d {......delete []
32e0: 20 70 41 73 73 6f 63 2d 3e 73 74 72 4b 65 79 3b pAssoc->strKey;
32f0: 0d 0a 09 09 09 09 41 73 73 6f 63 2a 20 70 44 65 ......Assoc* pDe
3300: 6c 3d 70 41 73 73 6f 63 3b 0d 0a 09 09 09 09 70 l=pAssoc;......p
3310: 41 73 73 6f 63 3d 70 41 73 73 6f 63 2d 3e 6e 65 Assoc=pAssoc->ne
3320: 78 74 3b 0d 0a 09 09 09 09 64 65 6c 65 74 65 20 xt;......delete
3330: 70 44 65 6c 3b 0d 0a 09 09 09 09 63 6e 74 2d 2d pDel;......cnt--
3340: 3b 0d 0a 09 09 09 7d 0d 0a 09 09 7d 0d 0a 09 7d ;.....}....}...}
3350: 0d 0a 09 69 6e 74 20 66 69 6e 64 28 4c 50 43 53 ...int find(LPCS
3360: 54 52 20 6e 61 6d 65 29 0d 0a 09 7b 0d 0a 09 09 TR name)...{....
3370: 69 66 28 21 6e 61 6d 65 29 0d 0a 09 09 09 72 65 if(!name).....re
3380: 74 75 72 6e 20 2d 31 3b 0d 0a 09 09 42 59 54 45 turn -1;....BYTE
3390: 20 62 75 66 5b 35 31 32 5d 3b 0d 0a 09 09 44 57 buf[512];....DW
33a0: 4f 52 44 20 68 61 73 68 3b 0d 0a 09 09 41 73 73 ORD hash;....Ass
33b0: 6f 63 20 2a 70 41 73 73 6f 63 3d 70 70 48 61 73 oc *pAssoc=ppHas
33c0: 68 54 61 62 6c 65 5b 47 65 74 48 61 73 68 28 6e hTable[GetHash(n
33d0: 61 6d 65 2c 20 68 61 73 68 2c 20 62 75 66 29 5d ame, hash, buf)]
33e0: 3b 0d 0a 09 09 77 68 69 6c 65 28 70 41 73 73 6f ;....while(pAsso
33f0: 63 29 0d 0a 09 09 7b 0d 0a 09 09 09 69 66 28 70 c)....{.....if(p
3400: 41 73 73 6f 63 2d 3e 68 61 73 68 3d 3d 68 61 73 Assoc->hash==has
3410: 68 29 0d 0a 09 09 09 7b 0d 0a 09 09 09 09 69 66 h).....{......if
3420: 28 63 6f 6d 70 61 72 65 4c 4c 28 72 65 69 6e 74 (compareLL(reint
3430: 65 72 70 72 65 74 5f 63 61 73 74 3c 4c 50 43 53 erpret_cast<LPCS
3440: 54 52 3e 28 70 41 73 73 6f 63 2d 3e 73 74 72 4b TR>(pAssoc->strK
3450: 65 79 29 2c 20 72 65 69 6e 74 65 72 70 72 65 74 ey), reinterpret
3460: 5f 63 61 73 74 3c 4c 50 43 53 54 52 3e 28 62 75 _cast<LPCSTR>(bu
3470: 66 29 29 29 0d 0a 09 09 09 09 09 72 65 74 75 72 f))).......retur
3480: 6e 20 70 41 73 73 6f 63 2d 3e 70 6f 73 3b 0d 0a n pAssoc->pos;..
3490: 09 09 09 7d 0d 0a 09 09 09 70 41 73 73 6f 63 3d ...}.....pAssoc=
34a0: 70 41 73 73 6f 63 2d 3e 6e 65 78 74 3b 0d 0a 09 pAssoc->next;...
34b0: 09 7d 0d 0a 09 09 72 65 74 75 72 6e 20 2d 31 3b .}....return -1;
34c0: 0d 0a 09 7d 0d 0a 09 76 6f 69 64 20 49 6e 73 65 ...}...void Inse
34d0: 72 74 28 4c 50 43 53 54 52 20 6e 61 6d 65 2c 20 rt(LPCSTR name,
34e0: 69 6e 74 20 70 6f 73 29 0d 0a 09 7b 0d 0a 09 09 int pos)...{....
34f0: 41 73 73 6f 63 2a 20 70 4e 65 77 3d 6e 65 77 20 Assoc* pNew=new
3500: 41 73 73 6f 63 28 70 6f 73 2c 20 6e 65 77 20 42 Assoc(pos, new B
3510: 59 54 45 5b 73 74 72 6c 65 6e 28 6e 61 6d 65 29 YTE[strlen(name)
3520: 2b 31 5d 29 3b 0d 0a 09 09 69 6e 74 20 70 6f 73 +1]);....int pos
3530: 49 6e 54 61 62 6c 65 3d 47 65 74 48 61 73 68 28 InTable=GetHash(
3540: 6e 61 6d 65 2c 20 70 4e 65 77 2d 3e 68 61 73 68 name, pNew->hash
3550: 2c 20 70 4e 65 77 2d 3e 73 74 72 4b 65 79 29 3b , pNew->strKey);
3560: 0d 0a 09 09 70 4e 65 77 2d 3e 6e 65 78 74 3d 70 ....pNew->next=p
3570: 70 48 61 73 68 54 61 62 6c 65 5b 70 6f 73 49 6e pHashTable[posIn
3580: 54 61 62 6c 65 5d 3b 0d 0a 09 09 70 70 48 61 73 Table];....ppHas
3590: 68 54 61 62 6c 65 5b 70 6f 73 49 6e 54 61 62 6c hTable[posInTabl
35a0: 65 5d 3d 70 4e 65 77 3b 0d 0a 09 7d 0d 0a 0d 0a e]=pNew;...}....
35b0: 09 73 74 61 74 69 63 20 68 61 73 68 66 6e 64 5f .static hashfnd_
35c0: 70 6f 6c 3c 54 3e 2a 26 20 67 65 74 6d 65 28 29 pol<T>*& getme()
35d0: 7b 73 74 61 74 69 63 20 68 61 73 68 66 6e 64 5f {static hashfnd_
35e0: 70 6f 6c 3c 54 3e 2a 20 70 74 72 3b 72 65 74 75 pol<T>* ptr;retu
35f0: 72 6e 20 70 74 72 3b 7d 0d 0a 0d 0a 09 74 65 6d rn ptr;}.....tem
3600: 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d plate<typename M
3610: 3e 0d 0a 09 73 74 61 74 69 63 20 76 6f 69 64 20 >...static void
3620: 41 64 64 4e 61 6d 65 73 28 4d 2a 20 70 3d 4e 55 AddNames(M* p=NU
3630: 4c 4c 29 0d 0a 09 7b 0d 0a 09 09 67 65 74 6d 65 LL)...{....getme
3640: 28 29 2d 3e 49 6e 73 65 72 74 28 4d 3a 3a 47 65 ()->Insert(M::Ge
3650: 74 52 75 73 4e 61 6d 65 28 29 2c 20 4d 3a 3a 76 tRusName(), M::v
3660: 61 6c 29 3b 0d 0a 09 09 67 65 74 6d 65 28 29 2d al);....getme()-
3670: 3e 49 6e 73 65 72 74 28 4d 3a 3a 47 65 74 45 6e >Insert(M::GetEn
3680: 67 4e 61 6d 65 28 29 2c 20 4d 3a 3a 76 61 6c 29 gName(), M::val)
3690: 3b 0d 0a 09 09 41 64 64 4e 61 6d 65 73 28 28 4d ;....AddNames((M
36a0: 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a ::prev*)NULL);..
36b0: 09 7d 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 20 .}...template<>
36c0: 73 74 61 74 69 63 20 76 6f 69 64 20 41 64 64 4e static void AddN
36d0: 61 6d 65 73 3c 66 69 72 73 74 5f 64 65 66 3e 28 ames<first_def>(
36e0: 66 69 72 73 74 5f 64 65 66 2a 20 70 29 7b 7d 0d first_def* p){}.
36f0: 0a 0d 0a 0d 0a 09 73 74 61 74 69 63 20 76 6f 69 ......static voi
3700: 64 20 4f 6e 49 6e 69 74 46 69 72 73 74 4f 62 6a d OnInitFirstObj
3710: 65 63 74 28 29 0d 0a 09 7b 0d 0a 09 09 67 65 74 ect()...{....get
3720: 6d 65 28 29 3d 6e 65 77 20 68 61 73 68 66 6e 64 me()=new hashfnd
3730: 5f 70 6f 6c 3c 54 3e 3b 0d 0a 09 09 41 64 64 4e _pol<T>;....AddN
3740: 61 6d 65 73 28 28 54 3a 3a 70 72 65 76 2a 29 4e ames((T::prev*)N
3750: 55 4c 4c 29 3b 0d 0a 09 7d 0d 0a 09 73 74 61 74 ULL);...}...stat
3760: 69 63 20 69 6e 74 20 46 69 6e 64 28 4c 50 43 53 ic int Find(LPCS
3770: 54 52 20 6e 61 6d 65 29 7b 72 65 74 75 72 6e 20 TR name){return
3780: 67 65 74 6d 65 28 29 2d 3e 66 69 6e 64 28 6e 61 getme()->find(na
3790: 6d 65 29 3b 7d 0d 0a 7d 3b 0d 0a 0d 0a 7d 2f 2f me);}..};....}//
37a0: 6e 61 6d 65 73 70 61 63 65 20 73 74 72 5f 66 69 namespace str_fi
37b0: 6e 64 0d 0a 0d 0a 2f 2f 20 cc e5 f2 e0 2d f4 f3 nd....// ....-..
37c0: ed ea f6 e8 ff 2c 20 e2 fb e1 e8 f0 e0 e5 f2 20 ....., ........
37d0: f2 e8 ef 20 ef ee e8 f1 ea e0 20 ed ee ec e5 f0 ... ...... .....
37e0: e0 20 ef ee 20 f1 f2 f0 ee ea e5 2c 0d 0a 2f 2f . .. ......,..//
37f0: 20 e2 e7 e0 e2 e8 f1 e8 ec ee f1 f2 e8 20 ee f2 ............ ..
3800: 20 ea ee eb e8 f7 e5 f1 f2 e2 e0 20 ec e5 f2 ee .......... ....
3810: e4 ee e2 2f f1 e2 ee e9 f1 f2 e2 2e 0d 0a 2f 2f .../..........//
3820: 20 c8 f1 ef ee eb fc e7 ee e2 e0 f2 fc 3a 20 66 ............: f
3830: 6e 64 73 65 6c 65 63 74 6f 72 3c 54 3a 3a 65 6e ndselector<T::en
3840: 64 6d 65 74 68 73 3e 3a 3a 74 79 70 65 2c 20 66 dmeths>::type, f
3850: 6e 64 73 65 6c 65 63 74 6f 72 3c 54 3a 3a 65 6e ndselector<T::en
3860: 64 70 72 6f 70 73 3e 3a 3a 74 79 70 65 0d 0a 74 dprops>::type..t
3870: 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 emplate<typename
3880: 20 54 3e 0d 0a 73 74 72 75 63 74 20 66 6e 64 73 T>..struct fnds
3890: 65 6c 65 63 74 6f 72 0d 0a 7b 0d 0a 09 74 65 6d elector..{...tem
38a0: 70 6c 61 74 65 3c 69 6e 74 20 4b 3e 73 74 72 75 plate<int K>stru
38b0: 63 74 20 74 64 65 66 3b 0d 0a 09 74 65 6d 70 6c ct tdef;...templ
38c0: 61 74 65 3c 3e 73 74 72 75 63 74 20 74 64 65 66 ate<>struct tdef
38d0: 3c 30 3e 7b 74 79 70 65 64 65 66 20 73 74 72 5f <0>{typedef str_
38e0: 66 69 6e 64 3a 3a 6e 6f 66 6e 64 5f 70 6f 6c 3c find::nofnd_pol<
38f0: 54 3e 09 09 74 79 70 65 3b 7d 3b 0d 0a 09 74 65 T>..type;};...te
3900: 6d 70 6c 61 74 65 3c 3e 73 74 72 75 63 74 20 74 mplate<>struct t
3910: 64 65 66 3c 31 3e 7b 74 79 70 65 64 65 66 20 73 def<1>{typedef s
3920: 74 72 5f 66 69 6e 64 3a 3a 6f 6e 65 66 6e 64 5f tr_find::onefnd_
3930: 70 6f 6c 3c 54 3e 09 74 79 70 65 3b 7d 3b 0d 0a pol<T>.type;};..
3940: 09 74 65 6d 70 6c 61 74 65 3c 3e 73 74 72 75 63 .template<>struc
3950: 74 20 74 64 65 66 3c 32 3e 7b 74 79 70 65 64 65 t tdef<2>{typede
3960: 66 20 73 74 72 5f 66 69 6e 64 3a 3a 73 69 6d 70 f str_find::simp
3970: 6c 65 66 6e 64 5f 70 6f 6c 3c 54 3e 09 74 79 70 lefnd_pol<T>.typ
3980: 65 3b 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c e;};...template<
3990: 3e 73 74 72 75 63 74 20 74 64 65 66 3c 33 3e 7b >struct tdef<3>{
39a0: 74 79 70 65 64 65 66 20 73 74 72 5f 66 69 6e 64 typedef str_find
39b0: 3a 3a 68 61 73 68 66 6e 64 5f 70 6f 6c 3c 54 3e ::hashfnd_pol<T>
39c0: 09 74 79 70 65 3b 7d 3b 0d 0a 0d 0a 09 65 6e 75 .type;};.....enu
39d0: 6d 7b 0d 0a 09 09 43 6f 75 6e 74 3d 54 3a 3a 76 m{....Count=T::v
39e0: 61 6c 2c 0d 0a 09 09 76 61 6c 20 3d 20 43 6f 75 al,....val = Cou
39f0: 6e 74 3d 3d 30 20 3f 20 30 20 3a 20 28 43 6f 75 nt==0 ? 0 : (Cou
3a00: 6e 74 3d 3d 31 20 3f 20 31 20 3a 20 28 43 6f 75 nt==1 ? 1 : (Cou
3a10: 6e 74 3c 34 20 3f 20 32 20 3a 20 33 29 29 2c 0d nt<4 ? 2 : 3)),.
3a20: 0a 09 7d 3b 0d 0a 09 74 79 70 65 64 65 66 20 74 ..};...typedef t
3a30: 79 70 65 6e 61 6d 65 20 74 64 65 66 3c 76 61 6c ypename tdef<val
3a40: 3e 3a 3a 74 79 70 65 20 74 79 70 65 3b 0d 0a 7d >::type type;..}
3a50: 3b 0d 0a 0d 0a 2f 2f 20 c2 ee e7 e2 f0 e0 f2 20 ;....// .......
3a60: e8 ec e5 ed e8 20 e8 e7 20 ec e0 f1 f1 e8 e2 e0 ..... .. .......
3a70: 20 e8 ec e5 ed 20 ef ee 20 e8 ed e4 e5 ea f1 f3 .... .. .......
3a80: 2e 0d 0a 2f 2f 20 cc e0 f1 f1 e8 e2 20 e8 ec e5 ...// ...... ...
3a90: ed 20 f1 ee e7 e4 e0 e5 f2 f1 ff 20 ef f0 e8 20 . ......... ...
3aa0: ef e5 f0 e2 ee ec 20 ee e1 f0 e0 f9 e5 ed e8 e8 ...... .........
3ab0: 20 ea 20 47 65 74 4e 61 6d 65 2e 0d 0a 74 65 6d . GetName...tem
3ac0: 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 54 plate<typename T
3ad0: 3e 0d 0a 73 74 72 75 63 74 20 67 65 74 6e 61 6d >..struct getnam
3ae0: 65 0d 0a 7b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c e..{...template<
3af0: 69 6e 74 20 43 6f 75 6e 74 3e 0d 0a 09 73 74 72 int Count>...str
3b00: 75 63 74 20 66 69 6e 64 65 72 0d 0a 09 7b 0d 0a uct finder...{..
3b10: 09 09 4c 50 43 53 54 52 20 6e 61 6d 65 73 5b 43 ..LPCSTR names[C
3b20: 6f 75 6e 74 5d 5b 32 5d 3b 0d 0a 09 09 73 74 61 ount][2];....sta
3b30: 74 69 63 20 66 69 6e 64 65 72 3c 43 6f 75 6e 74 tic finder<Count
3b40: 3e 2a 20 67 65 74 6d 65 28 29 7b 73 74 61 74 69 >* getme(){stati
3b50: 63 20 66 69 6e 64 65 72 3c 43 6f 75 6e 74 3e 2a c finder<Count>*
3b60: 20 6f 6e 65 3d 6e 65 77 20 66 69 6e 64 65 72 3c one=new finder<
3b70: 43 6f 75 6e 74 3e 3b 72 65 74 75 72 6e 20 6f 6e Count>;return on
3b80: 65 3b 7d 0d 0a 09 09 66 69 6e 64 65 72 28 29 7b e;}....finder(){
3b90: 66 69 6c 6c 28 28 54 3a 3a 70 72 65 76 2a 29 4e fill((T::prev*)N
3ba0: 55 4c 4c 29 3b 7d 0d 0a 09 09 74 65 6d 70 6c 61 ULL);}....templa
3bb0: 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d 0a te<typename M>..
3bc0: 09 09 76 6f 69 64 20 66 69 6c 6c 28 4d 2a 29 0d ..void fill(M*).
3bd0: 0a 09 09 7b 0d 0a 09 09 09 6e 61 6d 65 73 5b 4d ...{.....names[M
3be0: 3a 3a 76 61 6c 5d 5b 30 5d 3d 4d 3a 3a 47 65 74 ::val][0]=M::Get
3bf0: 45 6e 67 4e 61 6d 65 28 29 3b 0d 0a 09 09 09 6e EngName();.....n
3c00: 61 6d 65 73 5b 4d 3a 3a 76 61 6c 5d 5b 31 5d 3d ames[M::val][1]=
3c10: 4d 3a 3a 47 65 74 52 75 73 4e 61 6d 65 28 29 3b M::GetRusName();
3c20: 0d 0a 09 09 09 66 69 6c 6c 28 28 4d 3a 3a 70 72 .....fill((M::pr
3c30: 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 09 7d 0d ev*)NULL);....}.
3c40: 0a 09 09 74 65 6d 70 6c 61 74 65 3c 3e 76 6f 69 ...template<>voi
3c50: 64 20 66 69 6c 6c 3c 66 69 72 73 74 5f 64 65 66 d fill<first_def
3c60: 3e 28 66 69 72 73 74 5f 64 65 66 2a 29 7b 7d 0d >(first_def*){}.
3c70: 0a 0d 0a 09 09 73 74 61 74 69 63 20 4c 50 43 53 .....static LPCS
3c80: 54 52 20 47 65 74 4e 61 6d 65 28 44 57 4f 52 44 TR GetName(DWORD
3c90: 20 64 77 4d 65 74 68 6f 64 2c 20 44 57 4f 52 44 dwMethod, DWORD
3ca0: 20 64 77 4c 61 6e 67 29 0d 0a 09 09 7b 0d 0a 09 dwLang)....{...
3cb0: 09 09 69 66 28 64 77 4d 65 74 68 6f 64 20 3c 20 ..if(dwMethod <
3cc0: 43 6f 75 6e 74 20 26 26 20 64 77 4c 61 6e 67 20 Count && dwLang
3cd0: 3c 20 32 29 0d 0a 09 09 09 09 72 65 74 75 72 6e < 2)......return
3ce0: 20 67 65 74 6d 65 28 29 2d 3e 6e 61 6d 65 73 5b getme()->names[
3cf0: 64 77 4d 65 74 68 6f 64 5d 5b 64 77 4c 61 6e 67 dwMethod][dwLang
3d00: 5d 3b 0d 0a 09 09 09 72 65 74 75 72 6e 20 4e 55 ];.....return NU
3d10: 4c 4c 3b 0d 0a 09 09 7d 0d 0a 09 7d 3b 0d 0a 09 LL;....}...};...
3d20: 74 65 6d 70 6c 61 74 65 3c 3e 0d 0a 09 73 74 72 template<>...str
3d30: 75 63 74 20 66 69 6e 64 65 72 3c 30 3e 0d 0a 09 uct finder<0>...
3d40: 7b 0d 0a 09 09 73 74 61 74 69 63 20 4c 50 43 53 {....static LPCS
3d50: 54 52 20 47 65 74 4e 61 6d 65 28 44 57 4f 52 44 TR GetName(DWORD
3d60: 20 64 77 4d 65 74 68 6f 64 2c 20 44 57 4f 52 44 dwMethod, DWORD
3d70: 20 64 77 4c 61 6e 67 29 7b 72 65 74 75 72 6e 20 dwLang){return
3d80: 4e 55 4c 4c 3b 7d 0d 0a 09 7d 3b 0d 0a 09 74 79 NULL;}...};...ty
3d90: 70 65 64 65 66 20 74 79 70 65 6e 61 6d 65 20 66 pedef typename f
3da0: 69 6e 64 65 72 3c 54 3a 3a 76 61 6c 3e 20 74 79 inder<T::val> ty
3db0: 70 65 3b 0d 0a 7d 3b 0d 0a 0d 0a 6e 61 6d 65 73 pe;..};....names
3dc0: 70 61 63 65 20 6d 65 74 61 5f 66 75 6e 63 7b 0d pace meta_func{.
3dd0: 0a 2f 2f 20 cd e0 e1 ee f0 20 f0 e0 e7 eb e8 f7 .// ..... ......
3de0: ed fb f5 20 ec e5 f2 e0 f4 f3 ed ea f6 e8 e9 2c ... ...........,
3df0: 20 f0 e0 e1 ee f2 e0 fe f9 e8 f5 20 f1 ee 20 f1 .......... .. .
3e00: ef e8 f1 ea e0 ec e8 20 f2 e8 ef ee e2 0d 0a 2f ....... ......./
3e10: 2f 20 ee ef e8 f1 e0 ed e8 e9 20 ec e5 f2 ee e4 / ........ .....
3e20: ee e2 20 e8 20 f1 e2 ee e9 f1 f2 e2 2e 0d 0a 0d .. . ...........
3e30: 0a 2f 2f 20 cf f0 ee e2 e5 f0 ea e0 20 ed e0 20 .// ........ ..
3e40: f2 ee 2c 20 e5 f1 f2 fc 20 42 4c 5f 45 4e 44 5f .., .... BL_END_
3e50: 43 4f 4e 54 45 58 54 28 29 20 e8 20 ee ed 20 e2 CONTEXT() . .. .
3e60: 20 ef f0 e0 e2 e8 eb fc ed ee ec 20 ec e5 f1 f2 .......... ....
3e70: e5 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 ...template<type
3e80: 6e 61 6d 65 20 54 2c 20 69 6e 74 20 49 3e 0d 0a name T, int I>..
3e90: 73 74 72 75 63 74 20 74 65 73 74 5f 6c 61 73 74 struct test_last
3ea0: 0d 0a 7b 0d 0a 09 65 6e 75 6d 7b 76 61 6c 20 3d ..{...enum{val =
3eb0: 20 49 20 3c 20 54 3a 3a 76 61 6c 20 3f 20 31 20 I < T::val ? 1
3ec0: 3a 20 2d 31 7d 3b 0d 0a 09 2f 2f 20 c5 f1 eb e8 : -1};...// ....
3ed0: 20 f3 20 e2 e0 f1 20 e7 e4 e5 f1 fc 20 ee f8 e8 . ... ..... ...
3ee0: e1 ea e0 2c 20 e7 ed e0 f7 e8 f2 2c 20 ec e0 ea ..., ......, ...
3ef0: f0 ee f1 20 42 4c 5f 45 4e 44 5f 43 4f 4e 54 45 ... BL_END_CONTE
3f00: 58 54 28 29 20 e2 20 e2 e0 f8 e5 ec 0d 0a 09 2f XT() . ......../
3f10: 2f 20 ea eb e0 f1 f1 e5 20 ee f2 f1 f3 f2 f1 f2 / ...... .......
3f20: e2 f3 e5 f2 2c 20 eb e8 e1 ee 20 e2 f1 f2 e0 e2 ...., .... .....
3f30: eb e5 ed 20 ed e5 20 ef ee f1 eb e5 20 ef ee f1 ... .. ..... ...
3f40: eb e5 e4 ed e5 e3 ee 20 ec e5 f2 ee e4 e0 2f f1 ....... ....../.
3f50: e2 ee e9 f1 f2 e2 e0 0d 0a 09 2f 2f 20 cd e0 e6 ..........// ...
3f60: ec e8 f2 e5 20 46 34 2c 20 f7 f2 ee e1 fb 20 ef .... F4, ..... .
3f70: ee f1 ec ee f2 f0 e5 f2 fc 2c 20 e3 e4 e5 0d 0a ........., .....
3f80: 09 74 79 70 65 64 65 66 20 63 68 61 72 20 74 79 .typedef char ty
3f90: 70 65 5b 76 61 6c 5d 3b 0d 0a 7d 3b 0d 0a 0d 0a pe[val];..};....
3fa0: 2f 2f 20 cf f0 ee e2 e5 f0 ea e0 20 ed e0 20 f2 // ........ .. .
3fb0: ee 2c 20 f7 f2 ee 20 ec e5 f2 ee e4 fb 20 f1 20 ., ... ...... .
3fc0: ef e0 f0 e0 ec e5 f2 f0 e0 ec e8 20 ef ee 20 f3 ........... .. .
3fd0: ec ee eb f7 e0 ed e8 fe 20 e8 ec e5 fe f2 20 ed ........ ..... .
3fe0: e5 20 ec e5 ed fc f8 e5 20 31 20 ef e0 f0 e0 ec . ...... 1 .....
3ff0: e5 f2 f0 e0 0d 0a 74 65 6d 70 6c 61 74 65 3c 69 ......template<i
4000: 6e 74 20 49 2c 20 42 4f 4f 4c 20 62 44 65 66 3e nt I, BOOL bDef>
4010: 20 73 74 72 75 63 74 20 63 68 65 63 6b 5f 64 65 struct check_de
4020: 66 76 61 6c 0d 0a 7b 0d 0a 09 65 6e 75 6d 7b 76 fval..{...enum{v
4030: 61 6c 20 3d 20 62 44 65 66 20 26 26 20 21 49 20 al = bDef && !I
4040: 3f 20 2d 31 20 3a 20 31 7d 3b 0d 0a 09 2f 2f 20 ? -1 : 1};...//
4050: c5 f1 eb e8 20 e7 e4 e5 f1 fc 20 f3 20 e2 e0 f1 .... ..... . ...
4060: 20 ee f8 e8 e1 ea e0 2c 20 e7 ed e0 f7 e8 f2 2c ......, ......,
4070: 20 e4 eb ff 20 ec e5 f2 ee e4 e0 20 f1 20 ef e0 ... ...... . ..
4080: f0 e0 ec e5 f2 f0 e0 ec e8 20 ef ee 20 f3 ec ee ......... .. ...
4090: eb f7 e0 ed e8 fe 0d 0a 09 2f 2f 20 e7 e0 e4 e0 .........// ....
40a0: ed ee 20 30 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 0d .. 0 ...........
40b0: 0a 09 74 79 70 65 64 65 66 20 63 68 61 72 20 74 ..typedef char t
40c0: 79 70 65 5b 76 61 6c 5d 3b 0d 0a 7d 3b 0d 0a 0d ype[val];..};...
40d0: 0a 2f 2f 20 cc e5 f2 e0 2d f4 f3 ed ea f6 e8 ff .// ....-.......
40e0: 2c 20 ef ee e4 f1 f7 e8 f2 fb e2 e0 e5 f2 2c 20 , ............,
40f0: f1 ea ee eb fc ea ee 20 f1 f0 e5 e4 e8 20 ec e5 ....... ..... ..
4100: f2 ee e4 ee e2 20 ef f0 ee f6 e5 e4 f3 f0 20 e8 ..... ........ .
4110: 20 f4 f3 ed ea f6 e8 e9 2e 0d 0a 2f 2f 20 c8 f1 ..........// ..
4120: ef ee eb fc e7 ee e2 e0 f2 fc 3a 0d 0a 2f 2f 20 ..........:..//
4130: 6d 65 74 68 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 70 meth_count<T>::p
4140: 72 6f 63 20 2d 20 ea ee eb e8 f7 e5 f1 f2 e2 ee roc - ..........
4150: 20 ef f0 ee f6 e5 e4 f3 f0 0d 0a 2f 2f 20 6d 65 ..........// me
4160: 74 68 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 66 75 6e th_count<T>::fun
4170: 63 20 2d 20 ea ee eb e8 f7 e5 f1 f2 e2 ee 20 f4 c - .......... .
4180: f3 ed ea f6 e8 e9 0d 0a 74 65 6d 70 6c 61 74 65 ........template
4190: 3c 74 79 70 65 6e 61 6d 65 20 54 3e 0d 0a 73 74 <typename T>..st
41a0: 72 75 63 74 20 6d 65 74 68 5f 63 6f 75 6e 74 0d ruct meth_count.
41b0: 0a 7b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 69 6e .{...template<in
41c0: 74 20 49 3e 0d 0a 09 73 74 72 75 63 74 20 63 6f t I>...struct co
41d0: 75 6e 74 65 72 0d 0a 09 7b 0d 0a 09 09 74 65 6d unter...{....tem
41e0: 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d plate<typename M
41f0: 3e 0d 0a 09 09 73 74 72 75 63 74 20 63 68 65 63 >....struct chec
4200: 6b 0d 0a 09 09 7b 0d 0a 09 09 09 65 6e 75 6d 7b k....{.....enum{
4210: 0d 0a 09 09 09 09 6e 65 78 74 20 3d 20 4d 3a 3a ......next = M::
4220: 70 72 65 76 3a 3a 76 61 6c 20 3d 3d 20 2d 31 20 prev::val == -1
4230: 3f 20 30 20 3a 20 31 2c 0d 0a 09 09 09 09 76 61 ? 0 : 1,......va
4240: 6c 20 3d 20 4d 3a 3a 49 73 46 75 6e 63 20 2b 20 l = M::IsFunc +
4250: 63 6f 75 6e 74 65 72 3c 6e 65 78 74 3e 3a 3a 74 counter<next>::t
4260: 65 6d 70 6c 61 74 65 20 63 68 65 63 6b 3c 4d 3a emplate check<M:
4270: 3a 70 72 65 76 3e 3a 3a 76 61 6c 2c 0d 0a 09 09 :prev>::val,....
4280: 09 7d 3b 0d 0a 09 09 7d 3b 0d 0a 09 7d 3b 0d 0a .};....};...};..
4290: 09 74 65 6d 70 6c 61 74 65 3c 3e 20 73 74 72 75 .template<> stru
42a0: 63 74 20 63 6f 75 6e 74 65 72 3c 30 3e 7b 74 65 ct counter<0>{te
42b0: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
42c0: 4d 3e 73 74 72 75 63 74 20 63 68 65 63 6b 7b 65 M>struct check{e
42d0: 6e 75 6d 7b 76 61 6c 20 3d 20 30 7d 3b 7d 3b 7d num{val = 0};};}
42e0: 3b 0d 0a 0d 0a 09 65 6e 75 6d 7b 0d 0a 09 09 66 ;.....enum{....f
42f0: 69 72 73 74 09 3d 20 54 3a 3a 65 6e 64 6d 65 74 irst.= T::endmet
4300: 68 73 3a 3a 70 72 65 76 3a 3a 76 61 6c 20 3d 3d hs::prev::val ==
4310: 20 2d 31 20 3f 20 30 20 3a 20 31 2c 0d 0a 09 09 -1 ? 0 : 1,....
4320: 66 75 6e 63 09 3d 20 63 6f 75 6e 74 65 72 3c 66 func.= counter<f
4330: 69 72 73 74 3e 3a 3a 63 68 65 63 6b 3c 54 3a 3a irst>::check<T::
4340: 65 6e 64 6d 65 74 68 73 3a 3a 70 72 65 76 3e 3a endmeths::prev>:
4350: 3a 76 61 6c 2c 0d 0a 09 09 70 72 6f 63 09 3d 20 :val,....proc.=
4360: 54 3a 3a 65 6e 64 6d 65 74 68 73 3a 3a 76 61 6c T::endmeths::val
4370: 20 2d 20 66 75 6e 63 2c 0d 0a 09 7d 3b 0d 0a 7d - func,...};..}
4380: 3b 0d 0a 0d 0a 2f 2f 20 cc e5 f2 e0 2d f4 f3 ed ;....// ....-...
4390: ea f6 e8 ff 2c 20 ee ef f0 e5 e4 e5 eb ff e5 f2 ...., ..........
43a0: 2c 20 e2 ee 20 e2 f1 e5 f5 2d eb e8 20 ec e5 f2 , .. ....-.. ...
43b0: ee e4 e0 f5 20 ee e4 e8 ed e0 ea ee e2 ee e5 20 .... ..........
43c0: ea ee eb e8 f7 e5 f1 f2 e2 ee 20 ef e0 f0 e0 ec .......... .....
43d0: e5 f2 f0 ee e2 0d 0a 2f 2f 20 c8 f1 ef ee eb fc .......// ......
43e0: e7 ee e2 e0 f2 fc 3a 20 73 6f 6d 65 5f 6e 70 3c ......: some_np<
43f0: 54 3e 3a 3a 76 61 6c 0d 0a 2f 2f 20 c2 ee e7 e2 T>::val..// ....
4400: f0 e0 f9 e0 e5 f2 3a 20 2d 31 20 2d 20 e2 20 ec ......: -1 - . .
4410: e5 f2 ee e4 e0 f5 20 f0 e0 e7 ed ee e5 20 ea ee ...... ...... ..
4420: eb e8 f7 e5 f1 f2 e2 ee 20 ef e0 f0 e0 ec e5 f2 ........ .......
4430: f0 ee e2 2c 20 4e 20 2d 20 e2 ee 20 e2 f1 e5 f5 ..., N - .. ....
4440: 20 ec e5 f2 ee e4 e0 f5 20 4e 20 ef e0 f0 e0 ec ....... N .....
4450: e5 f2 f0 ee e2 0d 0a 74 65 6d 70 6c 61 74 65 3c .......template<
4460: 74 79 70 65 6e 61 6d 65 20 54 3e 0d 0a 73 74 72 typename T>..str
4470: 75 63 74 20 73 6f 6d 65 5f 6e 70 0d 0a 7b 0d 0a uct some_np..{..
4480: 09 74 65 6d 70 6c 61 74 65 3c 69 6e 74 20 49 3e .template<int I>
4490: 09 73 74 72 75 63 74 20 5f 73 6f 6d 65 5f 6e 70 .struct _some_np
44a0: 7b 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 {template<typena
44b0: 6d 65 20 4d 3e 73 74 72 75 63 74 20 63 68 65 63 me M>struct chec
44c0: 6b 7b 65 6e 75 6d 7b 76 61 6c 3d 49 7d 3b 7d 3b k{enum{val=I};};
44d0: 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 20 };...template<>
44e0: 73 74 72 75 63 74 20 5f 73 6f 6d 65 5f 6e 70 3c struct _some_np<
44f0: 2d 31 3e 7b 74 65 6d 70 6c 61 74 65 3c 74 79 70 -1>{template<typ
4500: 65 6e 61 6d 65 20 4d 3e 73 74 72 75 63 74 20 63 ename M>struct c
4510: 68 65 63 6b 7b 65 6e 75 6d 7b 76 61 6c 3d 2d 31 heck{enum{val=-1
4520: 7d 3b 7d 3b 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 };};};...templat
4530: 65 3c 3e 20 73 74 72 75 63 74 20 5f 73 6f 6d 65 e<> struct _some
4540: 5f 6e 70 3c 2d 32 3e 0d 0a 09 7b 0d 0a 09 09 74 _np<-2>...{....t
4550: 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 emplate<typename
4560: 20 4d 3e 0d 0a 09 09 73 74 72 75 63 74 20 63 68 M>....struct ch
4570: 65 63 6b 0d 0a 09 09 7b 0d 0a 09 09 09 65 6e 75 eck....{.....enu
4580: 6d 7b 0d 0a 09 09 09 09 73 74 6f 70 20 3d 20 4d m{......stop = M
4590: 3a 3a 70 72 65 76 3a 3a 76 61 6c 3d 3d 2d 31 3f ::prev::val==-1?
45a0: 20 31 20 3a 20 30 2c 0d 0a 09 09 09 09 73 6f 6d 1 : 0,......som
45b0: 65 20 3d 20 4d 3a 3a 6e 50 61 72 61 6d 20 3d 3d e = M::nParam ==
45c0: 20 4d 3a 3a 70 72 65 76 3a 3a 6e 50 61 72 61 6d M::prev::nParam
45d0: 20 3f 20 31 20 3a 20 30 2c 0d 0a 09 09 09 09 6e ? 1 : 0,......n
45e0: 65 78 74 20 3d 20 73 74 6f 70 20 3f 20 4d 3a 3a ext = stop ? M::
45f0: 6e 50 61 72 61 6d 20 3a 20 28 73 6f 6d 65 20 3f nParam : (some ?
4600: 20 2d 32 20 3a 20 2d 31 29 2c 0d 0a 09 09 09 09 -2 : -1),......
4610: 76 61 6c 20 20 3d 20 5f 73 6f 6d 65 5f 6e 70 3c val = _some_np<
4620: 6e 65 78 74 3e 3a 3a 74 65 6d 70 6c 61 74 65 20 next>::template
4630: 63 68 65 63 6b 3c 4d 3a 3a 70 72 65 76 3e 3a 3a check<M::prev>::
4640: 76 61 6c 2c 0d 0a 09 09 09 7d 3b 0d 0a 09 09 7d val,.....};....}
4650: 3b 0d 0a 09 7d 3b 0d 0a 09 65 6e 75 6d 7b 0d 0a ;...};...enum{..
4660: 09 09 66 69 72 73 74 3d 54 3a 3a 65 6e 64 6d 65 ..first=T::endme
4670: 74 68 73 3a 3a 70 72 65 76 3a 3a 76 61 6c 3d 3d ths::prev::val==
4680: 2d 31 20 3f 20 30 20 3a 20 2d 32 2c 0d 0a 09 09 -1 ? 0 : -2,....
4690: 76 61 6c 3d 5f 73 6f 6d 65 5f 6e 70 3c 66 69 72 val=_some_np<fir
46a0: 73 74 3e 3a 3a 63 68 65 63 6b 3c 54 3a 3a 65 6e st>::check<T::en
46b0: 64 6d 65 74 68 73 3a 3a 70 72 65 76 3e 3a 3a 76 dmeths::prev>::v
46c0: 61 6c 0d 0a 09 7d 3b 0d 0a 7d 3b 0d 0a 0d 0a 2f al...};..};..../
46d0: 2f 20 cc e5 f2 e0 2d f4 f3 ed ea f6 e8 ff 2c 20 / ....-.......,
46e0: ef ee e4 f1 f7 e8 f2 fb e2 e0 e5 f2 2c 20 f1 ea ............, ..
46f0: ee eb fc ea ee 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 ..... ..........
4700: 20 e4 ee f1 f2 f3 ef ed ee 20 e4 eb ff 20 f7 f2 ........ ... ..
4710: e5 ed e8 ff 2f e7 e0 ef e8 f1 e8 2e 0d 0a 2f 2f ..../.........//
4720: 20 c8 f1 ef ee eb fc e7 ee e2 e0 f2 fc 3a 0d 0a ............:..
4730: 2f 2f 20 72 77 5f 63 6f 75 6e 74 3c 54 3e 3a 3a // rw_count<T>::
4740: 72 65 61 64 09 2d 20 e4 ee f1 f2 f3 ef ed fb f5 read.- .........
4750: 20 e4 eb ff 20 f7 f2 e5 ed e8 ff 0d 0a 2f 2f 20 ... ........//
4760: 72 77 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 77 72 69 rw_count<T>::wri
4770: 74 65 09 2d 20 e4 ee f1 f2 f3 ef ed fb f5 20 e4 te.- ......... .
4780: eb ff 20 e7 e0 ef e8 f1 e8 0d 0a 2f 2f 20 72 77 .. ........// rw
4790: 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 6e 6f 72 65 61 _count<T>::norea
47a0: 64 09 2d 20 ed e5 e4 ee f1 f2 f3 ef ed fb f5 20 d.- ...........
47b0: e4 eb ff 20 f7 f2 e5 ed e8 ff 0d 0a 2f 2f 20 72 ... ........// r
47c0: 77 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 6e 6f 77 72 w_count<T>::nowr
47d0: 69 74 65 09 2d 20 ed e5 e4 ee f1 f2 f3 ef ed fb ite.- ..........
47e0: f5 20 e4 eb ff 20 e7 e0 ef e8 f1 e8 0d 0a 74 65 . ... ........te
47f0: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
4800: 54 3e 0d 0a 73 74 72 75 63 74 20 72 77 5f 63 6f T>..struct rw_co
4810: 75 6e 74 0d 0a 7b 0d 0a 09 74 65 6d 70 6c 61 74 unt..{...templat
4820: 65 3c 69 6e 74 20 49 3e 0d 0a 09 73 74 72 75 63 e<int I>...struc
4830: 74 20 72 63 6f 75 6e 74 65 72 0d 0a 09 7b 0d 0a t rcounter...{..
4840: 09 09 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e ..template<typen
4850: 61 6d 65 20 4d 3e 0d 0a 09 09 73 74 72 75 63 74 ame M>....struct
4860: 20 63 68 65 63 6b 0d 0a 09 09 7b 0d 0a 09 09 09 check....{.....
4870: 65 6e 75 6d 7b 0d 0a 09 09 09 09 6e 65 78 74 3d enum{......next=
4880: 20 4d 3a 3a 70 72 65 76 3a 3a 76 61 6c 3d 3d 2d M::prev::val==-
4890: 31 20 3f 20 30 20 3a 20 31 2c 0d 0a 09 09 09 09 1 ? 0 : 1,......
48a0: 76 61 6c 20 3d 20 4d 3a 3a 49 73 52 65 61 64 20 val = M::IsRead
48b0: 2b 20 72 63 6f 75 6e 74 65 72 3c 6e 65 78 74 3e + rcounter<next>
48c0: 3a 3a 74 65 6d 70 6c 61 74 65 20 63 68 65 63 6b ::template check
48d0: 3c 4d 3a 3a 70 72 65 76 3e 3a 3a 76 61 6c 2c 0d <M::prev>::val,.
48e0: 0a 09 09 09 7d 3b 0d 0a 09 09 7d 3b 0d 0a 09 7d ....};....};...}
48f0: 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 73 74 ;...template<>st
4900: 72 75 63 74 20 72 63 6f 75 6e 74 65 72 3c 30 3e ruct rcounter<0>
4910: 7b 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 {template<typena
4920: 6d 65 20 4d 3e 73 74 72 75 63 74 20 63 68 65 63 me M>struct chec
4930: 6b 7b 65 6e 75 6d 7b 76 61 6c 20 3d 20 30 7d 3b k{enum{val = 0};
4940: 7d 3b 7d 3b 0d 0a 0d 0a 09 74 65 6d 70 6c 61 74 };};.....templat
4950: 65 3c 69 6e 74 20 49 3e 0d 0a 09 73 74 72 75 63 e<int I>...struc
4960: 74 20 77 63 6f 75 6e 74 65 72 0d 0a 09 7b 0d 0a t wcounter...{..
4970: 09 09 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e ..template<typen
4980: 61 6d 65 20 4d 3e 0d 0a 09 09 73 74 72 75 63 74 ame M>....struct
4990: 20 63 68 65 63 6b 0d 0a 09 09 7b 0d 0a 09 09 09 check....{.....
49a0: 65 6e 75 6d 7b 0d 0a 09 09 09 09 6e 65 78 74 3d enum{......next=
49b0: 20 4d 3a 3a 70 72 65 76 3a 3a 76 61 6c 3d 3d 2d M::prev::val==-
49c0: 31 20 3f 20 30 20 3a 20 31 2c 0d 0a 09 09 09 09 1 ? 0 : 1,......
49d0: 76 61 6c 20 3d 20 4d 3a 3a 49 73 57 72 69 74 65 val = M::IsWrite
49e0: 20 2b 20 77 63 6f 75 6e 74 65 72 3c 6e 65 78 74 + wcounter<next
49f0: 3e 3a 3a 74 65 6d 70 6c 61 74 65 20 63 68 65 63 >::template chec
4a00: 6b 3c 4d 3a 3a 70 72 65 76 3e 3a 3a 76 61 6c 2c k<M::prev>::val,
4a10: 0d 0a 09 09 09 7d 3b 0d 0a 09 09 7d 3b 0d 0a 09 .....};....};...
4a20: 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 73 };...template<>s
4a30: 74 72 75 63 74 20 77 63 6f 75 6e 74 65 72 3c 30 truct wcounter<0
4a40: 3e 7b 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e >{template<typen
4a50: 61 6d 65 20 4d 3e 73 74 72 75 63 74 20 63 68 65 ame M>struct che
4a60: 63 6b 7b 65 6e 75 6d 7b 76 61 6c 20 3d 20 30 7d ck{enum{val = 0}
4a70: 3b 7d 3b 7d 3b 0d 0a 0d 0a 09 65 6e 75 6d 7b 0d ;};};.....enum{.
4a80: 0a 09 09 66 69 72 73 74 3d 54 3a 3a 65 6e 64 70 ...first=T::endp
4a90: 72 6f 70 73 3a 3a 70 72 65 76 3a 3a 76 61 6c 3d rops::prev::val=
4aa0: 3d 2d 31 20 3f 20 30 20 3a 20 31 2c 0d 0a 09 09 =-1 ? 0 : 1,....
4ab0: 72 65 61 64 20 3d 20 72 63 6f 75 6e 74 65 72 3c read = rcounter<
4ac0: 66 69 72 73 74 3e 3a 3a 63 68 65 63 6b 3c 54 3a first>::check<T:
4ad0: 3a 65 6e 64 70 72 6f 70 73 3a 3a 70 72 65 76 3e :endprops::prev>
4ae0: 3a 3a 76 61 6c 2c 0d 0a 09 09 77 72 69 74 65 3d ::val,....write=
4af0: 20 77 63 6f 75 6e 74 65 72 3c 66 69 72 73 74 3e wcounter<first>
4b00: 3a 3a 63 68 65 63 6b 3c 54 3a 3a 65 6e 64 70 72 ::check<T::endpr
4b10: 6f 70 73 3a 3a 70 72 65 76 3e 3a 3a 76 61 6c 2c ops::prev>::val,
4b20: 0d 0a 09 09 6e 6f 72 65 61 64 20 3d 20 54 3a 3a ....noread = T::
4b30: 65 6e 64 70 72 6f 70 73 3a 3a 76 61 6c 20 2d 20 endprops::val -
4b40: 72 65 61 64 2c 0d 0a 09 09 6e 6f 77 72 69 74 65 read,....nowrite
4b50: 3d 20 54 3a 3a 65 6e 64 70 72 6f 70 73 3a 3a 76 = T::endprops::v
4b60: 61 6c 20 2d 20 77 72 69 74 65 2c 0d 0a 09 7d 3b al - write,...};
4b70: 0d 0a 7d 3b 0d 0a 0d 0a 7d 2f 2f 6e 61 6d 65 73 ..};....}//names
4b80: 70 61 63 65 20 6d 65 74 61 5f 66 75 6e 63 0d 0a pace meta_func..
4b90: 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e ..template<typen
4ba0: 61 6d 65 20 54 3e 0d 0a 73 74 72 75 63 74 20 6d ame T>..struct m
4bb0: 65 74 68 5f 70 6f 6c 0d 0a 7b 0d 0a 09 65 6e 75 eth_pol..{...enu
4bc0: 6d 7b 0d 0a 09 09 69 73 46 75 6e 63 4d 69 6e 20 m{....isFuncMin
4bd0: 3d 20 6d 65 74 61 5f 66 75 6e 63 3a 3a 6d 65 74 = meta_func::met
4be0: 68 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 66 75 6e 63 h_count<T>::func
4bf0: 20 3c 3d 20 6d 65 74 61 5f 66 75 6e 63 3a 3a 6d <= meta_func::m
4c00: 65 74 68 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 70 72 eth_count<T>::pr
4c10: 6f 63 20 3f 20 31 20 3a 20 30 2c 0d 0a 09 09 6e oc ? 1 : 0,....n
4c20: 50 61 72 61 6d 43 6d 6e 20 3d 20 6d 65 74 61 5f ParamCmn = meta_
4c30: 66 75 6e 63 3a 3a 73 6f 6d 65 5f 6e 70 3c 54 3e func::some_np<T>
4c40: 3a 3a 76 61 6c 2c 0d 0a 09 7d 3b 0d 0a 0d 0a 09 ::val,...};.....
4c50: 73 74 61 74 69 63 20 69 6e 74 20 48 61 73 52 65 static int HasRe
4c60: 74 56 61 6c 28 44 57 4f 52 44 20 64 77 4d 65 74 tVal(DWORD dwMet
4c70: 68 6f 64 29 0d 0a 09 09 7b 72 65 74 75 72 6e 20 hod)....{return
4c80: 70 6f 6c 69 63 79 3c 69 73 46 75 6e 63 4d 69 6e policy<isFuncMin
4c90: 3e 3a 3a 48 61 73 52 65 74 56 61 6c 28 64 77 4d >::HasRetVal(dwM
4ca0: 65 74 68 6f 64 2c 20 28 54 3a 3a 65 6e 64 6d 65 ethod, (T::endme
4cb0: 74 68 73 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 ths::prev*)NULL)
4cc0: 3b 7d 0d 0a 0d 0a 09 73 74 61 74 69 63 20 69 6e ;}.....static in
4cd0: 74 20 47 65 74 4e 50 61 72 61 6d 73 28 44 57 4f t GetNParams(DWO
4ce0: 52 44 20 64 77 4d 65 74 68 6f 64 29 0d 0a 09 09 RD dwMethod)....
4cf0: 7b 72 65 74 75 72 6e 20 6e 70 61 72 61 6d 3c 6e {return nparam<n
4d00: 50 61 72 61 6d 43 6d 6e 3e 3a 3a 47 65 74 4e 50 ParamCmn>::GetNP
4d10: 61 72 61 6d 73 28 64 77 4d 65 74 68 6f 64 29 3b arams(dwMethod);
4d20: 7d 0d 0a 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 }.....static int
4d30: 20 47 65 74 44 65 66 56 61 6c 28 63 6f 6e 73 74 GetDefVal(const
4d40: 20 54 2a 20 70 74 72 2c 20 44 57 4f 52 44 20 64 T* ptr, DWORD d
4d50: 77 4d 65 74 68 6f 64 2c 20 44 57 4f 52 44 20 64 wMethod, DWORD d
4d60: 77 50 61 72 61 6d 2c 20 43 56 61 6c 75 65 2a 20 wParam, CValue*
4d70: 70 50 61 72 61 6d 29 0d 0a 09 09 7b 72 65 74 75 pParam)....{retu
4d80: 72 6e 20 47 65 74 44 65 66 56 61 6c 28 70 74 72 rn GetDefVal(ptr
4d90: 2c 20 64 77 4d 65 74 68 6f 64 2c 20 64 77 50 61 , dwMethod, dwPa
4da0: 72 61 6d 2c 20 70 50 61 72 61 6d 2c 20 28 54 3a ram, pParam, (T:
4db0: 3a 65 6e 64 6d 65 74 68 73 3a 3a 70 72 65 76 2a :endmeths::prev*
4dc0: 29 4e 55 4c 4c 29 3b 7d 0d 0a 09 0d 0a 09 73 74 )NULL);}......st
4dd0: 61 74 69 63 20 69 6e 74 20 43 61 6c 6c 41 73 50 atic int CallAsP
4de0: 72 6f 63 28 54 2a 20 70 74 72 2c 20 44 57 4f 52 roc(T* ptr, DWOR
4df0: 44 20 64 77 4d 65 74 68 6f 64 2c 20 43 56 61 6c D dwMethod, CVal
4e00: 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 0d 0a ue** ppParams)..
4e10: 09 7b 0d 0a 09 09 72 65 74 75 72 6e 20 43 61 6c .{....return Cal
4e20: 6c 41 73 50 72 6f 63 28 70 74 72 2c 20 64 77 4d lAsProc(ptr, dwM
4e30: 65 74 68 6f 64 2c 20 70 70 50 61 72 61 6d 73 2c ethod, ppParams,
4e40: 20 28 54 3a 3a 65 6e 64 6d 65 74 68 73 3a 3a 70 (T::endmeths::p
4e50: 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 7d 0d rev*)NULL);...}.
4e60: 0a 09 73 74 61 74 69 63 20 69 6e 74 20 43 61 6c ..static int Cal
4e70: 6c 41 73 46 75 6e 63 28 54 2a 20 70 74 72 2c 20 lAsFunc(T* ptr,
4e80: 44 57 4f 52 44 20 64 77 4d 65 74 68 6f 64 2c 20 DWORD dwMethod,
4e90: 43 56 61 6c 75 65 26 20 72 65 74 2c 20 43 56 61 CValue& ret, CVa
4ea0: 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 0d lue** ppParams).
4eb0: 0a 09 7b 0d 0a 09 09 72 65 74 75 72 6e 20 43 61 ..{....return Ca
4ec0: 6c 6c 41 73 46 75 6e 63 28 70 74 72 2c 20 64 77 llAsFunc(ptr, dw
4ed0: 4d 65 74 68 6f 64 2c 20 72 65 74 2c 20 70 70 50 Method, ret, ppP
4ee0: 61 72 61 6d 73 2c 20 28 54 3a 3a 65 6e 64 6d 65 arams, (T::endme
4ef0: 74 68 73 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 ths::prev*)NULL)
4f00: 3b 0d 0a 09 7d 0d 0a 0d 0a 09 74 65 6d 70 6c 61 ;...}.....templa
4f10: 74 65 3c 42 4f 4f 4c 20 62 46 75 6e 63 2f 2a 3d te<BOOL bFunc/*=
4f20: 3d 54 52 55 45 2a 2f 3e 0d 0a 09 73 74 72 75 63 =TRUE*/>...struc
4f30: 74 20 70 6f 6c 69 63 79 0d 0a 09 7b 0d 0a 09 09 t policy...{....
4f40: 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d template<typenam
4f50: 65 20 4d 3e 0d 0a 09 09 73 74 61 74 69 63 20 69 e M>....static i
4f60: 6e 74 20 48 61 73 52 65 74 56 61 6c 28 44 57 4f nt HasRetVal(DWO
4f70: 52 44 20 64 77 4d 65 74 68 6f 64 2c 20 4d 2a 29 RD dwMethod, M*)
4f80: 0d 0a 09 09 7b 0d 0a 09 09 09 69 66 28 4d 3a 3a ....{.....if(M::
4f90: 49 73 46 75 6e 63 20 26 26 20 64 77 4d 65 74 68 IsFunc && dwMeth
4fa0: 6f 64 3d 3d 4d 3a 3a 76 61 6c 29 0d 0a 09 09 09 od==M::val).....
4fb0: 09 72 65 74 75 72 6e 20 54 52 55 45 3b 0d 0a 09 .return TRUE;...
4fc0: 09 09 72 65 74 75 72 6e 20 48 61 73 52 65 74 56 ..return HasRetV
4fd0: 61 6c 28 64 77 4d 65 74 68 6f 64 2c 20 28 4d 3a al(dwMethod, (M:
4fe0: 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 :prev*)NULL);...
4ff0: 09 7d 0d 0a 09 09 74 65 6d 70 6c 61 74 65 3c 3e .}....template<>
5000: 20 73 74 61 74 69 63 20 69 6e 74 20 48 61 73 52 static int HasR
5010: 65 74 56 61 6c 3c 66 69 72 73 74 5f 64 65 66 3e etVal<first_def>
5020: 28 44 57 4f 52 44 2c 20 66 69 72 73 74 5f 64 65 (DWORD, first_de
5030: 66 2a 29 7b 72 65 74 75 72 6e 20 46 41 4c 53 45 f*){return FALSE
5040: 3b 7d 0d 0a 09 7d 3b 0d 0a 09 74 65 6d 70 6c 61 ;}...};...templa
5050: 74 65 3c 3e 0d 0a 09 73 74 72 75 63 74 20 70 6f te<>...struct po
5060: 6c 69 63 79 3c 46 41 4c 53 45 3e 0d 0a 09 7b 0d licy<FALSE>...{.
5070: 0a 09 09 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 ...template<type
5080: 6e 61 6d 65 20 4d 3e 0d 0a 09 09 73 74 61 74 69 name M>....stati
5090: 63 20 69 6e 74 20 48 61 73 52 65 74 56 61 6c 28 c int HasRetVal(
50a0: 44 57 4f 52 44 20 64 77 4d 65 74 68 6f 64 2c 20 DWORD dwMethod,
50b0: 4d 2a 29 0d 0a 09 09 7b 0d 0a 09 09 09 69 66 28 M*)....{.....if(
50c0: 21 4d 3a 3a 49 73 46 75 6e 63 20 26 26 20 64 77 !M::IsFunc && dw
50d0: 4d 65 74 68 6f 64 3d 3d 4d 3a 3a 76 61 6c 29 0d Method==M::val).
50e0: 0a 09 09 09 09 72 65 74 75 72 6e 20 46 41 4c 53 .....return FALS
50f0: 45 3b 0d 0a 09 09 09 72 65 74 75 72 6e 20 48 61 E;.....return Ha
5100: 73 52 65 74 56 61 6c 28 64 77 4d 65 74 68 6f 64 sRetVal(dwMethod
5110: 2c 20 28 4d 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c , (M::prev*)NULL
5120: 29 3b 0d 0a 09 09 7d 0d 0a 09 09 74 65 6d 70 6c );....}....templ
5130: 61 74 65 3c 3e 20 73 74 61 74 69 63 20 69 6e 74 ate<> static int
5140: 20 48 61 73 52 65 74 56 61 6c 3c 66 69 72 73 74 HasRetVal<first
5150: 5f 64 65 66 3e 28 44 57 4f 52 44 2c 20 66 69 72 _def>(DWORD, fir
5160: 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e 20 st_def*){return
5170: 54 52 55 45 3b 7d 0d 0a 09 7d 3b 0d 0a 09 0d 0a TRUE;}...};.....
5180: 09 74 65 6d 70 6c 61 74 65 3c 69 6e 74 20 49 3e .template<int I>
5190: 73 74 72 75 63 74 20 6e 70 61 72 61 6d 7b 73 74 struct nparam{st
51a0: 61 74 69 63 20 69 6e 74 20 47 65 74 4e 50 61 72 atic int GetNPar
51b0: 61 6d 73 28 44 57 4f 52 44 29 7b 72 65 74 75 72 ams(DWORD){retur
51c0: 6e 20 49 3b 7d 7d 3b 0d 0a 0d 0a 09 74 65 6d 70 n I;}};.....temp
51d0: 6c 61 74 65 3c 3e 0d 0a 09 73 74 72 75 63 74 20 late<>...struct
51e0: 6e 70 61 72 61 6d 3c 2d 31 3e 0d 0a 09 7b 0d 0a nparam<-1>...{..
51f0: 09 09 73 74 61 74 69 63 20 69 6e 74 20 47 65 74 ..static int Get
5200: 4e 50 61 72 61 6d 73 28 44 57 4f 52 44 20 64 77 NParams(DWORD dw
5210: 4d 65 74 68 6f 64 29 0d 0a 09 09 7b 0d 0a 09 09 Method)....{....
5220: 09 69 66 28 64 77 4d 65 74 68 6f 64 3c 54 3a 3a .if(dwMethod<T::
5230: 65 6e 64 6d 65 74 68 73 3a 3a 76 61 6c 29 0d 0a endmeths::val)..
5240: 09 09 09 09 72 65 74 75 72 6e 20 5f 47 65 74 4e ....return _GetN
5250: 50 61 72 61 6d 73 28 64 77 4d 65 74 68 6f 64 2c Params(dwMethod,
5260: 20 28 54 3a 3a 65 6e 64 6d 65 74 68 73 3a 3a 70 (T::endmeths::p
5270: 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 09 09 rev*)NULL);.....
5280: 72 65 74 75 72 6e 20 2d 31 3b 0d 0a 09 09 7d 0d return -1;....}.
5290: 0a 09 09 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 ...template<type
52a0: 6e 61 6d 65 20 4d 3e 0d 0a 09 09 73 74 61 74 69 name M>....stati
52b0: 63 20 69 6e 74 20 5f 47 65 74 4e 50 61 72 61 6d c int _GetNParam
52c0: 73 28 44 57 4f 52 44 20 64 77 4d 65 74 68 6f 64 s(DWORD dwMethod
52d0: 2c 20 4d 2a 29 0d 0a 09 09 7b 0d 0a 09 09 09 69 , M*)....{.....i
52e0: 66 28 64 77 4d 65 74 68 6f 64 3d 3d 4d 3a 3a 76 f(dwMethod==M::v
52f0: 61 6c 29 0d 0a 09 09 09 09 72 65 74 75 72 6e 20 al)......return
5300: 4d 3a 3a 6e 50 61 72 61 6d 3b 0d 0a 09 09 09 72 M::nParam;.....r
5310: 65 74 75 72 6e 20 5f 47 65 74 4e 50 61 72 61 6d eturn _GetNParam
5320: 73 28 64 77 4d 65 74 68 6f 64 2c 20 28 4d 3a 3a s(dwMethod, (M::
5330: 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 09 prev*)NULL);....
5340: 7d 0d 0a 09 09 74 65 6d 70 6c 61 74 65 3c 3e 73 }....template<>s
5350: 74 61 74 69 63 20 69 6e 74 20 5f 47 65 74 4e 50 tatic int _GetNP
5360: 61 72 61 6d 73 3c 66 69 72 73 74 5f 64 65 66 3e arams<first_def>
5370: 28 44 57 4f 52 44 2c 20 66 69 72 73 74 5f 64 65 (DWORD, first_de
5380: 66 2a 29 7b 72 65 74 75 72 6e 20 2d 31 3b 7d 0d f*){return -1;}.
5390: 0a 09 7d 3b 0d 0a 0d 0a 09 74 65 6d 70 6c 61 74 ..};.....templat
53a0: 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d 0a 09 e<typename M>...
53b0: 73 74 61 74 69 63 20 69 6e 74 20 47 65 74 44 65 static int GetDe
53c0: 66 56 61 6c 28 63 6f 6e 73 74 20 54 2a 20 70 74 fVal(const T* pt
53d0: 72 2c 20 44 57 4f 52 44 20 64 77 4d 65 74 68 6f r, DWORD dwMetho
53e0: 64 2c 20 44 57 4f 52 44 20 64 77 50 61 72 61 6d d, DWORD dwParam
53f0: 2c 20 43 56 61 6c 75 65 2a 20 70 50 61 72 61 6d , CValue* pParam
5400: 2c 20 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 , M*)...{....if(
5410: 4d 3a 3a 49 73 44 65 66 56 61 6c 20 26 26 20 64 M::IsDefVal && d
5420: 77 4d 65 74 68 6f 64 3d 3d 4d 3a 3a 76 61 6c 20 wMethod==M::val
5430: 26 26 20 64 77 50 61 72 61 6d 20 3c 20 4d 3a 3a && dwParam < M::
5440: 6e 50 61 72 61 6d 29 0d 0a 09 09 09 72 65 74 75 nParam).....retu
5450: 72 6e 20 4d 3a 3a 47 65 74 44 65 66 56 61 6c 28 rn M::GetDefVal(
5460: 70 74 72 2c 20 64 77 50 61 72 61 6d 2c 20 70 50 ptr, dwParam, pP
5470: 61 72 61 6d 29 3b 0d 0a 09 09 72 65 74 75 72 6e aram);....return
5480: 20 47 65 74 44 65 66 56 61 6c 28 70 74 72 2c 20 GetDefVal(ptr,
5490: 64 77 4d 65 74 68 6f 64 2c 20 64 77 50 61 72 61 dwMethod, dwPara
54a0: 6d 2c 20 70 50 61 72 61 6d 2c 20 28 4d 3a 3a 70 m, pParam, (M::p
54b0: 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 7d 0d rev*)NULL);...}.
54c0: 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 73 74 61 74 ..template<>stat
54d0: 69 63 20 69 6e 74 20 47 65 74 44 65 66 56 61 6c ic int GetDefVal
54e0: 3c 66 69 72 73 74 5f 64 65 66 3e 28 63 6f 6e 73 <first_def>(cons
54f0: 74 20 54 2a 2c 20 44 57 4f 52 44 2c 20 44 57 4f t T*, DWORD, DWO
5500: 52 44 2c 20 43 56 61 6c 75 65 2a 2c 20 66 69 72 RD, CValue*, fir
5510: 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e 20 st_def*){return
5520: 46 41 4c 53 45 3b 7d 0d 0a 0d 0a 09 74 65 6d 70 FALSE;}.....temp
5530: 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e late<typename M>
5540: 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 20 43 61 ...static int Ca
5550: 6c 6c 41 73 50 72 6f 63 28 54 2a 20 70 74 72 2c llAsProc(T* ptr,
5560: 20 44 57 4f 52 44 20 64 77 4d 65 74 68 6f 64 2c DWORD dwMethod,
5570: 20 43 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 CValue** ppPara
5580: 6d 73 2c 20 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 ms, M*)...{....i
5590: 66 28 21 4d 3a 3a 49 73 46 75 6e 63 20 26 26 20 f(!M::IsFunc &&
55a0: 64 77 4d 65 74 68 6f 64 3d 3d 4d 3a 3a 76 61 6c dwMethod==M::val
55b0: 29 0d 0a 09 09 09 72 65 74 75 72 6e 20 4d 3a 3a ).....return M::
55c0: 43 61 6c 6c 50 72 6f 63 28 70 74 72 2c 20 70 70 CallProc(ptr, pp
55d0: 50 61 72 61 6d 73 29 3b 0d 0a 09 09 72 65 74 75 Params);....retu
55e0: 72 6e 20 43 61 6c 6c 41 73 50 72 6f 63 28 70 74 rn CallAsProc(pt
55f0: 72 2c 20 64 77 4d 65 74 68 6f 64 2c 20 70 70 50 r, dwMethod, ppP
5600: 61 72 61 6d 73 2c 20 28 4d 3a 3a 70 72 65 76 2a arams, (M::prev*
5610: 29 4e 55 4c 4c 29 3b 0d 0a 09 7d 0d 0a 09 74 65 )NULL);...}...te
5620: 6d 70 6c 61 74 65 3c 3e 73 74 61 74 69 63 20 69 mplate<>static i
5630: 6e 74 20 43 61 6c 6c 41 73 50 72 6f 63 3c 66 69 nt CallAsProc<fi
5640: 72 73 74 5f 64 65 66 3e 28 54 2a 2c 20 44 57 4f rst_def>(T*, DWO
5650: 52 44 2c 20 43 56 61 6c 75 65 2a 2a 2c 20 66 69 RD, CValue**, fi
5660: 72 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e rst_def*){return
5670: 20 46 41 4c 53 45 3b 7d 0d 0a 0d 0a 09 74 65 6d FALSE;}.....tem
5680: 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d plate<typename M
5690: 3e 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 20 43 >...static int C
56a0: 61 6c 6c 41 73 46 75 6e 63 28 54 2a 20 70 74 72 allAsFunc(T* ptr
56b0: 2c 20 44 57 4f 52 44 20 64 77 4d 65 74 68 6f 64 , DWORD dwMethod
56c0: 2c 20 43 56 61 6c 75 65 26 20 72 65 74 2c 20 43 , CValue& ret, C
56d0: 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 Value** ppParams
56e0: 2c 20 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 , M*)...{....if(
56f0: 4d 3a 3a 49 73 46 75 6e 63 20 26 26 20 64 77 4d M::IsFunc && dwM
5700: 65 74 68 6f 64 3d 3d 4d 3a 3a 76 61 6c 29 0d 0a ethod==M::val)..
5710: 09 09 09 72 65 74 75 72 6e 20 4d 3a 3a 43 61 6c ...return M::Cal
5720: 6c 46 75 6e 63 28 70 74 72 2c 20 72 65 74 2c 20 lFunc(ptr, ret,
5730: 70 70 50 61 72 61 6d 73 29 3b 0d 0a 09 09 72 65 ppParams);....re
5740: 74 75 72 6e 20 43 61 6c 6c 41 73 46 75 6e 63 28 turn CallAsFunc(
5750: 70 74 72 2c 20 64 77 4d 65 74 68 6f 64 2c 20 72 ptr, dwMethod, r
5760: 65 74 2c 20 70 70 50 61 72 61 6d 73 2c 20 28 4d et, ppParams, (M
5770: 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a ::prev*)NULL);..
5780: 09 7d 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 73 .}...template<>s
5790: 74 61 74 69 63 20 69 6e 74 20 43 61 6c 6c 41 73 tatic int CallAs
57a0: 46 75 6e 63 3c 66 69 72 73 74 5f 64 65 66 3e 28 Func<first_def>(
57b0: 54 2a 2c 20 44 57 4f 52 44 2c 20 43 56 61 6c 75 T*, DWORD, CValu
57c0: 65 26 2c 20 43 56 61 6c 75 65 2a 2a 2c 20 66 69 e&, CValue**, fi
57d0: 72 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e rst_def*){return
57e0: 20 46 41 4c 53 45 3b 7d 0d 0a 7d 3b 0d 0a 0d 0a FALSE;}..};....
57f0: 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d template<typenam
5800: 65 20 54 3e 0d 0a 73 74 72 75 63 74 20 70 72 6f e T>..struct pro
5810: 70 5f 70 6f 6c 0d 0a 7b 0d 0a 09 65 6e 75 6d 7b p_pol..{...enum{
5820: 0d 0a 09 09 62 52 65 61 64 4d 69 6e 20 20 3d 20 ....bReadMin =
5830: 6d 65 74 61 5f 66 75 6e 63 3a 3a 72 77 5f 63 6f meta_func::rw_co
5840: 75 6e 74 3c 54 3e 3a 3a 72 65 61 64 20 3c 20 6d unt<T>::read < m
5850: 65 74 61 5f 66 75 6e 63 3a 3a 72 77 5f 63 6f 75 eta_func::rw_cou
5860: 6e 74 3c 54 3e 3a 3a 6e 6f 72 65 61 64 20 3f 20 nt<T>::noread ?
5870: 31 20 3a 20 30 2c 0d 0a 09 09 62 57 72 69 74 65 1 : 0,....bWrite
5880: 4d 69 6e 20 3d 20 6d 65 74 61 5f 66 75 6e 63 3a Min = meta_func:
5890: 3a 72 77 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 77 72 :rw_count<T>::wr
58a0: 69 74 65 20 3c 20 6d 65 74 61 5f 66 75 6e 63 3a ite < meta_func:
58b0: 3a 72 77 5f 63 6f 75 6e 74 3c 54 3e 3a 3a 6e 6f :rw_count<T>::no
58c0: 77 72 69 74 65 20 3f 20 31 20 3a 20 30 2c 0d 0a write ? 1 : 0,..
58d0: 09 7d 3b 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 .};...static int
58e0: 20 49 73 50 72 6f 70 52 65 61 64 61 62 6c 65 28 IsPropReadable(
58f0: 44 57 4f 52 44 20 64 77 50 72 6f 70 29 0d 0a 09 DWORD dwProp)...
5900: 09 7b 72 65 74 75 72 6e 20 70 6f 6c 69 63 79 3c .{return policy<
5910: 62 52 65 61 64 4d 69 6e 3e 3a 3a 49 73 52 65 61 bReadMin>::IsRea
5920: 64 28 64 77 50 72 6f 70 2c 20 28 54 3a 3a 65 6e d(dwProp, (T::en
5930: 64 70 72 6f 70 73 3a 3a 70 72 65 76 2a 29 4e 55 dprops::prev*)NU
5940: 4c 4c 29 3b 7d 0d 0a 0d 0a 09 73 74 61 74 69 63 LL);}.....static
5950: 20 69 6e 74 20 49 73 50 72 6f 70 57 72 69 74 61 int IsPropWrita
5960: 62 6c 65 28 44 57 4f 52 44 20 64 77 50 72 6f 70 ble(DWORD dwProp
5970: 29 0d 0a 09 09 7b 72 65 74 75 72 6e 20 70 6f 6c )....{return pol
5980: 69 63 79 3c 62 57 72 69 74 65 4d 69 6e 3e 3a 3a icy<bWriteMin>::
5990: 49 73 57 72 69 74 65 28 64 77 50 72 6f 70 2c 20 IsWrite(dwProp,
59a0: 28 54 3a 3a 65 6e 64 70 72 6f 70 73 3a 3a 70 72 (T::endprops::pr
59b0: 65 76 2a 29 4e 55 4c 4c 29 3b 7d 0d 0a 09 0d 0a ev*)NULL);}.....
59c0: 09 73 74 61 74 69 63 20 69 6e 74 20 52 65 61 64 .static int Read
59d0: 50 72 6f 70 28 63 6f 6e 73 74 20 54 2a 20 70 74 Prop(const T* pt
59e0: 72 2c 20 44 57 4f 52 44 20 64 77 50 72 6f 70 2c r, DWORD dwProp,
59f0: 20 43 56 61 6c 75 65 26 20 76 61 6c 29 0d 0a 09 CValue& val)...
5a00: 09 7b 72 65 74 75 72 6e 20 52 65 61 64 50 72 6f .{return ReadPro
5a10: 70 28 70 74 72 2c 20 64 77 50 72 6f 70 2c 20 76 p(ptr, dwProp, v
5a20: 61 6c 2c 20 28 54 3a 3a 65 6e 64 70 72 6f 70 73 al, (T::endprops
5a30: 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 3b 7d 0d ::prev*)NULL);}.
5a40: 0a 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 20 57 ....static int W
5a50: 72 69 74 65 50 72 6f 70 28 54 2a 20 70 74 72 2c riteProp(T* ptr,
5a60: 20 44 57 4f 52 44 20 64 77 50 72 6f 70 2c 20 43 DWORD dwProp, C
5a70: 56 61 6c 75 65 20 63 6f 6e 73 74 26 20 76 61 6c Value const& val
5a80: 29 0d 0a 09 09 7b 72 65 74 75 72 6e 20 57 72 69 )....{return Wri
5a90: 74 65 50 72 6f 70 28 70 74 72 2c 20 64 77 50 72 teProp(ptr, dwPr
5aa0: 6f 70 2c 20 76 61 6c 2c 20 28 54 3a 3a 65 6e 64 op, val, (T::end
5ab0: 70 72 6f 70 73 3a 3a 70 72 65 76 2a 29 4e 55 4c props::prev*)NUL
5ac0: 4c 29 3b 7d 0d 0a 0d 0a 09 74 65 6d 70 6c 61 74 L);}.....templat
5ad0: 65 3c 42 4f 4f 4c 20 49 2f 2a 3d 3d 54 52 55 45 e<BOOL I/*==TRUE
5ae0: 2a 2f 3e 0d 0a 09 73 74 72 75 63 74 20 70 6f 6c */>...struct pol
5af0: 69 63 79 0d 0a 09 7b 0d 0a 09 09 74 65 6d 70 6c icy...{....templ
5b00: 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d ate<typename M>.
5b10: 0a 09 09 73 74 61 74 69 63 20 69 6e 74 20 49 73 ...static int Is
5b20: 52 65 61 64 28 44 57 4f 52 44 20 64 77 50 72 6f Read(DWORD dwPro
5b30: 70 2c 20 4d 2a 29 20 2f 2f 20 d7 e8 f2 e0 e5 ec p, M*) // ......
5b40: fb f5 20 ec e5 ed fc f8 e5 2c 20 f7 e5 ec 20 ed .. ......, ... .
5b50: e5 20 f7 e8 f2 e0 e5 ec fb f5 0d 0a 09 09 7b 0d . ............{.
5b60: 0a 09 09 09 69 66 28 4d 3a 3a 49 73 52 65 61 64 ....if(M::IsRead
5b70: 20 26 26 20 64 77 50 72 6f 70 20 3d 3d 20 4d 3a && dwProp == M:
5b80: 3a 76 61 6c 29 0d 0a 09 09 09 09 72 65 74 75 72 :val)......retur
5b90: 6e 20 54 52 55 45 3b 0d 0a 09 09 09 72 65 74 75 n TRUE;.....retu
5ba0: 72 6e 20 49 73 52 65 61 64 28 64 77 50 72 6f 70 rn IsRead(dwProp
5bb0: 2c 20 28 4d 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c , (M::prev*)NULL
5bc0: 29 3b 0d 0a 09 09 7d 0d 0a 09 09 74 65 6d 70 6c );....}....templ
5bd0: 61 74 65 3c 3e 73 74 61 74 69 63 20 69 6e 74 20 ate<>static int
5be0: 49 73 52 65 61 64 3c 66 69 72 73 74 5f 64 65 66 IsRead<first_def
5bf0: 3e 28 44 57 4f 52 44 2c 20 66 69 72 73 74 5f 64 >(DWORD, first_d
5c00: 65 66 2a 29 7b 72 65 74 75 72 6e 20 46 41 4c 53 ef*){return FALS
5c10: 45 3b 7d 0d 0a 0d 0a 09 09 74 65 6d 70 6c 61 74 E;}......templat
5c20: 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d 0a 09 e<typename M>...
5c30: 09 73 74 61 74 69 63 20 69 6e 74 20 49 73 57 72 .static int IsWr
5c40: 69 74 65 28 44 57 4f 52 44 20 64 77 50 72 6f 70 ite(DWORD dwProp
5c50: 2c 20 4d 2a 29 20 2f 2f 20 c7 e0 ef e8 f1 fb e2 , M*) // .......
5c60: e0 e5 ec fb f5 20 ec e5 ed fc f8 e5 2c 20 f7 e5 ..... ......, ..
5c70: ec 20 ed e5 20 e7 e0 ef e8 f1 fb e2 e0 e5 ec fb . .. ...........
5c80: f5 0d 0a 09 09 7b 0d 0a 09 09 09 69 66 28 4d 3a .....{.....if(M:
5c90: 3a 49 73 57 72 69 74 65 20 26 26 20 64 77 50 72 :IsWrite && dwPr
5ca0: 6f 70 20 3d 3d 20 4d 3a 3a 76 61 6c 29 0d 0a 09 op == M::val)...
5cb0: 09 09 09 72 65 74 75 72 6e 20 54 52 55 45 3b 0d ...return TRUE;.
5cc0: 0a 09 09 09 72 65 74 75 72 6e 20 49 73 57 72 69 ....return IsWri
5cd0: 74 65 28 64 77 50 72 6f 70 2c 20 28 4d 3a 3a 70 te(dwProp, (M::p
5ce0: 72 65 76 2a 29 4e 55 4c 4c 29 3b 0d 0a 09 09 7d rev*)NULL);....}
5cf0: 0d 0a 09 09 74 65 6d 70 6c 61 74 65 3c 3e 73 74 ....template<>st
5d00: 61 74 69 63 20 69 6e 74 20 49 73 57 72 69 74 65 atic int IsWrite
5d10: 3c 66 69 72 73 74 5f 64 65 66 3e 28 44 57 4f 52 <first_def>(DWOR
5d20: 44 2c 20 66 69 72 73 74 5f 64 65 66 2a 29 7b 72 D, first_def*){r
5d30: 65 74 75 72 6e 20 46 41 4c 53 45 3b 7d 0d 0a 09 eturn FALSE;}...
5d40: 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 0d };...template<>.
5d50: 0a 09 73 74 72 75 63 74 20 70 6f 6c 69 63 79 3c ..struct policy<
5d60: 46 41 4c 53 45 3e 0d 0a 09 7b 0d 0a 09 09 74 65 FALSE>...{....te
5d70: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
5d80: 4d 3e 0d 0a 09 09 73 74 61 74 69 63 20 69 6e 74 M>....static int
5d90: 20 49 73 52 65 61 64 28 44 57 4f 52 44 20 64 77 IsRead(DWORD dw
5da0: 50 72 6f 70 2c 20 4d 2a 29 20 2f 2f 20 d7 e8 f2 Prop, M*) // ...
5db0: e0 e5 ec fb f5 20 e1 ee eb fc f8 e5 2c 20 f7 e5 ..... ......, ..
5dc0: ec 20 ed e5 20 f7 e8 f2 e0 e5 ec fb f5 0d 0a 09 . .. ...........
5dd0: 09 7b 0d 0a 09 09 09 69 66 28 21 4d 3a 3a 49 73 .{.....if(!M::Is
5de0: 52 65 61 64 20 26 26 20 64 77 50 72 6f 70 20 3d Read && dwProp =
5df0: 3d 20 4d 3a 3a 76 61 6c 29 0d 0a 09 09 09 09 72 = M::val)......r
5e00: 65 74 75 72 6e 20 46 41 4c 53 45 3b 0d 0a 09 09 eturn FALSE;....
5e10: 09 72 65 74 75 72 6e 20 49 73 52 65 61 64 28 64 .return IsRead(d
5e20: 77 50 72 6f 70 2c 20 28 4d 3a 3a 70 72 65 76 2a wProp, (M::prev*
5e30: 29 4e 55 4c 4c 29 3b 0d 0a 09 09 7d 0d 0a 09 09 )NULL);....}....
5e40: 74 65 6d 70 6c 61 74 65 3c 3e 73 74 61 74 69 63 template<>static
5e50: 20 69 6e 74 20 49 73 52 65 61 64 3c 66 69 72 73 int IsRead<firs
5e60: 74 5f 64 65 66 3e 28 44 57 4f 52 44 2c 20 66 69 t_def>(DWORD, fi
5e70: 72 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e rst_def*){return
5e80: 20 54 52 55 45 3b 7d 0d 0a 0d 0a 09 09 74 65 6d TRUE;}......tem
5e90: 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d plate<typename M
5ea0: 3e 0d 0a 09 09 73 74 61 74 69 63 20 69 6e 74 20 >....static int
5eb0: 49 73 57 72 69 74 65 28 44 57 4f 52 44 20 64 77 IsWrite(DWORD dw
5ec0: 50 72 6f 70 2c 20 4d 2a 29 20 2f 2f 20 c7 e0 ef Prop, M*) // ...
5ed0: e8 f1 fb e2 e0 e5 ec fb f5 20 e1 ee eb fc f8 e5 ......... ......
5ee0: 2c 20 f7 e5 ec 20 ed e5 20 e7 e0 ef e8 f1 fb e2 , ... .. .......
5ef0: e0 e5 ec fb f5 0d 0a 09 09 7b 0d 0a 09 09 09 69 .........{.....i
5f00: 66 28 21 4d 3a 3a 49 73 57 72 69 74 65 20 26 26 f(!M::IsWrite &&
5f10: 20 64 77 50 72 6f 70 20 3d 3d 20 4d 3a 3a 76 61 dwProp == M::va
5f20: 6c 29 0d 0a 09 09 09 09 72 65 74 75 72 6e 20 46 l)......return F
5f30: 41 4c 53 45 3b 0d 0a 09 09 09 72 65 74 75 72 6e ALSE;.....return
5f40: 20 49 73 57 72 69 74 65 28 64 77 50 72 6f 70 2c IsWrite(dwProp,
5f50: 20 28 4d 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c 29 (M::prev*)NULL)
5f60: 3b 0d 0a 09 09 7d 0d 0a 09 09 74 65 6d 70 6c 61 ;....}....templa
5f70: 74 65 3c 3e 73 74 61 74 69 63 20 69 6e 74 20 49 te<>static int I
5f80: 73 57 72 69 74 65 3c 66 69 72 73 74 5f 64 65 66 sWrite<first_def
5f90: 3e 28 44 57 4f 52 44 2c 20 66 69 72 73 74 5f 64 >(DWORD, first_d
5fa0: 65 66 2a 29 7b 72 65 74 75 72 6e 20 54 52 55 45 ef*){return TRUE
5fb0: 3b 7d 0d 0a 09 7d 3b 0d 0a 0d 0a 09 74 65 6d 70 ;}...};.....temp
5fc0: 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e late<typename M>
5fd0: 0d 0a 09 73 74 61 74 69 63 20 69 6e 74 20 52 65 ...static int Re
5fe0: 61 64 50 72 6f 70 28 63 6f 6e 73 74 20 54 2a 20 adProp(const T*
5ff0: 70 74 72 2c 20 44 57 4f 52 44 20 64 77 50 72 6f ptr, DWORD dwPro
6000: 70 2c 20 43 56 61 6c 75 65 26 20 76 61 6c 2c 20 p, CValue& val,
6010: 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 4d 3a M*)...{....if(M:
6020: 3a 49 73 52 65 61 64 20 26 26 20 64 77 50 72 6f :IsRead && dwPro
6030: 70 3d 3d 4d 3a 3a 76 61 6c 29 0d 0a 09 09 09 72 p==M::val).....r
6040: 65 74 75 72 6e 20 4d 3a 3a 52 65 61 64 50 72 6f eturn M::ReadPro
6050: 70 28 70 74 72 2c 20 76 61 6c 29 3b 0d 0a 09 09 p(ptr, val);....
6060: 72 65 74 75 72 6e 20 52 65 61 64 50 72 6f 70 28 return ReadProp(
6070: 70 74 72 2c 20 64 77 50 72 6f 70 2c 20 76 61 6c ptr, dwProp, val
6080: 2c 20 28 4d 3a 3a 70 72 65 76 2a 29 4e 55 4c 4c , (M::prev*)NULL
6090: 29 3b 0d 0a 09 7d 0d 0a 09 74 65 6d 70 6c 61 74 );...}...templat
60a0: 65 3c 3e 73 74 61 74 69 63 20 69 6e 74 20 52 65 e<>static int Re
60b0: 61 64 50 72 6f 70 3c 66 69 72 73 74 5f 64 65 66 adProp<first_def
60c0: 3e 28 63 6f 6e 73 74 20 54 2a 2c 20 44 57 4f 52 >(const T*, DWOR
60d0: 44 2c 20 43 56 61 6c 75 65 26 2c 20 66 69 72 73 D, CValue&, firs
60e0: 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e 20 46 t_def*){return F
60f0: 41 4c 53 45 3b 7d 0d 0a 0d 0a 09 74 65 6d 70 6c ALSE;}.....templ
6100: 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d ate<typename M>.
6110: 0a 09 73 74 61 74 69 63 20 69 6e 74 20 57 72 69 ..static int Wri
6120: 74 65 50 72 6f 70 28 54 2a 20 70 74 72 2c 20 44 teProp(T* ptr, D
6130: 57 4f 52 44 20 64 77 50 72 6f 70 2c 20 43 56 61 WORD dwProp, CVa
6140: 6c 75 65 20 63 6f 6e 73 74 26 20 76 61 6c 2c 20 lue const& val,
6150: 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 66 28 4d 3a M*)...{....if(M:
6160: 3a 49 73 57 72 69 74 65 20 26 26 20 64 77 50 72 :IsWrite && dwPr
6170: 6f 70 3d 3d 4d 3a 3a 76 61 6c 29 0d 0a 09 09 09 op==M::val).....
6180: 72 65 74 75 72 6e 20 4d 3a 3a 57 72 69 74 65 50 return M::WriteP
6190: 72 6f 70 28 70 74 72 2c 20 76 61 6c 29 3b 0d 0a rop(ptr, val);..
61a0: 09 09 72 65 74 75 72 6e 20 57 72 69 74 65 50 72 ..return WritePr
61b0: 6f 70 28 70 74 72 2c 20 64 77 50 72 6f 70 2c 20 op(ptr, dwProp,
61c0: 76 61 6c 2c 20 28 4d 3a 3a 70 72 65 76 2a 29 4e val, (M::prev*)N
61d0: 55 4c 4c 29 3b 0d 0a 09 7d 0d 0a 09 74 65 6d 70 ULL);...}...temp
61e0: 6c 61 74 65 3c 3e 73 74 61 74 69 63 20 69 6e 74 late<>static int
61f0: 20 57 72 69 74 65 50 72 6f 70 3c 66 69 72 73 74 WriteProp<first
6200: 5f 64 65 66 3e 28 54 2a 2c 20 44 57 4f 52 44 2c _def>(T*, DWORD,
6210: 20 43 56 61 6c 75 65 20 63 6f 6e 73 74 26 2c 20 CValue const&,
6220: 66 69 72 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 first_def*){retu
6230: 72 6e 20 46 41 4c 53 45 3b 7d 0d 0a 7d 3b 0d 0a rn FALSE;}..};..
6240: 0d 0a 2f 2f 20 d1 f2 f0 e0 f2 e5 e3 e8 e8 20 e4 ..// ......... .
6250: eb ff 20 f0 e5 e0 eb e8 e7 e0 f6 e8 e8 20 47 65 .. .......... Ge
6260: 74 52 75 6e 74 69 6d 65 43 6c 61 73 73 0d 0a 74 tRuntimeClass..t
6270: 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 emplate<typename
6280: 20 54 3e 0d 0a 73 74 72 75 63 74 20 69 6d 70 6c T>..struct impl
6290: 65 6d 65 6e 74 5f 72 74 63 0d 0a 7b 0d 0a 09 73 ement_rtc..{...s
62a0: 74 61 74 69 63 20 43 4f 62 6a 65 63 74 2a 20 50 tatic CObject* P
62b0: 41 53 43 41 4c 20 63 72 65 61 74 65 6f 62 6a 65 ASCAL createobje
62c0: 63 74 5f 72 74 63 28 29 7b 72 65 74 75 72 6e 20 ct_rtc(){return
62d0: 6e 65 77 20 54 3b 7d 0d 0a 09 73 74 61 74 69 63 new T;}...static
62e0: 20 43 52 75 6e 74 69 6d 65 43 6c 61 73 73 2a 20 CRuntimeClass*
62f0: 50 41 53 43 41 4c 20 47 65 74 42 61 73 65 52 54 PASCAL GetBaseRT
6300: 43 28 29 7b 72 65 74 75 72 6e 20 52 55 4e 54 49 C(){return RUNTI
6310: 4d 45 5f 43 4c 41 53 53 28 43 42 4c 43 6f 6e 74 ME_CLASS(CBLCont
6320: 65 78 74 29 3b 7d 0d 0a 09 73 74 61 74 69 63 20 ext);}...static
6330: 43 52 75 6e 74 69 6d 65 43 6c 61 73 73 2a 20 47 CRuntimeClass* G
6340: 65 74 52 54 43 28 29 0d 0a 09 7b 0d 0a 09 09 73 etRTC()...{....s
6350: 74 61 74 69 63 20 43 52 75 6e 74 69 6d 65 43 6c tatic CRuntimeCl
6360: 61 73 73 20 52 54 43 3d 7b 22 62 6c 63 6c 61 73 ass RTC={"blclas
6370: 73 22 2c 20 73 69 7a 65 6f 66 28 54 29 2c 20 30 s", sizeof(T), 0
6380: 2c 20 63 72 65 61 74 65 6f 62 6a 65 63 74 5f 72 , createobject_r
6390: 74 63 2c 20 47 65 74 42 61 73 65 52 54 43 7d 3b tc, GetBaseRTC};
63a0: 0d 0a 09 09 72 65 74 75 72 6e 20 26 52 54 43 3b ....return &RTC;
63b0: 0d 0a 09 7d 0d 0a 7d 3b 0d 0a 0d 0a 74 65 6d 70 ...}..};....temp
63c0: 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 54 3e late<typename T>
63d0: 0d 0a 73 74 72 75 63 74 20 6e 6f 5f 69 6d 70 6c ..struct no_impl
63e0: 65 6d 65 6e 74 5f 72 74 63 0d 0a 7b 0d 0a 09 73 ement_rtc..{...s
63f0: 74 61 74 69 63 20 43 52 75 6e 74 69 6d 65 43 6c tatic CRuntimeCl
6400: 61 73 73 2a 20 47 65 74 52 54 43 28 29 0d 0a 09 ass* GetRTC()...
6410: 7b 0d 0a 09 09 72 65 74 75 72 6e 20 52 55 4e 54 {....return RUNT
6420: 49 4d 45 5f 43 4c 41 53 53 28 43 42 4c 43 6f 6e IME_CLASS(CBLCon
6430: 74 65 78 74 29 3b 0d 0a 09 7d 0d 0a 7d 3b 0d 0a text);...}..};..
6440: 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e ..template<typen
6450: 61 6d 65 20 54 3e 0d 0a 73 74 72 75 63 74 20 72 ame T>..struct r
6460: 74 63 5f 73 65 6c 65 63 74 6f 72 0d 0a 7b 0d 0a tc_selector..{..
6470: 09 74 65 6d 70 6c 61 74 65 3c 42 4f 4f 4c 20 49 .template<BOOL I
6480: 3e 0d 0a 09 73 74 72 75 63 74 20 73 65 6c 0d 0a >...struct sel..
6490: 09 7b 0d 0a 09 09 74 79 70 65 64 65 66 20 74 79 .{....typedef ty
64a0: 70 65 6e 61 6d 65 20 69 6d 70 6c 65 6d 65 6e 74 pename implement
64b0: 5f 72 74 63 3c 54 3e 20 74 79 70 65 3b 0d 0a 09 _rtc<T> type;...
64c0: 7d 3b 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 3e 0d };...template<>.
64d0: 0a 09 73 74 72 75 63 74 20 73 65 6c 3c 46 41 4c ..struct sel<FAL
64e0: 53 45 3e 0d 0a 09 7b 0d 0a 09 09 74 79 70 65 64 SE>...{....typed
64f0: 65 66 20 74 79 70 65 6e 61 6d 65 20 6e 6f 5f 69 ef typename no_i
6500: 6d 70 6c 65 6d 65 6e 74 5f 72 74 63 3c 54 3e 20 mplement_rtc<T>
6510: 74 79 70 65 3b 0d 0a 09 7d 3b 0d 0a 7d 3b 0d 0a type;...};..};..
6520: 0d 0a 2f 2f 20 d1 f2 f0 e0 f2 e5 e3 e8 e8 20 ef ..// ......... .
6530: ee e2 e5 e4 e5 ed e8 ff 20 ef f0 e8 20 e7 e0 e3 ........ ... ...
6540: f0 f3 e7 ea e5 2f e2 fb e3 f0 f3 e7 ea e5 20 ea ...../........ .
6550: ee ec ef ee ed e5 ed f2 fb 0d 0a 0d 0a 2f 2f 20 .............//
6560: cd e5 20 e4 e5 eb e0 f2 fc 20 ed e8 f7 e5 e3 ee .. ...... ......
6570: 0d 0a 73 74 72 75 63 74 20 6e 6f 5f 69 6e 69 74 ..struct no_init
6580: 5f 64 6f 6e 65 0d 0a 7b 0d 0a 09 73 74 61 74 69 _done..{...stati
6590: 63 20 76 6f 69 64 20 49 6e 69 74 28 29 7b 7d 0d c void Init(){}.
65a0: 0a 09 73 74 61 74 69 63 20 76 6f 69 64 20 44 6f ..static void Do
65b0: 6e 65 28 29 7b 7d 0d 0a 7d 3b 0d 0a 0d 0a 2f 2f ne(){}..};....//
65c0: 20 c7 e0 f0 e5 e3 e8 f1 f2 f0 e8 f0 ee e2 e0 f2 ...............
65d0: fc 20 e4 eb ff 20 d1 ee e7 e4 e0 f2 fc ce e1 fa . ... ..........
65e0: e5 ea f2 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 .....template<ty
65f0: 70 65 6e 61 6d 65 20 54 3e 0d 0a 73 74 72 75 63 pename T>..struc
6600: 74 20 72 65 67 5f 43 72 65 61 74 65 4f 62 6a 65 t reg_CreateObje
6610: 63 74 0d 0a 7b 0d 0a 09 73 74 61 74 69 63 20 76 ct..{...static v
6620: 6f 69 64 20 49 6e 69 74 28 29 0d 0a 09 7b 0d 0a oid Init()...{..
6630: 09 09 43 52 75 6e 74 69 6d 65 43 6c 61 73 73 2a ..CRuntimeClass*
6640: 20 70 52 74 63 3d 54 3a 3a 47 65 74 52 54 43 28 pRtc=T::GetRTC(
6650: 29 3b 0d 0a 09 09 43 42 4c 43 6f 6e 74 65 78 74 );....CBLContext
6660: 3a 3a 52 65 67 69 73 74 65 72 43 6f 6e 74 65 78 ::RegisterContex
6670: 74 43 6c 61 73 73 28 70 52 74 63 2c 20 54 3a 3a tClass(pRtc, T::
6680: 47 65 74 52 75 73 54 79 70 65 53 74 72 69 6e 67 GetRusTypeString
6690: 28 29 2c 20 43 54 79 70 65 28 31 30 30 29 29 3b (), CType(100));
66a0: 0d 0a 09 09 43 42 4c 43 6f 6e 74 65 78 74 3a 3a ....CBLContext::
66b0: 52 65 67 69 73 74 65 72 43 6f 6e 74 65 78 74 43 RegisterContextC
66c0: 6c 61 73 73 28 70 52 74 63 2c 20 54 3a 3a 47 65 lass(pRtc, T::Ge
66d0: 74 45 6e 67 54 79 70 65 53 74 72 69 6e 67 28 29 tEngTypeString()
66e0: 2c 20 43 54 79 70 65 28 31 30 30 29 29 3b 0d 0a , CType(100));..
66f0: 09 7d 0d 0a 09 73 74 61 74 69 63 20 76 6f 69 64 .}...static void
6700: 20 44 6f 6e 65 28 29 7b 43 42 4c 43 6f 6e 74 65 Done(){CBLConte
6710: 78 74 3a 3a 55 6e 52 65 67 69 73 74 65 72 43 6f xt::UnRegisterCo
6720: 6e 74 65 78 74 43 6c 61 73 73 28 54 3a 3a 47 65 ntextClass(T::Ge
6730: 74 52 54 43 28 29 29 3b 7d 0d 0a 7d 3b 0d 0a 0d tRTC());}..};...
6740: 0a 0d 0a 2f 2f 20 d1 ee e1 f1 f2 e2 e5 ed ed ee ...// ..........
6750: 2c 20 f1 e0 ec 20 e1 e0 e7 ee e2 fb e9 20 ea eb , ... ....... ..
6760: e0 f1 f1 0d 0a 2f 2f 20 54 20 2d 20 ea ee ed e5 .....// T - ....
6770: f7 ed fb e9 20 ea eb e0 f1 f1 2d ed e0 f1 eb e5 .... .....-.....
6780: e4 ed e8 ea 0d 0a 2f 2f 20 49 6e 69 74 44 6f 6e ......// InitDon
6790: 65 50 6f 6c 69 63 79 20 2d 20 f1 f2 f0 e0 f2 e5 ePolicy - ......
67a0: e3 e8 ff 20 ef ee e2 e5 e4 e5 ed e8 ff 20 ef f0 ... ......... ..
67b0: e8 20 e8 ed e8 f6 e8 e0 eb e8 e7 e0 f6 e8 e8 2f . ............./
67c0: e2 fb e3 f0 f3 e7 ea e5 20 ea ee ec ef ee ed e5 ........ .......
67d0: ed f2 fb 2e 0d 0a 2f 2f 20 cf ee 20 f3 ec ee eb ......// .. ....
67e0: f7 e0 ed e8 fe 20 e8 f1 ef ee eb fc e7 f3 e5 f2 ..... ..........
67f0: f1 ff 20 72 65 67 5f 43 72 65 61 74 65 4f 62 6a .. reg_CreateObj
6800: 65 63 74 2c 20 f0 e5 e3 e8 f1 f2 f0 e8 f0 f3 e5 ect, ...........
6810: f2 20 ea eb e0 f1 f1 20 e4 eb ff 20 d1 ee e7 e4 . ..... ... ....
6820: e0 f2 fc ce e1 fa e5 ea f2 2e 0d 0a 2f 2f 20 d2 ............// .
6830: e0 ea e6 e5 20 e5 f1 f2 fc 20 ef f0 e5 e4 ee ef .... .... ......
6840: f0 e5 e4 e5 eb e5 ed ed e0 ff 20 f1 f2 f0 e0 f2 .......... .....
6850: e5 e3 e8 ff 20 2d 20 6e 6f 5f 69 6e 69 74 5f 64 .... - no_init_d
6860: 6f 6e 65 20 2d 20 ed e8 f7 e5 e3 ee 20 ed e5 20 one - ...... ..
6870: e4 e5 eb e0 f2 fc 2e 0d 0a 2f 2f 20 cc ee e6 ed .........// ....
6880: ee 20 ef e8 f1 e0 f2 fc 20 f1 e2 ee e8 20 f1 f2 . ...... .... ..
6890: f0 e0 f2 e5 e3 e8 e8 2c 20 ea ee f2 ee f0 fb e5 ......., .......
68a0: 20 e4 ee eb e6 ed fb 20 f0 e5 e0 eb e8 e7 ee e2 ...... ........
68b0: fb e2 e0 f2 fc 20 ec e5 f2 ee e4 fb 0d 0a 2f 2f ..... ........//
68c0: 09 73 74 61 74 69 63 20 76 6f 69 64 20 49 6e 69 .static void Ini
68d0: 74 28 29 3b 0d 0a 2f 2f 09 73 74 61 74 69 63 20 t();..//.static
68e0: 76 6f 69 64 20 44 6f 6e 65 28 29 3b 0d 0a 0d 0a void Done();....
68f0: 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d template<typenam
6900: 65 20 54 2c 20 74 79 70 65 6e 61 6d 65 20 49 6e e T, typename In
6910: 69 74 44 6f 6e 65 50 6f 6c 69 63 79 20 3d 20 72 itDonePolicy = r
6920: 65 67 5f 43 72 65 61 74 65 4f 62 6a 65 63 74 3c eg_CreateObject<
6930: 54 3e 2c 20 42 4f 4f 4c 20 62 49 6d 70 6c 65 6d T>, BOOL bImplem
6940: 65 6e 74 52 54 43 3d 54 52 55 45 3e 0d 0a 63 6c entRTC=TRUE>..cl
6950: 61 73 73 20 43 43 6f 6e 74 65 78 74 49 6d 70 6c ass CContextImpl
6960: 3a 20 70 75 62 6c 69 63 20 43 43 6f 6e 74 65 78 : public CContex
6970: 74 42 61 73 65 0d 0a 7b 0d 0a 70 75 62 6c 69 63 tBase..{..public
6980: 3a 0d 0a 09 74 79 70 65 64 65 66 20 54 20 49 6d :...typedef T Im
6990: 70 6c 54 79 70 65 3b 0d 0a 09 74 79 70 65 64 65 plType;...typede
69a0: 66 20 43 43 6f 6e 74 65 78 74 49 6d 70 6c 3c 54 f CContextImpl<T
69b0: 2c 20 49 6e 69 74 44 6f 6e 65 50 6f 6c 69 63 79 , InitDonePolicy
69c0: 2c 20 62 49 6d 70 6c 65 6d 65 6e 74 52 54 43 3e , bImplementRTC>
69d0: 20 42 61 73 65 54 79 70 65 3b 0d 0a 09 74 79 70 BaseType;...typ
69e0: 65 64 65 66 20 49 6e 69 74 44 6f 6e 65 50 6f 6c edef InitDonePol
69f0: 69 63 79 20 69 6e 69 74 5f 64 6f 6e 65 5f 70 6f icy init_done_po
6a00: 6c 69 63 79 3b 0d 0a 0d 0a 09 2f 2f 20 d0 e5 e0 licy;.....// ...
6a10: eb e8 e7 e0 f6 e8 ff 20 52 75 6e 54 69 6d 65 43 ....... RunTimeC
6a20: 6c 61 73 73 0d 0a 09 73 74 61 74 69 63 20 43 52 lass...static CR
6a30: 75 6e 74 69 6d 65 43 6c 61 73 73 2a 20 47 65 74 untimeClass* Get
6a40: 52 54 43 28 29 0d 0a 09 7b 0d 0a 09 09 72 65 74 RTC()...{....ret
6a50: 75 72 6e 20 72 74 63 5f 73 65 6c 65 63 74 6f 72 urn rtc_selector
6a60: 3c 54 3e 3a 3a 73 65 6c 3c 62 49 6d 70 6c 65 6d <T>::sel<bImplem
6a70: 65 6e 74 52 54 43 3e 3a 3a 74 79 70 65 3a 3a 47 entRTC>::type::G
6a80: 65 74 52 54 43 28 29 3b 0d 0a 09 7d 0d 0a 09 76 etRTC();...}...v
6a90: 69 72 74 75 61 6c 20 43 52 75 6e 74 69 6d 65 43 irtual CRuntimeC
6aa0: 6c 61 73 73 2a 20 47 65 74 52 75 6e 74 69 6d 65 lass* GetRuntime
6ab0: 43 6c 61 73 73 28 29 63 6f 6e 73 74 7b 72 65 74 Class()const{ret
6ac0: 75 72 6e 20 47 65 74 52 54 43 28 29 3b 7d 0d 0a urn GetRTC();}..
6ad0: 0d 0a 09 2f 2f 20 cf f0 e8 20 f1 ee e7 e4 e0 ed ...// ... ......
6ae0: e8 e8 20 ef e5 f0 e2 ee e3 ee 20 ee e1 fa e5 ea .. ....... .....
6af0: f2 e0 20 e8 ed e8 f6 e8 e0 eb e8 e7 e8 f0 f3 e5 .. .............
6b00: ec 20 ea e0 f0 f2 fb 20 ec e5 f2 ee e4 ee e2 2f . ..... ......./
6b10: f1 e2 ee e9 f1 f2 e2 0d 0a 09 43 43 6f 6e 74 65 ..........CConte
6b20: 78 74 49 6d 70 6c 28 29 7b 73 74 61 74 69 63 20 xtImpl(){static
6b30: 69 6e 69 74 5f 61 6c 6c 5f 6d 61 70 20 69 61 6d init_all_map iam
6b40: 3b 7d 0d 0a 09 76 69 72 74 75 61 6c 20 7e 43 43 ;}...virtual ~CC
6b50: 6f 6e 74 65 78 74 49 6d 70 6c 28 29 7b 7d 0d 0a ontextImpl(){}..
6b60: 0d 0a 0d 0a 09 74 65 6d 70 6c 61 74 65 3c 74 79 .....template<ty
6b70: 70 65 6e 61 6d 65 20 50 3e 20 73 74 72 75 63 74 pename P> struct
6b80: 20 65 6e 64 5f 64 65 66 20 7b 74 79 70 65 64 65 end_def {typede
6b90: 66 20 50 20 70 72 65 76 3b 65 6e 75 6d 7b 76 61 f P prev;enum{va
6ba0: 6c 3d 70 72 65 76 3a 3a 76 61 6c 2b 31 7d 3b 7d l=prev::val+1};}
6bb0: 3b 0d 0a 09 2f 2f 20 c2 20 ea ee ed e5 f7 ed ee ;...// . .......
6bc0: ec 20 ea eb e0 f1 f1 e5 20 fd f2 e8 20 f2 e0 e9 . ...... ... ...
6bd0: ef e4 e5 f4 fb 20 e2 ee e7 ec ee e6 ed ee 20 e1 ..... ........ .
6be0: f3 e4 f3 f2 20 ef e5 f0 e5 ee ef f0 e5 e4 e5 eb .... ...........
6bf0: e5 ed fb 2c 20 f3 ea e0 e7 f3 ff 20 ed e0 20 ef ..., ...... .. .
6c00: ee f1 eb e5 e4 ed e8 e9 20 ec e5 f2 ee e4 2f f1 ........ ...../.
6c10: e2 ee e9 f1 f2 e2 ee 0d 0a 09 74 79 70 65 64 65 ..........typede
6c20: 66 20 65 6e 64 5f 64 65 66 3c 66 69 72 73 74 5f f end_def<first_
6c30: 64 65 66 3e 20 65 6e 64 6d 65 74 68 73 3b 0d 0a def> endmeths;..
6c40: 09 74 79 70 65 64 65 66 20 65 6e 64 5f 64 65 66 .typedef end_def
6c50: 3c 66 69 72 73 74 5f 64 65 66 3e 20 65 6e 64 70 <first_def> endp
6c60: 72 6f 70 73 3b 0d 0a 0d 0a 09 2f 2f 20 d0 e5 e0 rops;.....// ...
6c70: eb e8 e7 e0 f6 e8 ff 20 e2 e8 f0 f2 f3 e0 eb fc ....... ........
6c80: ed fb f5 20 ec e5 f2 ee e4 ee e2 20 ea ee ed f2 ... ....... ....
6c90: e5 ea f1 f2 e0 0d 0a 09 76 69 72 74 75 61 6c 20 ........virtual
6ca0: 69 6e 74 20 47 65 74 4e 4d 65 74 68 6f 64 73 28 int GetNMethods(
6cb0: 76 6f 69 64 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 void)const....{r
6cc0: 65 74 75 72 6e 20 54 3a 3a 65 6e 64 6d 65 74 68 eturn T::endmeth
6cd0: 73 3a 3a 76 61 6c 3b 7d 0d 0a 0d 0a 09 76 69 72 s::val;}.....vir
6ce0: 74 75 61 6c 20 69 6e 74 20 46 69 6e 64 4d 65 74 tual int FindMet
6cf0: 68 6f 64 28 63 68 61 72 20 63 6f 6e 73 74 20 2a hod(char const *
6d00: 6e 61 6d 65 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 name)const....{r
6d10: 65 74 75 72 6e 20 66 6e 64 73 65 6c 65 63 74 6f eturn fndselecto
6d20: 72 3c 54 3a 3a 65 6e 64 6d 65 74 68 73 3e 3a 3a r<T::endmeths>::
6d30: 74 79 70 65 3a 3a 46 69 6e 64 28 6e 61 6d 65 29 type::Find(name)
6d40: 3b 7d 0d 0a 0d 0a 09 76 69 72 74 75 61 6c 20 63 ;}.....virtual c
6d50: 68 61 72 20 63 6f 6e 73 74 2a 20 47 65 74 4d 65 har const* GetMe
6d60: 74 68 6f 64 4e 61 6d 65 28 69 6e 74 20 6e 4d 65 thodName(int nMe
6d70: 74 68 6f 64 2c 20 69 6e 74 20 6e 4c 61 6e 67 29 thod, int nLang)
6d80: 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 75 72 6e const....{return
6d90: 20 67 65 74 6e 61 6d 65 3c 54 3a 3a 65 6e 64 6d getname<T::endm
6da0: 65 74 68 73 3e 3a 3a 74 79 70 65 3a 3a 47 65 74 eths>::type::Get
6db0: 4e 61 6d 65 28 6e 4d 65 74 68 6f 64 2c 20 6e 4c Name(nMethod, nL
6dc0: 61 6e 67 29 3b 7d 0d 0a 0d 0a 09 76 69 72 74 75 ang);}.....virtu
6dd0: 61 6c 20 69 6e 74 20 48 61 73 52 65 74 56 61 6c al int HasRetVal
6de0: 28 69 6e 74 20 6e 4d 65 74 68 6f 64 29 63 6f 6e (int nMethod)con
6df0: 73 74 0d 0a 09 09 7b 72 65 74 75 72 6e 20 6d 65 st....{return me
6e00: 74 68 5f 70 6f 6c 3c 54 3e 3a 3a 48 61 73 52 65 th_pol<T>::HasRe
6e10: 74 56 61 6c 28 6e 4d 65 74 68 6f 64 29 3b 7d 0d tVal(nMethod);}.
6e20: 0a 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
6e30: 47 65 74 4e 50 61 72 61 6d 73 28 69 6e 74 20 6e GetNParams(int n
6e40: 4d 65 74 68 6f 64 29 63 6f 6e 73 74 0d 0a 09 09 Method)const....
6e50: 7b 72 65 74 75 72 6e 20 6d 65 74 68 5f 70 6f 6c {return meth_pol
6e60: 3c 54 3e 3a 3a 47 65 74 4e 50 61 72 61 6d 73 28 <T>::GetNParams(
6e70: 6e 4d 65 74 68 6f 64 29 3b 7d 0d 0a 0d 0a 09 76 nMethod);}.....v
6e80: 69 72 74 75 61 6c 20 69 6e 74 20 47 65 74 50 61 irtual int GetPa
6e90: 72 61 6d 44 65 66 56 61 6c 75 65 28 69 6e 74 20 ramDefValue(int
6ea0: 6e 4d 65 74 68 6f 64 2c 20 69 6e 74 20 6e 50 61 nMethod, int nPa
6eb0: 72 61 6d 2c 20 43 56 61 6c 75 65 2a 20 70 56 61 ram, CValue* pVa
6ec0: 6c 75 65 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 lue)const....{re
6ed0: 74 75 72 6e 20 6d 65 74 68 5f 70 6f 6c 3c 54 3e turn meth_pol<T>
6ee0: 3a 3a 47 65 74 44 65 66 56 61 6c 28 73 74 61 74 ::GetDefVal(stat
6ef0: 69 63 5f 63 61 73 74 3c 63 6f 6e 73 74 20 54 2a ic_cast<const T*
6f00: 3e 28 74 68 69 73 29 2c 20 6e 4d 65 74 68 6f 64 >(this), nMethod
6f10: 2c 20 6e 50 61 72 61 6d 2c 20 70 56 61 6c 75 65 , nParam, pValue
6f20: 29 3b 7d 0d 0a 0d 0a 09 76 69 72 74 75 61 6c 20 );}.....virtual
6f30: 69 6e 74 20 43 61 6c 6c 41 73 46 75 6e 63 28 69 int CallAsFunc(i
6f40: 6e 74 20 6e 4d 65 74 68 6f 64 2c 20 43 56 61 6c nt nMethod, CVal
6f50: 75 65 26 20 72 65 74 56 61 6c 2c 43 56 61 6c 75 ue& retVal,CValu
6f60: 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 0d 0a 09 e** ppParams)...
6f70: 09 7b 72 65 74 75 72 6e 20 6d 65 74 68 5f 70 6f .{return meth_po
6f80: 6c 3c 54 3e 3a 3a 43 61 6c 6c 41 73 46 75 6e 63 l<T>::CallAsFunc
6f90: 28 73 74 61 74 69 63 5f 63 61 73 74 3c 54 2a 3e (static_cast<T*>
6fa0: 28 74 68 69 73 29 2c 20 6e 4d 65 74 68 6f 64 2c (this), nMethod,
6fb0: 20 72 65 74 56 61 6c 2c 20 70 70 50 61 72 61 6d retVal, ppParam
6fc0: 73 29 3b 7d 0d 0a 0d 0a 09 76 69 72 74 75 61 6c s);}.....virtual
6fd0: 20 69 6e 74 20 43 61 6c 6c 41 73 50 72 6f 63 28 int CallAsProc(
6fe0: 69 6e 74 20 6e 4d 65 74 68 6f 64 2c 20 43 56 61 int nMethod, CVa
6ff0: 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 29 0d lue** ppParams).
7000: 0a 09 09 7b 72 65 74 75 72 6e 20 6d 65 74 68 5f ...{return meth_
7010: 70 6f 6c 3c 54 3e 3a 3a 43 61 6c 6c 41 73 50 72 pol<T>::CallAsPr
7020: 6f 63 28 73 74 61 74 69 63 5f 63 61 73 74 3c 54 oc(static_cast<T
7030: 2a 3e 28 74 68 69 73 29 2c 20 6e 4d 65 74 68 6f *>(this), nMetho
7040: 64 2c 20 70 70 50 61 72 61 6d 73 29 3b 7d 0d 0a d, ppParams);}..
7050: 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 47 ...virtual int G
7060: 65 74 4e 50 72 6f 70 73 28 76 6f 69 64 29 63 6f etNProps(void)co
7070: 6e 73 74 0d 0a 09 09 7b 72 65 74 75 72 6e 20 54 nst....{return T
7080: 3a 3a 65 6e 64 70 72 6f 70 73 3a 3a 76 61 6c 3b ::endprops::val;
7090: 7d 0d 0a 09 0d 0a 09 76 69 72 74 75 61 6c 20 63 }......virtual c
70a0: 68 61 72 20 63 6f 6e 73 74 2a 20 47 65 74 50 72 har const* GetPr
70b0: 6f 70 4e 61 6d 65 28 69 6e 74 20 6e 50 72 6f 70 opName(int nProp
70c0: 2c 20 69 6e 74 20 6e 4c 61 6e 67 29 63 6f 6e 73 , int nLang)cons
70d0: 74 0d 0a 09 09 7b 72 65 74 75 72 6e 20 67 65 74 t....{return get
70e0: 6e 61 6d 65 3c 54 3a 3a 65 6e 64 70 72 6f 70 73 name<T::endprops
70f0: 3e 3a 3a 74 79 70 65 3a 3a 47 65 74 4e 61 6d 65 >::type::GetName
7100: 28 6e 50 72 6f 70 2c 20 6e 4c 61 6e 67 29 3b 7d (nProp, nLang);}
7110: 0d 0a 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 .....virtual int
7120: 20 46 69 6e 64 50 72 6f 70 28 63 68 61 72 20 63 FindProp(char c
7130: 6f 6e 73 74 20 2a 6e 61 6d 65 29 63 6f 6e 73 74 onst *name)const
7140: 0d 0a 09 09 7b 72 65 74 75 72 6e 20 66 6e 64 73 ....{return fnds
7150: 65 6c 65 63 74 6f 72 3c 54 3a 3a 65 6e 64 70 72 elector<T::endpr
7160: 6f 70 73 3e 3a 3a 74 79 70 65 3a 3a 46 69 6e 64 ops>::type::Find
7170: 28 6e 61 6d 65 29 3b 7d 0d 0a 09 0d 0a 09 76 69 (name);}......vi
7180: 72 74 75 61 6c 20 69 6e 74 20 49 73 50 72 6f 70 rtual int IsProp
7190: 52 65 61 64 61 62 6c 65 28 69 6e 74 20 6e 50 72 Readable(int nPr
71a0: 6f 70 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 op)const....{ret
71b0: 75 72 6e 20 70 72 6f 70 5f 70 6f 6c 3c 54 3e 3a urn prop_pol<T>:
71c0: 3a 49 73 50 72 6f 70 52 65 61 64 61 62 6c 65 28 :IsPropReadable(
71d0: 6e 50 72 6f 70 29 3b 7d 0d 0a 0d 0a 09 76 69 72 nProp);}.....vir
71e0: 74 75 61 6c 20 69 6e 74 20 47 65 74 50 72 6f 70 tual int GetProp
71f0: 56 61 6c 28 69 6e 74 20 6e 50 72 6f 70 2c 20 43 Val(int nProp, C
7200: 56 61 6c 75 65 26 20 76 61 6c 75 65 29 63 6f 6e Value& value)con
7210: 73 74 0d 0a 09 09 7b 72 65 74 75 72 6e 20 70 72 st....{return pr
7220: 6f 70 5f 70 6f 6c 3c 54 3e 3a 3a 52 65 61 64 50 op_pol<T>::ReadP
7230: 72 6f 70 28 73 74 61 74 69 63 5f 63 61 73 74 3c rop(static_cast<
7240: 63 6f 6e 73 74 20 54 2a 3e 28 74 68 69 73 29 2c const T*>(this),
7250: 20 6e 50 72 6f 70 2c 20 76 61 6c 75 65 29 3b 7d nProp, value);}
7260: 0d 0a 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 .....virtual int
7270: 20 49 73 50 72 6f 70 57 72 69 74 61 62 6c 65 28 IsPropWritable(
7280: 69 6e 74 20 6e 50 72 6f 70 29 63 6f 6e 73 74 0d int nProp)const.
7290: 0a 09 09 7b 72 65 74 75 72 6e 20 70 72 6f 70 5f ...{return prop_
72a0: 70 6f 6c 3c 54 3e 3a 3a 49 73 50 72 6f 70 57 72 pol<T>::IsPropWr
72b0: 69 74 61 62 6c 65 28 6e 50 72 6f 70 29 3b 7d 0d itable(nProp);}.
72c0: 0a 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
72d0: 53 65 74 50 72 6f 70 56 61 6c 28 69 6e 74 20 6e SetPropVal(int n
72e0: 50 72 6f 70 2c 20 43 56 61 6c 75 65 20 63 6f 6e Prop, CValue con
72f0: 73 74 26 20 76 61 6c 75 65 29 0d 0a 09 09 7b 72 st& value)....{r
7300: 65 74 75 72 6e 20 70 72 6f 70 5f 70 6f 6c 3c 54 eturn prop_pol<T
7310: 3e 3a 3a 57 72 69 74 65 50 72 6f 70 28 73 74 61 >::WriteProp(sta
7320: 74 69 63 5f 63 61 73 74 3c 54 2a 3e 28 74 68 69 tic_cast<T*>(thi
7330: 73 29 2c 20 6e 50 72 6f 70 2c 20 76 61 6c 75 65 s), nProp, value
7340: 29 3b 7d 0d 0a 0d 0a 09 2f 2f 20 c5 f1 eb e8 20 );}.....// ....
7350: e7 e4 e5 f1 fc 20 ee f8 e8 e1 ea e0 2c 20 e7 ed ..... ......, ..
7360: e0 f7 e8 f2 2c 20 e2 fb 20 e7 e0 e1 fb eb e8 20 ...., .. ......
7370: e2 f1 f2 e0 e2 e8 f2 fc 20 e2 20 f1 e2 ee e9 20 ........ . ....
7380: ea eb e0 f1 f1 0d 0a 09 2f 2f 20 42 4c 5f 42 45 ........// BL_BE
7390: 47 49 4e 5f 43 4f 4e 54 45 58 54 28 22 45 6e 67 GIN_CONTEXT("Eng
73a0: 6c 69 73 68 54 79 70 65 4e 61 6d 65 22 2c 20 22 lishTypeName", "
73b0: d0 f3 f1 f1 ea ee e5 c8 ec ff d2 e8 ef e0 22 29 ..............")
73c0: 3b 0d 0a 09 76 69 72 74 75 61 6c 20 63 68 61 72 ;...virtual char
73d0: 20 63 6f 6e 73 74 2a 20 47 65 74 54 79 70 65 53 const* GetTypeS
73e0: 74 72 69 6e 67 28 76 6f 69 64 29 63 6f 6e 73 74 tring(void)const
73f0: 0d 0a 09 09 7b 72 65 74 75 72 6e 20 64 65 66 4c ....{return defL
7400: 61 6e 67 20 3f 20 54 3a 3a 47 65 74 52 75 73 54 ang ? T::GetRusT
7410: 79 70 65 53 74 72 69 6e 67 28 29 20 3a 20 54 3a ypeString() : T:
7420: 3a 47 65 74 45 6e 67 54 79 70 65 53 74 72 69 6e :GetEngTypeStrin
7430: 67 28 29 3b 7d 0d 0a 0d 0a 09 2f 2f 20 ce e1 fa g();}.....// ...
7440: e5 ea f2 2c 20 f1 f2 f0 ee ff f9 e8 e9 20 ea e0 ..., ........ ..
7450: f0 f2 fb 20 ec e5 f2 ee e4 ee e2 20 e8 20 f1 e2 ... ....... . ..
7460: ee e9 f1 f2 e2 2e 20 cf f0 ee ef e8 f1 e0 ed 20 ...... ........
7470: ea e0 ea 20 73 74 61 74 69 63 20 e2 20 ea ee ed ... static . ...
7480: f1 f2 f0 f3 ea f2 ee f0 e5 0d 0a 09 2f 2f 20 ee ............// .
7490: f1 ed ee e2 ed ee e3 ee 20 ea eb e0 f1 f1 e0 2c ........ ......,
74a0: 20 f2 ee 20 e5 f1 f2 fc 20 ef ee f1 f2 f0 ee e5 .. .... .......
74b0: ed e8 e5 20 ea e0 f0 f2 fb 20 e8 e4 e5 f2 20 ef ... ..... .... .
74c0: f0 e8 20 f1 ee e7 e4 e0 ed e8 e8 20 ef e5 f0 e2 .. ........ ....
74d0: ee e3 ee 20 ee e1 fa e5 ea f2 e0 0d 0a 09 73 74 ... ..........st
74e0: 72 75 63 74 20 69 6e 69 74 5f 61 6c 6c 5f 6d 61 ruct init_all_ma
74f0: 70 0d 0a 09 7b 0d 0a 09 09 69 6e 69 74 5f 61 6c p...{....init_al
7500: 6c 5f 6d 61 70 28 29 0d 0a 09 09 7b 0d 0a 09 09 l_map()....{....
7510: 09 66 6e 64 73 65 6c 65 63 74 6f 72 3c 54 3a 3a .fndselector<T::
7520: 65 6e 64 6d 65 74 68 73 3e 3a 3a 74 79 70 65 3a endmeths>::type:
7530: 3a 4f 6e 49 6e 69 74 46 69 72 73 74 4f 62 6a 65 :OnInitFirstObje
7540: 63 74 28 29 3b 0d 0a 09 09 09 66 6e 64 73 65 6c ct();.....fndsel
7550: 65 63 74 6f 72 3c 54 3a 3a 65 6e 64 70 72 6f 70 ector<T::endprop
7560: 73 3e 3a 3a 74 79 70 65 3a 3a 4f 6e 49 6e 69 74 s>::type::OnInit
7570: 46 69 72 73 74 4f 62 6a 65 63 74 28 29 3b 0d 0a FirstObject();..
7580: 09 09 7d 0d 0a 09 7d 3b 0d 0a 0d 0a 09 73 74 61 ..}...};.....sta
7590: 74 69 63 20 76 6f 69 64 20 49 6e 69 74 28 29 7b tic void Init(){
75a0: 69 6e 69 74 5f 64 6f 6e 65 5f 70 6f 6c 69 63 79 init_done_policy
75b0: 3a 3a 49 6e 69 74 28 29 3b 7d 0d 0a 09 73 74 61 ::Init();}...sta
75c0: 74 69 63 20 76 6f 69 64 20 44 6f 6e 65 28 29 7b tic void Done(){
75d0: 69 6e 69 74 5f 64 6f 6e 65 5f 70 6f 6c 69 63 79 init_done_policy
75e0: 3a 3a 44 6f 6e 65 28 29 3b 7d 0d 0a 7d 3b 0d 0a ::Done();}..};..
75f0: 0d 0a 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 6e ..template<typen
7600: 61 6d 65 20 54 3e 0d 0a 73 74 72 75 63 74 20 76 ame T>..struct v
7610: 61 72 69 61 62 6c 65 5f 61 72 67 75 6d 65 6e 74 ariable_argument
7620: 73 0d 0a 7b 0d 0a 09 73 74 61 74 69 63 20 69 6e s..{...static in
7630: 74 20 47 65 74 4e 50 61 72 61 6d 73 28 44 57 4f t GetNParams(DWO
7640: 52 44 20 64 77 4d 65 74 68 6f 64 2c 20 63 6f 6e RD dwMethod, con
7650: 73 74 20 44 57 4f 52 44 26 20 64 77 43 61 6c 6c st DWORD& dwCall
7660: 50 61 72 61 6d 73 29 0d 0a 09 7b 0d 0a 09 09 69 Params)...{....i
7670: 66 28 64 77 4d 65 74 68 6f 64 3c 54 3a 3a 65 6e f(dwMethod<T::en
7680: 64 6d 65 74 68 73 3a 3a 76 61 6c 29 0d 0a 09 09 dmeths::val)....
7690: 09 72 65 74 75 72 6e 20 5f 47 65 74 4e 50 61 72 .return _GetNPar
76a0: 61 6d 73 28 64 77 4d 65 74 68 6f 64 2c 20 64 77 ams(dwMethod, dw
76b0: 43 61 6c 6c 50 61 72 61 6d 73 2c 20 28 54 3a 3a CallParams, (T::
76c0: 65 6e 64 6d 65 74 68 73 3a 3a 70 72 65 76 2a 29 endmeths::prev*)
76d0: 4e 55 4c 4c 29 3b 0d 0a 09 09 72 65 74 75 72 6e NULL);....return
76e0: 20 2d 31 3b 0d 0a 09 7d 0d 0a 09 74 65 6d 70 6c -1;...}...templ
76f0: 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 4d 3e 0d ate<typename M>.
7700: 0a 09 73 74 61 74 69 63 20 69 6e 74 20 5f 47 65 ..static int _Ge
7710: 74 4e 50 61 72 61 6d 73 28 44 57 4f 52 44 20 64 tNParams(DWORD d
7720: 77 4d 65 74 68 6f 64 2c 20 63 6f 6e 73 74 20 44 wMethod, const D
7730: 57 4f 52 44 26 20 64 77 43 61 6c 6c 50 61 72 61 WORD& dwCallPara
7740: 6d 73 2c 20 4d 2a 29 0d 0a 09 7b 0d 0a 09 09 69 ms, M*)...{....i
7750: 66 28 64 77 4d 65 74 68 6f 64 3d 3d 4d 3a 3a 76 f(dwMethod==M::v
7760: 61 6c 29 0d 0a 09 09 7b 0d 0a 09 09 09 69 66 28 al)....{.....if(
7770: 30 3d 3d 28 4d 3a 3a 6e 50 61 72 61 6d 20 3e 3e 0==(M::nParam >>
7780: 20 31 36 29 29 0d 0a 09 09 09 09 72 65 74 75 72 16))......retur
7790: 6e 20 4d 3a 3a 6e 50 61 72 61 6d 3b 0d 0a 09 09 n M::nParam;....
77a0: 09 65 6c 73 65 20 69 66 20 28 64 77 43 61 6c 6c .else if (dwCall
77b0: 50 61 72 61 6d 73 3d 3d 20 2d 31 29 0d 0a 09 09 Params== -1)....
77c0: 09 09 72 65 74 75 72 6e 20 4d 3a 3a 6e 50 61 72 ..return M::nPar
77d0: 61 6d 20 26 20 30 78 46 46 46 46 3b 0d 0a 09 09 am & 0xFFFF;....
77e0: 09 72 65 74 75 72 6e 20 64 77 43 61 6c 6c 50 61 .return dwCallPa
77f0: 72 61 6d 73 20 3e 20 28 4d 3a 3a 6e 50 61 72 61 rams > (M::nPara
7800: 6d 20 26 20 30 78 46 46 46 46 29 20 3f 20 64 77 m & 0xFFFF) ? dw
7810: 43 61 6c 6c 50 61 72 61 6d 73 20 3a 20 28 4d 3a CallParams : (M:
7820: 3a 6e 50 61 72 61 6d 20 26 20 30 78 46 46 46 46 :nParam & 0xFFFF
7830: 29 3b 0d 0a 09 09 7d 0d 0a 09 09 72 65 74 75 72 );....}....retur
7840: 6e 20 5f 47 65 74 4e 50 61 72 61 6d 73 28 64 77 n _GetNParams(dw
7850: 4d 65 74 68 6f 64 2c 20 64 77 43 61 6c 6c 50 61 Method, dwCallPa
7860: 72 61 6d 73 2c 20 28 4d 3a 3a 70 72 65 76 2a 29 rams, (M::prev*)
7870: 4e 55 4c 4c 29 3b 0d 0a 09 7d 0d 0a 09 74 65 6d NULL);...}...tem
7880: 70 6c 61 74 65 3c 3e 73 74 61 74 69 63 20 69 6e plate<>static in
7890: 74 20 5f 47 65 74 4e 50 61 72 61 6d 73 3c 66 69 t _GetNParams<fi
78a0: 72 73 74 5f 64 65 66 3e 28 44 57 4f 52 44 2c 20 rst_def>(DWORD,
78b0: 63 6f 6e 73 74 20 44 57 4f 52 44 26 2c 20 66 69 const DWORD&, fi
78c0: 72 73 74 5f 64 65 66 2a 29 7b 72 65 74 75 72 6e rst_def*){return
78d0: 20 2d 31 3b 7d 0d 0a 7d 3b 0d 0a 0d 0a 2f 2f 20 -1;}..};....//
78e0: c1 e0 e7 ee e2 fb e9 20 ea eb e0 f1 f1 20 e4 eb ....... ..... ..
78f0: ff 20 ea ee ed f2 e5 ea f1 f2 ee e2 2c 20 e8 ec . .........., ..
7900: e5 fe f9 e8 f5 20 e2 20 f1 e2 ee e5 ec 20 f1 ee ..... . ..... ..
7910: f1 f2 e0 e2 e5 20 ec e5 f2 ee e4 fb 20 f1 20 ed ..... ...... . .
7920: e5 ee ef f0 e5 e4 e5 eb e5 ed ed fb ec 0d 0a 2f .............../
7930: 2f 20 ea ee eb e8 f7 e5 f1 f2 e2 ee ec 20 e0 f0 / ........... ..
7940: e3 f3 ec e5 ed f2 ee e2 2e 20 c4 eb ff 20 e7 e0 ......... ... ..
7950: e4 e0 ed e8 ff 20 ec e5 f2 ee e4 e0 2c 20 e8 ec ..... ......, ..
7960: e5 fe f9 e5 e3 ee 20 ed e5 ee ef f0 e5 e4 e5 eb ...... .........
7970: e5 ed ed ee e5 20 ea ee eb e8 f7 e5 f1 f2 e2 ee ..... ..........
7980: 0d 0a 2f 2f 20 e0 f0 e3 f3 ec e5 ed f2 ee e2 2c ..// ..........,
7990: 20 e2 20 ec e0 ea f0 ee f1 e0 f5 20 ee e1 fa ff . ........ ....
79a0: e2 eb e5 ed e8 ff 20 ec e5 f2 ee e4 ee e2 20 e8 ...... ....... .
79b0: f1 ef ee eb fc e7 f3 e9 f2 e5 20 e4 eb ff 20 e7 .......... ... .
79c0: e0 e4 e0 ed e8 ff 20 ea ee eb e8 f7 e5 f1 f2 e2 ...... .........
79d0: e0 20 e0 f0 e3 f3 ec e5 ed f2 ee e2 0d 0a 2f 2f . ............//
79e0: 20 56 52 42 4c 5f 41 52 47 28 ec e8 ed e8 ec e0 VRBL_ARG(......
79f0: eb fc ed ee e5 20 ea ee eb e8 f7 e5 f1 f2 e2 ee ..... ..........
7a00: 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 29 0d 0a 2f 2f ..........)..//
7a10: 20 cd e0 ef f0 e8 ec e5 f0 2c 20 42 4c 5f 50 52 ........, BL_PR
7a20: 4f 43 28 54 65 73 74 2c 20 22 d2 e5 f1 f2 22 2c OC(Test, "....",
7a30: 20 56 52 42 4c 5f 41 52 47 28 32 29 29 3b 0d 0a VRBL_ARG(2));..
7a40: 2f 2f 20 c2 20 ec e5 f2 ee e4 e5 2d ee e1 f0 e0 // . ......-....
7a50: e1 ee f2 f7 e8 ea e5 20 ea ee eb e8 f7 e5 f1 f2 ....... ........
7a60: e2 ee 20 ef e5 f0 e5 e4 e0 ed ed fb f5 20 ef e0 .. .......... ..
7a70: f0 e0 ec e5 f2 f0 ee e2 20 ec ee e6 ed ee 20 f1 ........ ..... .
7a80: f7 e8 f2 e0 f2 fc 20 e8 e7 20 6d 5f 64 77 43 61 ...... .. m_dwCa
7a90: 6c 6c 50 61 72 61 6d 43 6f 75 6e 74 0d 0a 74 65 llParamCount..te
7aa0: 6d 70 6c 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 mplate<typename
7ab0: 54 2c 20 74 79 70 65 6e 61 6d 65 20 49 6e 69 74 T, typename Init
7ac0: 44 6f 6e 65 50 6f 6c 69 63 79 20 3d 20 72 65 67 DonePolicy = reg
7ad0: 5f 43 72 65 61 74 65 4f 62 6a 65 63 74 3c 54 3e _CreateObject<T>
7ae0: 2c 20 42 4f 4f 4c 20 62 49 6d 70 6c 65 6d 65 6e , BOOL bImplemen
7af0: 74 52 54 43 3d 54 52 55 45 3e 0d 0a 63 6c 61 73 tRTC=TRUE>..clas
7b00: 73 20 43 43 6f 6e 74 65 78 74 56 72 62 6c 41 72 s CContextVrblAr
7b10: 67 73 3a 20 70 75 62 6c 69 63 20 43 43 6f 6e 74 gs: public CCont
7b20: 65 78 74 49 6d 70 6c 3c 54 2c 20 49 6e 69 74 44 extImpl<T, InitD
7b30: 6f 6e 65 50 6f 6c 69 63 79 2c 20 62 49 6d 70 6c onePolicy, bImpl
7b40: 65 6d 65 6e 74 52 54 43 3e 0d 0a 7b 0d 0a 70 72 ementRTC>..{..pr
7b50: 6f 74 65 63 74 65 64 3a 0d 0a 09 6d 75 74 61 62 otected:...mutab
7b60: 6c 65 20 44 57 4f 52 44 20 6d 5f 64 77 43 61 6c le DWORD m_dwCal
7b70: 6c 50 61 72 61 6d 43 6f 75 6e 74 3b 0d 0a 70 75 lParamCount;..pu
7b80: 62 6c 69 63 3a 0d 0a 09 43 43 6f 6e 74 65 78 74 blic:...CContext
7b90: 56 72 62 6c 41 72 67 73 28 29 7b 7d 0d 0a 09 76 VrblArgs(){}...v
7ba0: 69 72 74 75 61 6c 20 69 6e 74 20 49 73 4f 6c 65 irtual int IsOle
7bb0: 43 6f 6e 74 65 78 74 28 76 6f 69 64 29 63 6f 6e Context(void)con
7bc0: 73 74 0d 0a 09 7b 0d 0a 09 09 44 57 4f 52 44 20 st...{....DWORD
7bd0: 72 65 67 45 42 58 20 3d 20 30 3b 0d 0a 09 09 5f regEBX = 0;...._
7be0: 5f 61 73 6d 0d 0a 09 09 7b 0d 0a 09 09 09 6d 6f _asm....{.....mo
7bf0: 76 20 72 65 67 45 42 58 2c 20 65 62 78 20 2f 2f v regEBX, ebx //
7c00: 20 c2 20 fd f2 ee ec 20 f0 e5 e3 e8 f1 f2 f0 e5 . .... ........
7c10: 20 31 d1 20 f5 f0 e0 ed e8 f2 20 ea ee eb e8 f7 1. ...... .....
7c20: e5 f1 f2 e2 ee 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 ..... ..........
7c30: 20 ef f0 e8 20 e2 fb e7 ee e2 e5 20 ec e5 f2 ee ... ...... ....
7c40: e4 e0 0d 0a 09 09 7d 0d 0a 09 09 6d 5f 64 77 43 ......}....m_dwC
7c50: 61 6c 6c 50 61 72 61 6d 43 6f 75 6e 74 20 3d 20 allParamCount =
7c60: 72 65 67 45 42 58 3b 0d 0a 09 09 72 65 74 75 72 regEBX;....retur
7c70: 6e 20 46 41 4c 53 45 3b 0d 0a 09 7d 0d 0a 0d 0a n FALSE;...}....
7c80: 09 76 69 72 74 75 61 6c 20 69 6e 74 20 47 65 74 .virtual int Get
7c90: 4e 50 61 72 61 6d 73 28 69 6e 74 20 6e 4d 65 74 NParams(int nMet
7ca0: 68 6f 64 29 63 6f 6e 73 74 0d 0a 09 7b 0d 0a 09 hod)const...{...
7cb0: 09 72 65 74 75 72 6e 20 76 61 72 69 61 62 6c 65 .return variable
7cc0: 5f 61 72 67 75 6d 65 6e 74 73 3c 54 3e 3a 3a 47 _arguments<T>::G
7cd0: 65 74 4e 50 61 72 61 6d 73 28 6e 4d 65 74 68 6f etNParams(nMetho
7ce0: 64 2c 20 6d 5f 64 77 43 61 6c 6c 50 61 72 61 6d d, m_dwCallParam
7cf0: 43 6f 75 6e 74 29 3b 0d 0a 09 7d 0d 0a 09 0d 0a Count);...}.....
7d00: 7d 3b 0d 0a 23 64 65 66 69 6e 65 20 56 52 42 4c };..#define VRBL
7d10: 5f 41 52 47 28 78 29 20 28 30 78 31 30 30 30 30 _ARG(x) (0x10000
7d20: 20 7c 20 28 78 29 29 0d 0a 0d 0a 0d 0a 2f 2f 2f | (x))......///
7d30: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7d40: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7d50: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7d60: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f ////////////////
7d70: 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 2f 0d 0a 2f 2f ////////////..//
7d80: 20 ca eb e0 f1 f1 fb 20 e4 eb ff 20 f0 e0 e7 e4 ...... ... ....
7d90: e5 eb fc ed ee e3 ee 20 ee e1 fa ff e2 eb e5 ed ....... ........
7da0: e8 ff 20 e8 20 f0 e5 e0 eb e8 e7 e0 f6 e8 e8 20 .. . ..........
7db0: ea ee ed f2 e5 ea f1 f2 ee e2 0d 0a 0d 0a 2f 2f ..............//
7dc0: 20 c4 e0 ed ed fb e9 20 ea eb e0 f1 f1 20 f1 eb ...... ..... ..
7dd0: f3 e6 e8 f2 20 e4 eb ff 20 e7 e0 e4 e0 ed e8 ff .... ... .......
7de0: 20 22 e7 e0 e3 ee eb ee e2 ea e0 22 20 ea ee ed "........." ...
7df0: f2 e5 ea f1 f2 e0 20 28 f1 ee f1 f2 e0 e2 e0 20 ...... (.......
7e00: ec e5 f2 ee e4 ee e2 20 e8 20 f1 e2 ee e9 f1 f2 ....... . ......
7e10: e2 29 2c 0d 0a 2f 2f 20 e8 20 f0 e5 e0 eb e8 e7 .),..// . ......
7e20: f3 e5 f2 20 e2 f1 e5 20 ec e5 f2 ee e4 fb 2c 20 ... ... ......,
7e30: f1 e2 ff e7 e0 ed ed fb e5 20 f1 20 ef ee e8 f1 ......... . ....
7e40: ea ee ec 20 ec e5 f2 ee e4 ee e2 2f f1 e2 ee e9 ... ......./....
7e50: f1 f2 e2 2c 20 ea ee eb e8 f7 e5 f1 f2 e2 ee ec ..., ...........
7e60: 20 e8 f5 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 2c 0d .. ..........,.
7e70: 0a 2f 2f 20 f2 e8 ef ee ec 20 e2 ee e7 e2 f0 e0 .// ..... ......
7e80: f9 e0 e5 ec ee e3 ee 20 e7 ed e0 f7 e5 ed e8 ff ....... ........
7e90: 2e 0d 0a 2f 2f 20 c8 f1 ef ee eb fc e7 ee e2 e0 ...// ..........
7ea0: ed e8 e5 3a 0d 0a 2f 2f 20 c7 e0 e3 ee eb ee e2 ...:..// .......
7eb0: ee ea 20 ea ee ed f2 e5 ea f1 f2 e0 20 2d 0d 0a .. ......... -..
7ec0: 2f 2f 20 74 65 6d 70 6c 61 74 65 3c 74 79 70 65 // template<type
7ed0: 6e 61 6d 65 20 54 3e 0d 0a 2f 2f 20 63 6c 61 73 name T>..// clas
7ee0: 73 20 43 4d 79 43 6f 6e 74 65 78 74 20 3a 20 70 s CMyContext : p
7ef0: 75 62 6c 69 63 20 43 44 65 63 6c 61 72 65 43 74 ublic CDeclareCt
7f00: 78 3c 43 4d 79 43 6f 6e 74 65 78 74 3e 0d 0a 2f x<CMyContext>../
7f10: 2f 20 7b 0d 0a 2f 2f 09 09 74 79 70 65 64 65 66 / {..//..typedef
7f20: 20 54 20 49 6d 70 6c 54 79 70 65 3b 0d 0a 2f 2f T ImplType;..//
7f30: 09 09 2e 2e 2e 20 ee e1 fa ff e2 eb e5 ed e8 ff ..... ..........
7f40: 20 ec e5 f2 ee e4 ee e2 2f f1 e2 ee e9 f1 f2 e2 ......./.......
7f50: 0d 0a 2f 2f 20 7d 3b 0d 0a 2f 2f 20 d0 e5 e0 eb ..// };..// ....
7f60: e8 e7 e0 f6 e8 ff 20 ea ee ed f2 e5 ea f1 f2 e0 ...... .........
7f70: 3a 0d 0a 2f 2f 20 63 6c 61 73 73 20 43 49 6d 70 :..// class CImp
7f80: 6c 4d 79 43 6f 6e 74 65 78 74 20 3a 20 70 75 62 lMyContext : pub
7f90: 6c 69 63 20 43 44 65 63 6c 43 74 78 49 6d 70 6c lic CDeclCtxImpl
7fa0: 3c 43 49 6d 70 6c 4d 79 43 6f 6e 74 65 78 74 2c <CImplMyContext,
7fb0: 20 43 4d 79 43 6f 6e 74 65 78 74 3c 43 49 6d 70 CMyContext<CImp
7fc0: 6c 4d 79 43 6f 6e 74 65 78 74 3e 20 2e 2e 2e 3e lMyContext> ...>
7fd0: 0d 0a 2f 2f 20 7b 0d 0a 2f 2f 09 09 2e 2e 2e 20 ..// {..//.....
7fe0: f0 e5 e0 eb e8 e7 e0 f6 e8 ff 20 ec e5 f2 ee e4 .......... .....
7ff0: ee e2 20 ea ee ed f2 e5 ea f1 f2 e0 2e 0d 0a 2f .. ............/
8000: 2f 20 7d 0d 0a 0d 0a 74 65 6d 70 6c 61 74 65 3c / }....template<
8010: 74 79 70 65 6e 61 6d 65 20 54 3e 0d 0a 63 6c 61 typename T>..cla
8020: 73 73 20 43 44 65 63 6c 61 72 65 43 74 78 20 3a ss CDeclareCtx :
8030: 20 70 75 62 6c 69 63 20 43 43 6f 6e 74 65 78 74 public CContext
8040: 42 61 73 65 0d 0a 7b 0d 0a 70 75 62 6c 69 63 3a Base..{..public:
8050: 0d 0a 09 74 79 70 65 64 65 66 20 54 20 44 65 63 ...typedef T Dec
8060: 6c 54 79 70 65 3b 0d 0a 09 74 79 70 65 64 65 66 lType;...typedef
8070: 20 43 44 65 63 6c 61 72 65 43 74 78 3c 54 3e 20 CDeclareCtx<T>
8080: 42 61 73 65 44 65 63 6c 54 79 70 65 3b 0d 0a 0d BaseDeclType;...
8090: 0a 09 43 44 65 63 6c 61 72 65 43 74 78 28 29 20 ..CDeclareCtx()
80a0: 7b 20 73 74 61 74 69 63 20 69 6e 69 74 5f 61 6c { static init_al
80b0: 6c 5f 6d 61 70 20 69 61 6d 3b 20 7d 0d 0a 09 7e l_map iam; }...~
80c0: 43 44 65 63 6c 61 72 65 43 74 78 28 29 7b 7d 0d CDeclareCtx(){}.
80d0: 0a 09 0d 0a 09 0d 0a 09 74 65 6d 70 6c 61 74 65 ........template
80e0: 3c 74 79 70 65 6e 61 6d 65 20 50 3e 20 73 74 72 <typename P> str
80f0: 75 63 74 20 65 6e 64 5f 64 65 66 20 7b 74 79 70 uct end_def {typ
8100: 65 64 65 66 20 50 20 70 72 65 76 3b 65 6e 75 6d edef P prev;enum
8110: 7b 76 61 6c 3d 70 72 65 76 3a 3a 76 61 6c 2b 31 {val=prev::val+1
8120: 7d 3b 7d 3b 0d 0a 09 2f 2f 20 c2 20 ea ee ed e5 };};...// . ....
8130: f7 ed ee ec 20 ea eb e0 f1 f1 e5 20 fd f2 e8 20 .... ...... ...
8140: f2 e0 e9 ef e4 e5 f4 fb 20 e2 ee e7 ec ee e6 ed ........ .......
8150: ee 20 e1 f3 e4 f3 f2 20 ef e5 f0 e5 ee ef f0 e5 . ..... ........
8160: e4 e5 eb e5 ed fb 2c 20 f3 ea e0 e7 f3 ff 20 ed ......, ...... .
8170: e0 20 ef ee f1 eb e5 e4 ed e8 e9 20 ec e5 f2 ee . ......... ....
8180: e4 2f f1 e2 ee e9 f1 f2 e2 ee 0d 0a 09 74 79 70 ./...........typ
8190: 65 64 65 66 20 65 6e 64 5f 64 65 66 3c 66 69 72 edef end_def<fir
81a0: 73 74 5f 64 65 66 3e 20 65 6e 64 6d 65 74 68 73 st_def> endmeths
81b0: 3b 0d 0a 09 74 79 70 65 64 65 66 20 65 6e 64 5f ;...typedef end_
81c0: 64 65 66 3c 66 69 72 73 74 5f 64 65 66 3e 20 65 def<first_def> e
81d0: 6e 64 70 72 6f 70 73 3b 0d 0a 09 0d 0a 09 2f 2f ndprops;......//
81e0: 20 d0 e5 e0 eb e8 e7 e0 f6 e8 ff 20 e2 e8 f0 f2 .......... ....
81f0: f3 e0 eb fc ed fb f5 20 ec e5 f2 ee e4 ee e2 20 ....... .......
8200: ea ee ed f2 e5 ea f1 f2 e0 0d 0a 09 76 69 72 74 ............virt
8210: 75 61 6c 20 69 6e 74 20 47 65 74 4e 4d 65 74 68 ual int GetNMeth
8220: 6f 64 73 28 76 6f 69 64 29 63 6f 6e 73 74 0d 0a ods(void)const..
8230: 09 09 7b 72 65 74 75 72 6e 20 54 3a 3a 65 6e 64 ..{return T::end
8240: 6d 65 74 68 73 3a 3a 76 61 6c 3b 7d 0d 0a 09 0d meths::val;}....
8250: 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 46 69 ..virtual int Fi
8260: 6e 64 4d 65 74 68 6f 64 28 63 68 61 72 20 63 6f ndMethod(char co
8270: 6e 73 74 20 2a 6e 61 6d 65 29 63 6f 6e 73 74 0d nst *name)const.
8280: 0a 09 09 7b 72 65 74 75 72 6e 20 66 6e 64 73 65 ...{return fndse
8290: 6c 65 63 74 6f 72 3c 54 3a 3a 65 6e 64 6d 65 74 lector<T::endmet
82a0: 68 73 3e 3a 3a 74 79 70 65 3a 3a 46 69 6e 64 28 hs>::type::Find(
82b0: 6e 61 6d 65 29 3b 7d 0d 0a 09 0d 0a 09 76 69 72 name);}......vir
82c0: 74 75 61 6c 20 63 68 61 72 20 63 6f 6e 73 74 2a tual char const*
82d0: 20 47 65 74 4d 65 74 68 6f 64 4e 61 6d 65 28 69 GetMethodName(i
82e0: 6e 74 20 6e 4d 65 74 68 6f 64 2c 20 69 6e 74 20 nt nMethod, int
82f0: 6e 4c 61 6e 67 29 63 6f 6e 73 74 0d 0a 09 09 7b nLang)const....{
8300: 72 65 74 75 72 6e 20 67 65 74 6e 61 6d 65 3c 54 return getname<T
8310: 3a 3a 65 6e 64 6d 65 74 68 73 3e 3a 3a 74 79 70 ::endmeths>::typ
8320: 65 3a 3a 47 65 74 4e 61 6d 65 28 6e 4d 65 74 68 e::GetName(nMeth
8330: 6f 64 2c 20 6e 4c 61 6e 67 29 3b 7d 0d 0a 09 0d od, nLang);}....
8340: 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 48 61 ..virtual int Ha
8350: 73 52 65 74 56 61 6c 28 69 6e 74 20 6e 4d 65 74 sRetVal(int nMet
8360: 68 6f 64 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 hod)const....{re
8370: 74 75 72 6e 20 6d 65 74 68 5f 70 6f 6c 3c 54 3e turn meth_pol<T>
8380: 3a 3a 48 61 73 52 65 74 56 61 6c 28 6e 4d 65 74 ::HasRetVal(nMet
8390: 68 6f 64 29 3b 7d 0d 0a 09 0d 0a 09 76 69 72 74 hod);}......virt
83a0: 75 61 6c 20 69 6e 74 20 47 65 74 4e 50 61 72 61 ual int GetNPara
83b0: 6d 73 28 69 6e 74 20 6e 4d 65 74 68 6f 64 29 63 ms(int nMethod)c
83c0: 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 75 72 6e 20 onst....{return
83d0: 6d 65 74 68 5f 70 6f 6c 3c 54 3e 3a 3a 47 65 74 meth_pol<T>::Get
83e0: 4e 50 61 72 61 6d 73 28 6e 4d 65 74 68 6f 64 29 NParams(nMethod)
83f0: 3b 7d 0d 0a 09 0d 0a 09 76 69 72 74 75 61 6c 20 ;}......virtual
8400: 69 6e 74 20 47 65 74 4e 50 72 6f 70 73 28 76 6f int GetNProps(vo
8410: 69 64 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 id)const....{ret
8420: 75 72 6e 20 54 3a 3a 65 6e 64 70 72 6f 70 73 3a urn T::endprops:
8430: 3a 76 61 6c 3b 7d 0d 0a 09 0d 0a 09 76 69 72 74 :val;}......virt
8440: 75 61 6c 20 63 68 61 72 20 63 6f 6e 73 74 2a 20 ual char const*
8450: 47 65 74 50 72 6f 70 4e 61 6d 65 28 69 6e 74 20 GetPropName(int
8460: 6e 50 72 6f 70 2c 20 69 6e 74 20 6e 4c 61 6e 67 nProp, int nLang
8470: 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 75 72 )const....{retur
8480: 6e 20 67 65 74 6e 61 6d 65 3c 54 3a 3a 65 6e 64 n getname<T::end
8490: 70 72 6f 70 73 3e 3a 3a 74 79 70 65 3a 3a 47 65 props>::type::Ge
84a0: 74 4e 61 6d 65 28 6e 50 72 6f 70 2c 20 6e 4c 61 tName(nProp, nLa
84b0: 6e 67 29 3b 7d 0d 0a 09 0d 0a 09 76 69 72 74 75 ng);}......virtu
84c0: 61 6c 20 69 6e 74 20 46 69 6e 64 50 72 6f 70 28 al int FindProp(
84d0: 63 68 61 72 20 63 6f 6e 73 74 20 2a 6e 61 6d 65 char const *name
84e0: 29 63 6f 6e 73 74 0d 0a 09 09 7b 72 65 74 75 72 )const....{retur
84f0: 6e 20 66 6e 64 73 65 6c 65 63 74 6f 72 3c 54 3a n fndselector<T:
8500: 3a 65 6e 64 70 72 6f 70 73 3e 3a 3a 74 79 70 65 :endprops>::type
8510: 3a 3a 46 69 6e 64 28 6e 61 6d 65 29 3b 7d 0d 0a ::Find(name);}..
8520: 09 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
8530: 49 73 50 72 6f 70 52 65 61 64 61 62 6c 65 28 69 IsPropReadable(i
8540: 6e 74 20 6e 50 72 6f 70 29 63 6f 6e 73 74 0d 0a nt nProp)const..
8550: 09 09 7b 72 65 74 75 72 6e 20 70 72 6f 70 5f 70 ..{return prop_p
8560: 6f 6c 3c 54 3e 3a 3a 49 73 50 72 6f 70 52 65 61 ol<T>::IsPropRea
8570: 64 61 62 6c 65 28 6e 50 72 6f 70 29 3b 7d 0d 0a dable(nProp);}..
8580: 09 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
8590: 49 73 50 72 6f 70 57 72 69 74 61 62 6c 65 28 69 IsPropWritable(i
85a0: 6e 74 20 6e 50 72 6f 70 29 63 6f 6e 73 74 0d 0a nt nProp)const..
85b0: 09 09 7b 72 65 74 75 72 6e 20 70 72 6f 70 5f 70 ..{return prop_p
85c0: 6f 6c 3c 54 3e 3a 3a 49 73 50 72 6f 70 57 72 69 ol<T>::IsPropWri
85d0: 74 61 62 6c 65 28 6e 50 72 6f 70 29 3b 7d 0d 0a table(nProp);}..
85e0: 09 0d 0a 09 2f 2f 20 c5 f1 eb e8 20 e7 e4 e5 f1 ....// .... ....
85f0: fc 20 ee f8 e8 e1 ea e0 2c 20 e7 ed e0 f7 e8 f2 . ......, ......
8600: 2c 20 e2 fb 20 e7 e0 e1 fb eb e8 20 e2 f1 f2 e0 , .. ...... ....
8610: e2 e8 f2 fc 20 e2 20 f1 e2 ee e9 20 ea eb e0 f1 .... . .... ....
8620: f1 0d 0a 09 2f 2f 20 42 4c 5f 42 45 47 49 4e 5f ....// BL_BEGIN_
8630: 43 4f 4e 54 45 58 54 28 22 45 6e 67 6c 69 73 68 CONTEXT("English
8640: 54 79 70 65 4e 61 6d 65 22 2c 20 22 d0 f3 f1 f1 TypeName", "....
8650: ea ee e5 c8 ec ff d2 e8 ef e0 22 29 3b 0d 0a 09 ..........");...
8660: 76 69 72 74 75 61 6c 20 63 68 61 72 20 63 6f 6e virtual char con
8670: 73 74 2a 20 47 65 74 54 79 70 65 53 74 72 69 6e st* GetTypeStrin
8680: 67 28 76 6f 69 64 29 63 6f 6e 73 74 0d 0a 09 09 g(void)const....
8690: 7b 72 65 74 75 72 6e 20 64 65 66 4c 61 6e 67 20 {return defLang
86a0: 3f 20 54 3a 3a 47 65 74 52 75 73 54 79 70 65 53 ? T::GetRusTypeS
86b0: 74 72 69 6e 67 28 29 20 3a 20 54 3a 3a 47 65 74 tring() : T::Get
86c0: 45 6e 67 54 79 70 65 53 74 72 69 6e 67 28 29 3b EngTypeString();
86d0: 7d 0d 0a 09 0d 0a 09 2f 2f 20 ce e1 fa e5 ea f2 }......// ......
86e0: 2c 20 f1 f2 f0 ee ff f9 e8 e9 20 ea e0 f0 f2 fb , ........ .....
86f0: 20 ec e5 f2 ee e4 ee e2 20 e8 20 f1 e2 ee e9 f1 ....... . .....
8700: f2 e2 2e 20 cf f0 ee ef e8 f1 e0 ed 20 ea e0 ea ... ........ ...
8710: 20 73 74 61 74 69 63 20 e2 20 ea ee ed f1 f2 f0 static . ......
8720: f3 ea f2 ee f0 e5 0d 0a 09 2f 2f 20 ee f1 ed ee .........// ....
8730: e2 ed ee e3 ee 20 ea eb e0 f1 f1 e0 2c 20 f2 ee ..... ......, ..
8740: 20 e5 f1 f2 fc 20 ef ee f1 f2 f0 ee e5 ed e8 e5 .... ..........
8750: 20 ea e0 f0 f2 fb 20 e8 e4 e5 f2 20 ef f0 e8 20 ..... .... ...
8760: f1 ee e7 e4 e0 ed e8 e8 20 ef e5 f0 e2 ee e3 ee ........ .......
8770: 20 ee e1 fa e5 ea f2 e0 0d 0a 09 73 74 72 75 63 ..........struc
8780: 74 20 69 6e 69 74 5f 61 6c 6c 5f 6d 61 70 0d 0a t init_all_map..
8790: 09 7b 0d 0a 09 09 69 6e 69 74 5f 61 6c 6c 5f 6d .{....init_all_m
87a0: 61 70 28 29 0d 0a 09 09 7b 0d 0a 09 09 09 66 6e ap()....{.....fn
87b0: 64 73 65 6c 65 63 74 6f 72 3c 54 3a 3a 65 6e 64 dselector<T::end
87c0: 6d 65 74 68 73 3e 3a 3a 74 79 70 65 3a 3a 4f 6e meths>::type::On
87d0: 49 6e 69 74 46 69 72 73 74 4f 62 6a 65 63 74 28 InitFirstObject(
87e0: 29 3b 0d 0a 09 09 09 66 6e 64 73 65 6c 65 63 74 );.....fndselect
87f0: 6f 72 3c 54 3a 3a 65 6e 64 70 72 6f 70 73 3e 3a or<T::endprops>:
8800: 3a 74 79 70 65 3a 3a 4f 6e 49 6e 69 74 46 69 72 :type::OnInitFir
8810: 73 74 4f 62 6a 65 63 74 28 29 3b 0d 0a 09 09 7d stObject();....}
8820: 0d 0a 09 7d 3b 0d 0a 7d 3b 0d 0a 0d 0a 2f 2f 20 ...};..};....//
8830: d8 e0 e1 eb ee ed 20 e4 eb ff 20 ed e0 ef e8 f1 ...... ... .....
8840: e0 ed e8 ff 20 f0 e5 e0 eb e8 e7 e0 f6 e8 e8 20 .... ..........
8850: ea ee ed f2 e5 ea f1 f2 e0 0d 0a 74 65 6d 70 6c ...........templ
8860: 61 74 65 3c 74 79 70 65 6e 61 6d 65 20 54 2c 20 ate<typename T,
8870: 74 79 70 65 6e 61 6d 65 20 44 2c 20 74 79 70 65 typename D, type
8880: 6e 61 6d 65 20 49 6e 69 74 44 6f 6e 65 50 6f 6c name InitDonePol
8890: 69 63 79 20 3d 20 72 65 67 5f 43 72 65 61 74 65 icy = reg_Create
88a0: 4f 62 6a 65 63 74 3c 54 3e 2c 20 42 4f 4f 4c 20 Object<T>, BOOL
88b0: 62 49 6d 70 6c 65 6d 65 6e 74 52 54 43 3d 54 52 bImplementRTC=TR
88c0: 55 45 3e 0d 0a 63 6c 61 73 73 20 43 44 65 63 6c UE>..class CDecl
88d0: 43 74 78 49 6d 70 6c 20 3a 20 70 75 62 6c 69 63 CtxImpl : public
88e0: 20 44 0d 0a 7b 0d 0a 70 75 62 6c 69 63 3a 0d 0a D..{..public:..
88f0: 09 74 79 70 65 64 65 66 20 44 20 44 65 63 6c 54 .typedef D DeclT
8900: 79 70 65 3b 0d 0a 09 74 79 70 65 64 65 66 20 43 ype;...typedef C
8910: 44 65 63 6c 43 74 78 49 6d 70 6c 3c 54 2c 20 44 DeclCtxImpl<T, D
8920: 2c 20 49 6e 69 74 44 6f 6e 65 50 6f 6c 69 63 79 , InitDonePolicy
8930: 2c 20 62 49 6d 70 6c 65 6d 65 6e 74 52 54 43 3e , bImplementRTC>
8940: 20 42 61 73 65 54 79 70 65 3b 0d 0a 09 74 79 70 BaseType;...typ
8950: 65 64 65 66 20 49 6e 69 74 44 6f 6e 65 50 6f 6c edef InitDonePol
8960: 69 63 79 20 69 6e 69 74 5f 64 6f 6e 65 5f 70 6f icy init_done_po
8970: 6c 69 63 79 3b 0d 0a 0d 0a 09 2f 2f 20 d0 e5 e0 licy;.....// ...
8980: eb e8 e7 e0 f6 e8 ff 20 52 75 6e 54 69 6d 65 43 ....... RunTimeC
8990: 6c 61 73 73 0d 0a 09 73 74 61 74 69 63 20 43 52 lass...static CR
89a0: 75 6e 74 69 6d 65 43 6c 61 73 73 2a 20 47 65 74 untimeClass* Get
89b0: 52 54 43 28 29 0d 0a 09 7b 0d 0a 09 09 72 65 74 RTC()...{....ret
89c0: 75 72 6e 20 72 74 63 5f 73 65 6c 65 63 74 6f 72 urn rtc_selector
89d0: 3c 54 3e 3a 3a 73 65 6c 3c 62 49 6d 70 6c 65 6d <T>::sel<bImplem
89e0: 65 6e 74 52 54 43 3e 3a 3a 74 79 70 65 3a 3a 47 entRTC>::type::G
89f0: 65 74 52 54 43 28 29 3b 0d 0a 09 7d 0d 0a 09 76 etRTC();...}...v
8a00: 69 72 74 75 61 6c 20 43 52 75 6e 74 69 6d 65 43 irtual CRuntimeC
8a10: 6c 61 73 73 2a 20 47 65 74 52 75 6e 74 69 6d 65 lass* GetRuntime
8a20: 43 6c 61 73 73 28 29 63 6f 6e 73 74 7b 72 65 74 Class()const{ret
8a30: 75 72 6e 20 47 65 74 52 54 43 28 29 3b 7d 0d 0a urn GetRTC();}..
8a40: 09 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
8a50: 47 65 74 50 61 72 61 6d 44 65 66 56 61 6c 75 65 GetParamDefValue
8a60: 28 69 6e 74 20 6e 4d 65 74 68 6f 64 2c 20 69 6e (int nMethod, in
8a70: 74 20 6e 50 61 72 61 6d 2c 20 43 56 61 6c 75 65 t nParam, CValue
8a80: 2a 20 70 56 61 6c 75 65 29 63 6f 6e 73 74 0d 0a * pValue)const..
8a90: 09 09 7b 72 65 74 75 72 6e 20 6d 65 74 68 5f 70 ..{return meth_p
8aa0: 6f 6c 3c 54 3e 3a 3a 47 65 74 44 65 66 56 61 6c ol<T>::GetDefVal
8ab0: 28 73 74 61 74 69 63 5f 63 61 73 74 3c 63 6f 6e (static_cast<con
8ac0: 73 74 20 54 2a 3e 28 74 68 69 73 29 2c 20 6e 4d st T*>(this), nM
8ad0: 65 74 68 6f 64 2c 20 6e 50 61 72 61 6d 2c 20 70 ethod, nParam, p
8ae0: 56 61 6c 75 65 29 3b 7d 0d 0a 09 0d 0a 09 76 69 Value);}......vi
8af0: 72 74 75 61 6c 20 69 6e 74 20 43 61 6c 6c 41 73 rtual int CallAs
8b00: 46 75 6e 63 28 69 6e 74 20 6e 4d 65 74 68 6f 64 Func(int nMethod
8b10: 2c 20 43 56 61 6c 75 65 26 20 72 65 74 56 61 6c , CValue& retVal
8b20: 2c 43 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 ,CValue** ppPara
8b30: 6d 73 29 0d 0a 09 09 7b 72 65 74 75 72 6e 20 6d ms)....{return m
8b40: 65 74 68 5f 70 6f 6c 3c 54 3e 3a 3a 43 61 6c 6c eth_pol<T>::Call
8b50: 41 73 46 75 6e 63 28 73 74 61 74 69 63 5f 63 61 AsFunc(static_ca
8b60: 73 74 3c 54 2a 3e 28 74 68 69 73 29 2c 20 6e 4d st<T*>(this), nM
8b70: 65 74 68 6f 64 2c 20 72 65 74 56 61 6c 2c 20 70 ethod, retVal, p
8b80: 70 50 61 72 61 6d 73 29 3b 7d 0d 0a 09 0d 0a 09 pParams);}......
8b90: 76 69 72 74 75 61 6c 20 69 6e 74 20 43 61 6c 6c virtual int Call
8ba0: 41 73 50 72 6f 63 28 69 6e 74 20 6e 4d 65 74 68 AsProc(int nMeth
8bb0: 6f 64 2c 20 43 56 61 6c 75 65 2a 2a 20 70 70 50 od, CValue** ppP
8bc0: 61 72 61 6d 73 29 0d 0a 09 09 7b 72 65 74 75 72 arams)....{retur
8bd0: 6e 20 6d 65 74 68 5f 70 6f 6c 3c 54 3e 3a 3a 43 n meth_pol<T>::C
8be0: 61 6c 6c 41 73 50 72 6f 63 28 73 74 61 74 69 63 allAsProc(static
8bf0: 5f 63 61 73 74 3c 54 2a 3e 28 74 68 69 73 29 2c _cast<T*>(this),
8c00: 20 6e 4d 65 74 68 6f 64 2c 20 70 70 50 61 72 61 nMethod, ppPara
8c10: 6d 73 29 3b 7d 0d 0a 09 0d 0a 09 76 69 72 74 75 ms);}......virtu
8c20: 61 6c 20 69 6e 74 20 47 65 74 50 72 6f 70 56 61 al int GetPropVa
8c30: 6c 28 69 6e 74 20 6e 50 72 6f 70 2c 20 43 56 61 l(int nProp, CVa
8c40: 6c 75 65 26 20 76 61 6c 75 65 29 63 6f 6e 73 74 lue& value)const
8c50: 0d 0a 09 09 7b 72 65 74 75 72 6e 20 70 72 6f 70 ....{return prop
8c60: 5f 70 6f 6c 3c 54 3e 3a 3a 52 65 61 64 50 72 6f _pol<T>::ReadPro
8c70: 70 28 73 74 61 74 69 63 5f 63 61 73 74 3c 63 6f p(static_cast<co
8c80: 6e 73 74 20 54 2a 3e 28 74 68 69 73 29 2c 20 6e nst T*>(this), n
8c90: 50 72 6f 70 2c 20 76 61 6c 75 65 29 3b 7d 0d 0a Prop, value);}..
8ca0: 09 0d 0a 09 76 69 72 74 75 61 6c 20 69 6e 74 20 ....virtual int
8cb0: 53 65 74 50 72 6f 70 56 61 6c 28 69 6e 74 20 6e SetPropVal(int n
8cc0: 50 72 6f 70 2c 20 43 56 61 6c 75 65 20 63 6f 6e Prop, CValue con
8cd0: 73 74 26 20 76 61 6c 75 65 29 0d 0a 09 09 7b 72 st& value)....{r
8ce0: 65 74 75 72 6e 20 70 72 6f 70 5f 70 6f 6c 3c 54 eturn prop_pol<T
8cf0: 3e 3a 3a 57 72 69 74 65 50 72 6f 70 28 73 74 61 >::WriteProp(sta
8d00: 74 69 63 5f 63 61 73 74 3c 54 2a 3e 28 74 68 69 tic_cast<T*>(thi
8d10: 73 29 2c 20 6e 50 72 6f 70 2c 20 76 61 6c 75 65 s), nProp, value
8d20: 29 3b 7d 0d 0a 7d 3b 0d 0a 0d 0a 0d 0a 2f 2f 20 );}..};......//
8d30: cc e0 ea f0 ee f1 fb 20 e4 eb ff 20 f0 e5 e0 eb ....... ... ....
8d40: e8 e7 e0 f6 e8 e8 20 ea ee ed f2 e5 ea f1 f2 ed ...... .........
8d50: fb f5 20 ee e1 fa e5 ea f2 ee e2 2e 0d 0a 0d 0a .. .............
8d60: 2f 2f 20 ce e1 fa ff e2 e8 f2 fc 20 e8 ec e5 ed // ........ ....
8d70: e0 20 f2 e8 ef e0 20 ea ee ed f2 e5 ea f1 f2 e0 . .... .........
8d80: 2e 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f 42 45 ...#define BL_BE
8d90: 47 49 4e 5f 43 4f 4e 54 45 58 54 28 70 61 72 4e GIN_CONTEXT(parN
8da0: 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 52 ameEng, parNameR
8db0: 75 73 29 5c 0d 0a 09 73 74 61 74 69 63 20 4c 50 us)\...static LP
8dc0: 43 53 54 52 20 47 65 74 52 75 73 54 79 70 65 53 CSTR GetRusTypeS
8dd0: 74 72 69 6e 67 28 29 7b 72 65 74 75 72 6e 20 70 tring(){return p
8de0: 61 72 4e 61 6d 65 52 75 73 3b 7d 5c 0d 0a 09 73 arNameRus;}\...s
8df0: 74 61 74 69 63 20 4c 50 43 53 54 52 20 47 65 74 tatic LPCSTR Get
8e00: 45 6e 67 54 79 70 65 53 74 72 69 6e 67 28 29 7b EngTypeString(){
8e10: 72 65 74 75 72 6e 20 70 61 72 4e 61 6d 65 45 6e return parNameEn
8e20: 67 3b 7d 5c 0d 0a 09 74 65 6d 70 6c 61 74 65 3c g;}\...template<
8e30: 42 4f 4f 4c 20 62 4d 65 74 68 2c 20 69 6e 74 20 BOOL bMeth, int
8e40: 49 3e 73 74 72 75 63 74 20 70 72 65 76 5f 74 79 I>struct prev_ty
8e50: 70 65 7b 74 79 70 65 64 65 66 20 74 79 70 65 6e pe{typedef typen
8e60: 61 6d 65 20 70 72 65 76 5f 74 79 70 65 3c 62 4d ame prev_type<bM
8e70: 65 74 68 2c 20 49 2d 31 3e 3a 3a 74 79 70 65 20 eth, I-1>::type
8e80: 74 79 70 65 3b 7d 3b 5c 0d 0a 09 74 65 6d 70 6c type;};\...templ
8e90: 61 74 65 3c 3e 20 73 74 72 75 63 74 20 70 72 65 ate<> struct pre
8ea0: 76 5f 74 79 70 65 3c 54 52 55 45 2c 20 5f 5f 4c v_type<TRUE, __L
8eb0: 49 4e 45 5f 5f 3e 7b 74 79 70 65 64 65 66 20 63 INE__>{typedef c
8ec0: 6f 6e 74 65 78 74 5f 6f 62 6a 3a 3a 66 69 72 73 ontext_obj::firs
8ed0: 74 5f 64 65 66 20 74 79 70 65 3b 7d 3b 5c 0d 0a t_def type;};\..
8ee0: 09 74 65 6d 70 6c 61 74 65 3c 3e 20 73 74 72 75 .template<> stru
8ef0: 63 74 20 70 72 65 76 5f 74 79 70 65 3c 46 41 4c ct prev_type<FAL
8f00: 53 45 2c 20 5f 5f 4c 49 4e 45 5f 5f 3e 7b 74 79 SE, __LINE__>{ty
8f10: 70 65 64 65 66 20 63 6f 6e 74 65 78 74 5f 6f 62 pedef context_ob
8f20: 6a 3a 3a 66 69 72 73 74 5f 64 65 66 20 74 79 70 j::first_def typ
8f30: 65 3b 7d 0d 0a 0d 0a 23 64 65 66 69 6e 65 20 42 e;}....#define B
8f40: 45 47 49 4e 5f 53 54 52 55 43 54 28 70 61 72 4e EGIN_STRUCT(parN
8f50: 61 6d 65 45 2c 20 70 61 72 4e 61 6d 65 52 2c 20 ameE, parNameR,
8f60: 70 61 72 4d 65 74 68 29 5c 0d 0a 09 73 74 72 75 parMeth)\...stru
8f70: 63 74 20 70 61 72 4e 61 6d 65 45 23 23 5f 64 65 ct parNameE##_de
8f80: 66 5c 0d 0a 09 7b 5c 0d 0a 09 09 74 79 70 65 64 f\...{\....typed
8f90: 65 66 20 70 72 65 76 5f 74 79 70 65 3c 70 61 72 ef prev_type<par
8fa0: 4d 65 74 68 2c 20 5f 5f 4c 49 4e 45 5f 5f 2d 31 Meth, __LINE__-1
8fb0: 3e 3a 3a 74 79 70 65 20 70 72 65 76 3b 5c 0d 0a >::type prev;\..
8fc0: 09 09 65 6e 75 6d 7b 76 61 6c 3d 70 72 65 76 3a ..enum{val=prev:
8fd0: 3a 76 61 6c 2b 31 7d 3b 5c 0d 0a 09 09 73 74 61 :val+1};\....sta
8fe0: 74 69 63 20 4c 50 43 53 54 52 20 47 65 74 45 6e tic LPCSTR GetEn
8ff0: 67 4e 61 6d 65 28 29 7b 72 65 74 75 72 6e 20 23 gName(){return #
9000: 70 61 72 4e 61 6d 65 45 3b 7d 5c 0d 0a 09 09 73 parNameE;}\....s
9010: 74 61 74 69 63 20 4c 50 43 53 54 52 20 47 65 74 tatic LPCSTR Get
9020: 52 75 73 4e 61 6d 65 28 29 7b 72 65 74 75 72 6e RusName(){return
9030: 20 20 70 61 72 4e 61 6d 65 52 3b 7d 0d 0a 0d 0a parNameR;}....
9040: 23 64 65 66 69 6e 65 20 45 4e 44 5f 53 54 52 55 #define END_STRU
9050: 43 54 28 70 61 72 4e 61 6d 65 45 2c 20 70 61 72 CT(parNameE, par
9060: 4d 65 74 68 29 5c 0d 0a 09 7d 3b 66 72 69 65 6e Meth)\...};frien
9070: 64 20 73 74 72 75 63 74 20 70 61 72 4e 61 6d 65 d struct parName
9080: 45 23 23 5f 64 65 66 3b 20 74 65 6d 70 6c 61 74 E##_def; templat
9090: 65 3c 3e 20 73 74 72 75 63 74 20 70 72 65 76 5f e<> struct prev_
90a0: 74 79 70 65 3c 70 61 72 4d 65 74 68 2c 20 5f 5f type<parMeth, __
90b0: 4c 49 4e 45 5f 5f 3e 7b 74 79 70 65 64 65 66 20 LINE__>{typedef
90c0: 70 61 72 4e 61 6d 65 45 23 23 5f 64 65 66 20 74 parNameE##_def t
90d0: 79 70 65 3b 7d 3b 0d 0a 0d 0a 23 64 65 66 69 6e ype;};....#defin
90e0: 65 20 42 4c 5f 4d 45 54 48 4f 44 5f 44 45 46 28 e BL_METHOD_DEF(
90f0: 70 61 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 4e parNameEng, parN
9100: 61 6d 65 52 75 73 2c 20 70 61 72 4e 75 6d 50 61 ameRus, parNumPa
9110: 72 61 6d 2c 20 70 61 72 43 61 6c 6c 46 75 6e 63 ram, parCallFunc
9120: 2c 20 70 61 72 43 61 6c 6c 50 72 6f 63 2c 20 70 , parCallProc, p
9130: 61 72 44 65 66 50 72 6f 63 2c 20 70 61 72 49 73 arDefProc, parIs
9140: 46 75 6e 63 2c 20 70 61 72 49 73 44 65 66 29 5c Func, parIsDef)\
9150: 0d 0a 09 42 45 47 49 4e 5f 53 54 52 55 43 54 28 ...BEGIN_STRUCT(
9160: 70 61 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 4e parNameEng, parN
9170: 61 6d 65 52 75 73 2c 20 54 52 55 45 29 5c 0d 0a ameRus, TRUE)\..
9180: 09 09 73 74 61 74 69 63 20 69 6e 74 20 43 61 6c ..static int Cal
9190: 6c 50 72 6f 63 28 49 6d 70 6c 54 79 70 65 2a 20 lProc(ImplType*
91a0: 70 2c 20 43 56 61 6c 75 65 2a 2a 20 70 70 29 7b p, CValue** pp){
91b0: 72 65 74 75 72 6e 20 70 61 72 43 61 6c 6c 50 72 return parCallPr
91c0: 6f 63 3b 7d 5c 0d 0a 09 09 73 74 61 74 69 63 20 oc;}\....static
91d0: 69 6e 74 20 43 61 6c 6c 46 75 6e 63 28 49 6d 70 int CallFunc(Imp
91e0: 6c 54 79 70 65 2a 20 70 2c 20 43 56 61 6c 75 65 lType* p, CValue
91f0: 26 20 72 2c 20 43 56 61 6c 75 65 2a 2a 20 70 70 & r, CValue** pp
9200: 29 7b 72 65 74 75 72 6e 20 70 61 72 43 61 6c 6c ){return parCall
9210: 46 75 6e 63 3b 7d 5c 0d 0a 09 09 73 74 61 74 69 Func;}\....stati
9220: 63 20 69 6e 74 20 47 65 74 44 65 66 56 61 6c 28 c int GetDefVal(
9230: 63 6f 6e 73 74 20 49 6d 70 6c 54 79 70 65 2a 20 const ImplType*
9240: 70 2c 20 69 6e 74 20 6e 2c 20 43 56 61 6c 75 65 p, int n, CValue
9250: 2a 20 76 29 7b 72 65 74 75 72 6e 20 70 61 72 44 * v){return parD
9260: 65 66 50 72 6f 63 3b 7d 5c 0d 0a 09 09 65 6e 75 efProc;}\....enu
9270: 6d 7b 6e 50 61 72 61 6d 3d 70 61 72 4e 75 6d 50 m{nParam=parNumP
9280: 61 72 61 6d 2c 20 49 73 46 75 6e 63 3d 70 61 72 aram, IsFunc=par
9290: 49 73 46 75 6e 63 2c 20 49 73 44 65 66 56 61 6c IsFunc, IsDefVal
92a0: 3d 70 61 72 49 73 44 65 66 7d 3b 5c 0d 0a 09 09 =parIsDef};\....
92b0: 76 6f 69 64 20 74 65 73 74 28 29 7b 63 6f 6e 74 void test(){cont
92c0: 65 78 74 5f 6f 62 6a 3a 3a 6d 65 74 61 5f 66 75 ext_obj::meta_fu
92d0: 6e 63 3a 3a 63 68 65 63 6b 5f 64 65 66 76 61 6c nc::check_defval
92e0: 3c 6e 50 61 72 61 6d 2c 20 49 73 44 65 66 56 61 <nParam, IsDefVa
92f0: 6c 3e 3a 3a 74 79 70 65 20 74 3d 7b 30 7d 3b 5c l>::type t={0};\
9300: 0d 0a 09 09 09 63 6f 6e 74 65 78 74 5f 6f 62 6a .....context_obj
9310: 3a 3a 6d 65 74 61 5f 66 75 6e 63 3a 3a 74 65 73 ::meta_func::tes
9320: 74 5f 6c 61 73 74 3c 65 6e 64 6d 65 74 68 73 2c t_last<endmeths,
9330: 20 76 61 6c 3e 3a 3a 74 79 70 65 20 74 32 3d 7b val>::type t2={
9340: 30 7d 3b 7d 5c 0d 0a 09 45 4e 44 5f 53 54 52 55 0};}\...END_STRU
9350: 43 54 28 70 61 72 4e 61 6d 65 45 6e 67 2c 20 54 CT(parNameEng, T
9360: 52 55 45 29 0d 0a 0d 0a 23 64 65 66 69 6e 65 20 RUE)....#define
9370: 42 4c 5f 44 45 46 56 41 4c 5f 46 4f 52 28 70 61 BL_DEFVAL_FOR(pa
9380: 72 4e 61 6d 65 45 6e 67 29 20 69 6e 74 20 70 61 rNameEng) int pa
9390: 72 4e 61 6d 65 45 6e 67 23 23 5f 47 65 74 44 65 rNameEng##_GetDe
93a0: 66 56 61 6c 28 69 6e 74 20 6e 50 61 72 61 6d 2c fVal(int nParam,
93b0: 20 43 56 61 6c 75 65 2a 20 70 56 61 6c 75 65 29 CValue* pValue)
93c0: 63 6f 6e 73 74 0d 0a 0d 0a 23 64 65 66 69 6e 65 const....#define
93d0: 20 43 4f 4d 4d 41 20 2c 0d 0a 0d 0a 23 64 65 66 COMMA ,....#def
93e0: 69 6e 65 20 42 4c 5f 50 52 4f 43 5f 28 70 61 72 ine BL_PROC_(par
93f0: 4e 61 6d 65 45 6e 67 2c 70 61 72 4e 61 6d 65 52 NameEng,parNameR
9400: 75 73 2c 70 61 72 4e 75 6d 50 61 72 61 6d 2c 20 us,parNumParam,
9410: 70 61 72 44 65 66 56 61 6c 2c 20 70 61 72 49 73 parDefVal, parIs
9420: 44 65 66 29 5c 0d 0a 09 42 4c 5f 4d 45 54 48 4f Def)\...BL_METHO
9430: 44 5f 44 45 46 28 70 61 72 4e 61 6d 65 45 6e 67 D_DEF(parNameEng
9440: 2c 20 70 61 72 4e 61 6d 65 52 75 73 2c 20 70 61 , parNameRus, pa
9450: 72 4e 75 6d 50 61 72 61 6d 2c 20 46 41 4c 53 45 rNumParam, FALSE
9460: 2c 20 70 2d 3e 70 61 72 4e 61 6d 65 45 6e 67 28 , p->parNameEng(
9470: 70 70 29 2c 20 70 61 72 44 65 66 56 61 6c 2c 20 pp), parDefVal,
9480: 30 2c 20 70 61 72 49 73 44 65 66 29 5c 0d 0a 09 0, parIsDef)\...
9490: 69 6e 74 20 70 61 72 4e 61 6d 65 45 6e 67 28 43 int parNameEng(C
94a0: 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d 73 Value** ppParams
94b0: 29 0d 0a 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f )....#define BL_
94c0: 46 55 4e 43 5f 28 70 61 72 4e 61 6d 65 45 6e 67 FUNC_(parNameEng
94d0: 2c 70 61 72 4e 61 6d 65 52 75 73 2c 70 61 72 4e ,parNameRus,parN
94e0: 75 6d 50 61 72 61 6d 2c 20 70 61 72 44 65 66 56 umParam, parDefV
94f0: 61 6c 2c 20 70 61 72 49 73 44 65 66 29 5c 0d 0a al, parIsDef)\..
9500: 09 42 4c 5f 4d 45 54 48 4f 44 5f 44 45 46 28 70 .BL_METHOD_DEF(p
9510: 61 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 arNameEng, parNa
9520: 6d 65 52 75 73 2c 20 70 61 72 4e 75 6d 50 61 72 meRus, parNumPar
9530: 61 6d 2c 20 70 2d 3e 70 61 72 4e 61 6d 65 45 6e am, p->parNameEn
9540: 67 28 72 20 43 4f 4d 4d 41 20 70 70 29 2c 20 46 g(r COMMA pp), F
9550: 41 4c 53 45 2c 20 70 61 72 44 65 66 56 61 6c 2c ALSE, parDefVal,
9560: 20 31 2c 20 70 61 72 49 73 44 65 66 29 5c 0d 0a 1, parIsDef)\..
9570: 09 69 6e 74 20 70 61 72 4e 61 6d 65 45 6e 67 28 .int parNameEng(
9580: 43 56 61 6c 75 65 26 20 72 65 74 56 61 6c 2c 20 CValue& retVal,
9590: 43 56 61 6c 75 65 2a 2a 20 70 70 50 61 72 61 6d CValue** ppParam
95a0: 73 29 0d 0a 0d 0a 2f 2f 20 ce e1 fa ff e2 e8 f2 s)....// .......
95b0: fc 20 ec e5 f2 ee e4 20 2d 20 ef f0 ee f6 e5 e4 . ..... - ......
95c0: f3 f0 f3 20 ea ee ed f2 e5 ea f1 f2 e0 2c 20 e1 ... ........., .
95d0: e5 e7 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 20 ef ee .. .......... ..
95e0: 20 f3 ec ee eb f7 e0 ed e8 fe 0d 0a 23 64 65 66 ...........#def
95f0: 69 6e 65 20 42 4c 5f 50 52 4f 43 28 70 61 72 4e ine BL_PROC(parN
9600: 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 52 ameEng, parNameR
9610: 75 73 2c 20 70 61 72 4e 75 6d 50 61 72 61 6d 29 us, parNumParam)
9620: 20 5c 0d 0a 09 42 4c 5f 50 52 4f 43 5f 28 70 61 \...BL_PROC_(pa
9630: 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 6d rNameEng, parNam
9640: 65 52 75 73 2c 20 70 61 72 4e 75 6d 50 61 72 61 eRus, parNumPara
9650: 6d 2c 20 46 41 4c 53 45 2c 20 30 29 0d 0a 0d 0a m, FALSE, 0)....
9660: 2f 2f 20 ce e1 fa ff e2 e8 f2 fc 20 ec e5 f2 ee // ........ ....
9670: e4 20 2d 20 ef f0 ee f6 e5 e4 f3 f0 f3 20 ea ee . - ......... ..
9680: ed f2 e5 ea f1 f2 e0 2c 20 e8 ec e5 fe f9 f3 fe ......., .......
9690: 20 ef e0 f0 e0 ec e5 f2 f0 fb 20 ef ee 20 f3 ec ......... .. ..
96a0: ee eb f7 e0 ed e8 fe 0d 0a 23 64 65 66 69 6e 65 .........#define
96b0: 20 42 4c 5f 50 52 4f 43 5f 57 49 54 48 5f 44 45 BL_PROC_WITH_DE
96c0: 46 56 41 4c 28 70 61 72 4e 61 6d 65 45 6e 67 2c FVAL(parNameEng,
96d0: 70 61 72 4e 61 6d 65 52 75 73 2c 70 61 72 4e 75 parNameRus,parNu
96e0: 6d 50 61 72 61 6d 29 20 5c 0d 0a 09 42 4c 5f 50 mParam) \...BL_P
96f0: 52 4f 43 5f 28 70 61 72 4e 61 6d 65 45 6e 67 2c ROC_(parNameEng,
9700: 20 70 61 72 4e 61 6d 65 52 75 73 2c 20 70 61 72 parNameRus, par
9710: 4e 75 6d 50 61 72 61 6d 2c 20 70 2d 3e 70 61 72 NumParam, p->par
9720: 4e 61 6d 65 45 6e 67 23 23 5f 47 65 74 44 65 66 NameEng##_GetDef
9730: 56 61 6c 28 6e 20 43 4f 4d 4d 41 20 76 29 2c 20 Val(n COMMA v),
9740: 31 29 0d 0a 0d 0a 2f 2f 20 ce e1 fa ff e2 e8 f2 1)....// .......
9750: fc 20 ec e5 f2 ee e4 20 2d 20 f4 f3 ed ea f6 e8 . ..... - ......
9760: fe 20 ea ee ed f2 e5 ea f1 f2 e0 2c 20 e1 e5 e7 . ........., ...
9770: 20 ef e0 f0 e0 ec e5 f2 f0 ee e2 20 ef ee 20 f3 .......... .. .
9780: ec ee eb f7 e0 ed e8 fe 0d 0a 23 64 65 66 69 6e ..........#defin
9790: 65 20 42 4c 5f 46 55 4e 43 28 70 61 72 4e 61 6d e BL_FUNC(parNam
97a0: 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 52 75 73 eEng, parNameRus
97b0: 2c 20 70 61 72 4e 75 6d 50 61 72 61 6d 29 20 5c , parNumParam) \
97c0: 0d 0a 09 42 4c 5f 46 55 4e 43 5f 28 70 61 72 4e ...BL_FUNC_(parN
97d0: 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 52 ameEng, parNameR
97e0: 75 73 2c 20 70 61 72 4e 75 6d 50 61 72 61 6d 2c us, parNumParam,
97f0: 20 46 41 4c 53 45 2c 20 30 29 0d 0a 0d 0a 2f 2f FALSE, 0)....//
9800: 20 ce e1 fa ff e2 e8 f2 fc 20 ec e5 f2 ee e4 20 ........ .....
9810: 2d 20 f4 f3 ed ea f6 e8 fe 20 ea ee ed f2 e5 ea - ....... ......
9820: f1 f2 e0 2c 20 e8 ec e5 fe f9 f3 fe 20 ef e0 f0 ..., ....... ...
9830: e0 ec e5 f2 f0 fb 20 ef ee 20 f3 ec ee eb f7 e0 ...... .. ......
9840: ed e8 fe 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f .....#define BL_
9850: 46 55 4e 43 5f 57 49 54 48 5f 44 45 46 56 41 4c FUNC_WITH_DEFVAL
9860: 28 70 61 72 4e 61 6d 65 45 6e 67 2c 70 61 72 4e (parNameEng,parN
9870: 61 6d 65 52 75 73 2c 70 61 72 4e 75 6d 50 61 72 ameRus,parNumPar
9880: 61 6d 29 20 5c 0d 0a 09 42 4c 5f 46 55 4e 43 5f am) \...BL_FUNC_
9890: 28 70 61 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 (parNameEng, par
98a0: 4e 61 6d 65 52 75 73 2c 20 70 61 72 4e 75 6d 50 NameRus, parNumP
98b0: 61 72 61 6d 2c 20 70 2d 3e 70 61 72 4e 61 6d 65 aram, p->parName
98c0: 45 6e 67 23 23 5f 47 65 74 44 65 66 56 61 6c 28 Eng##_GetDefVal(
98d0: 6e 20 43 4f 4d 4d 41 20 76 29 2c 20 31 29 0d 0a n COMMA v), 1)..
98e0: 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f 50 52 4f ..#define BL_PRO
98f0: 50 5f 28 70 61 72 4e 61 6d 65 45 2c 20 70 61 72 P_(parNameE, par
9900: 4e 61 6d 65 52 2c 20 70 61 72 47 65 74 2c 20 70 NameR, parGet, p
9910: 61 72 53 65 74 2c 20 70 61 72 52 2c 20 70 61 72 arSet, parR, par
9920: 57 29 5c 0d 0a 09 42 45 47 49 4e 5f 53 54 52 55 W)\...BEGIN_STRU
9930: 43 54 28 70 61 72 4e 61 6d 65 45 2c 20 70 61 72 CT(parNameE, par
9940: 4e 61 6d 65 52 2c 20 46 41 4c 53 45 29 5c 0d 0a NameR, FALSE)\..
9950: 09 09 73 74 61 74 69 63 20 69 6e 74 20 52 65 61 ..static int Rea
9960: 64 50 72 6f 70 28 63 6f 6e 73 74 20 49 6d 70 6c dProp(const Impl
9970: 54 79 70 65 2a 20 70 2c 20 43 56 61 6c 75 65 26 Type* p, CValue&
9980: 20 76 29 7b 72 65 74 75 72 6e 20 70 61 72 47 65 v){return parGe
9990: 74 3b 7d 5c 0d 0a 09 09 73 74 61 74 69 63 20 69 t;}\....static i
99a0: 6e 74 20 57 72 69 74 65 50 72 6f 70 28 49 6d 70 nt WriteProp(Imp
99b0: 6c 54 79 70 65 2a 20 70 2c 20 43 56 61 6c 75 65 lType* p, CValue
99c0: 20 63 6f 6e 73 74 26 20 76 29 7b 72 65 74 75 72 const& v){retur
99d0: 6e 20 70 61 72 53 65 74 3b 7d 5c 0d 0a 09 09 65 n parSet;}\....e
99e0: 6e 75 6d 7b 49 73 52 65 61 64 3d 70 61 72 52 2c num{IsRead=parR,
99f0: 20 49 73 57 72 69 74 65 3d 70 61 72 57 7d 3b 5c IsWrite=parW};\
9a00: 0d 0a 09 09 76 6f 69 64 20 74 65 73 74 28 29 7b ....void test(){
9a10: 63 6f 6e 74 65 78 74 5f 6f 62 6a 3a 3a 6d 65 74 context_obj::met
9a20: 61 5f 66 75 6e 63 3a 3a 74 65 73 74 5f 6c 61 73 a_func::test_las
9a30: 74 3c 65 6e 64 70 72 6f 70 73 2c 20 76 61 6c 3e t<endprops, val>
9a40: 3a 3a 74 79 70 65 20 74 32 3d 7b 30 7d 3b 7d 5c ::type t2={0};}\
9a50: 0d 0a 09 45 4e 44 5f 53 54 52 55 43 54 28 70 61 ...END_STRUCT(pa
9a60: 72 4e 61 6d 65 45 2c 20 46 41 4c 53 45 29 0d 0a rNameE, FALSE)..
9a70: 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f 50 52 4f ..#define BL_PRO
9a80: 50 5f 52 45 41 44 28 70 61 72 4e 61 6d 65 29 09 P_READ(parName).
9a90: 69 6e 74 20 47 65 74 5f 23 23 70 61 72 4e 61 6d int Get_##parNam
9aa0: 65 28 43 56 61 6c 75 65 26 20 76 61 6c 75 65 29 e(CValue& value)
9ab0: 63 6f 6e 73 74 0d 0a 2f 2f 20 ce e1 fa ff e2 e8 const..// ......
9ac0: f2 fc 20 ee e1 f0 e0 e1 ee f2 f7 e8 ea 20 e7 e0 .. .......... ..
9ad0: ef e8 f1 e8 20 f1 e2 ee e9 f1 f2 e2 e0 20 e4 eb .... ........ ..
9ae0: ff 20 f1 e2 ee e9 f1 f2 e2 e0 20 f1 20 f7 f2 e5 . ........ . ...
9af0: ed e8 e5 ec 2f e7 e0 ef e8 f1 fc fe 0d 0a 23 64 ..../.........#d
9b00: 65 66 69 6e 65 20 42 4c 5f 50 52 4f 50 5f 57 52 efine BL_PROP_WR
9b10: 49 54 45 28 70 61 72 4e 61 6d 65 29 09 69 6e 74 ITE(parName).int
9b20: 20 53 65 74 5f 23 23 70 61 72 4e 61 6d 65 28 43 Set_##parName(C
9b30: 56 61 6c 75 65 20 63 6f 6e 73 74 26 20 76 61 6c Value const& val
9b40: 75 65 29 0d 0a 0d 0a 2f 2f 20 ce e1 fa ff e2 e8 ue)....// ......
9b50: f2 fc 20 f1 e2 ee e9 f1 f2 e2 ee 20 ea ee ed f2 .. ........ ....
9b60: e5 ea f1 f2 e0 2c 20 f2 ee eb fc ea ee 20 e4 eb ....., ...... ..
9b70: ff 20 f7 f2 e5 ed e8 ff 0d 0a 23 64 65 66 69 6e . ........#defin
9b80: 65 20 42 4c 5f 50 52 4f 50 5f 52 4f 28 70 61 72 e BL_PROP_RO(par
9b90: 4e 61 6d 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 NameEng, parName
9ba0: 52 75 73 29 5c 0d 0a 09 42 4c 5f 50 52 4f 50 5f Rus)\...BL_PROP_
9bb0: 28 70 61 72 4e 61 6d 65 45 6e 67 2c 20 70 61 72 (parNameEng, par
9bc0: 4e 61 6d 65 52 75 73 2c 20 70 2d 3e 47 65 74 5f NameRus, p->Get_
9bd0: 23 23 70 61 72 4e 61 6d 65 45 6e 67 28 76 29 2c ##parNameEng(v),
9be0: 20 46 41 4c 53 45 2c 20 31 2c 20 30 29 5c 0d 0a FALSE, 1, 0)\..
9bf0: 09 42 4c 5f 50 52 4f 50 5f 52 45 41 44 28 70 61 .BL_PROP_READ(pa
9c00: 72 4e 61 6d 65 45 6e 67 29 0d 0a 0d 0a 2f 2f 20 rNameEng)....//
9c10: ce e1 fa ff e2 e8 f2 fc 20 f1 e2 ee e9 f1 f2 e2 ........ .......
9c20: ee 20 ea ee ed f2 e5 ea f1 f2 e0 2c 20 f2 ee eb . ........., ...
9c30: fc ea ee 20 e4 eb ff 20 e7 e0 ef e8 f1 e8 0d 0a ... ... ........
9c40: 23 64 65 66 69 6e 65 20 42 4c 5f 50 52 4f 50 5f #define BL_PROP_
9c50: 57 4f 28 70 61 72 4e 61 6d 65 45 6e 67 2c 20 70 WO(parNameEng, p
9c60: 61 72 4e 61 6d 65 52 75 73 29 5c 0d 0a 09 42 4c arNameRus)\...BL
9c70: 5f 50 52 4f 50 5f 28 70 61 72 4e 61 6d 65 45 6e _PROP_(parNameEn
9c80: 67 2c 20 70 61 72 4e 61 6d 65 52 75 73 2c 20 46 g, parNameRus, F
9c90: 41 4c 53 45 2c 20 70 2d 3e 53 65 74 5f 23 23 70 ALSE, p->Set_##p
9ca0: 61 72 4e 61 6d 65 45 6e 67 28 76 29 2c 20 30 2c arNameEng(v), 0,
9cb0: 20 31 29 5c 0d 0a 09 42 4c 5f 50 52 4f 50 5f 57 1)\...BL_PROP_W
9cc0: 52 49 54 45 28 70 61 72 4e 61 6d 65 45 6e 67 29 RITE(parNameEng)
9cd0: 0d 0a 0d 0a 2f 2f 20 ce e1 fa ff e2 e8 f2 fc 20 ....// ........
9ce0: f1 e2 ee e9 f1 f2 e2 ee 20 ea ee ed f2 e5 ea f1 ........ .......
9cf0: f2 e0 2c 20 f7 f2 e5 ed e8 e5 2f e7 e0 ef e8 f1 .., ....../.....
9d00: fc 0d 0a 23 64 65 66 69 6e 65 20 42 4c 5f 50 52 ...#define BL_PR
9d10: 4f 50 5f 52 57 28 70 61 72 4e 61 6d 65 45 6e 67 OP_RW(parNameEng
9d20: 2c 20 70 61 72 4e 61 6d 65 52 75 73 29 5c 0d 0a , parNameRus)\..
9d30: 09 42 4c 5f 50 52 4f 50 5f 28 70 61 72 4e 61 6d .BL_PROP_(parNam
9d40: 65 45 6e 67 2c 20 70 61 72 4e 61 6d 65 52 75 73 eEng, parNameRus
9d50: 2c 20 70 2d 3e 47 65 74 5f 23 23 70 61 72 4e 61 , p->Get_##parNa
9d60: 6d 65 45 6e 67 28 76 29 2c 20 70 2d 3e 53 65 74 meEng(v), p->Set
9d70: 5f 23 23 70 61 72 4e 61 6d 65 45 6e 67 28 76 29 _##parNameEng(v)
9d80: 2c 20 31 2c 20 31 29 5c 0d 0a 09 42 4c 5f 50 52 , 1, 1)\...BL_PR
9d90: 4f 50 5f 52 45 41 44 28 70 61 72 4e 61 6d 65 45 OP_READ(parNameE
9da0: 6e 67 29 0d 0a 0d 0a 0d 0a 2f 2f 20 ce e1 fa ff ng)......// ....
9db0: e2 e8 f2 fc 20 ee ea ee ed f7 e0 ed e8 e5 20 ec .... ......... .
9dc0: e5 f2 ee e4 ee e2 20 e8 20 f1 e2 ee e9 f1 f2 e2 ...... . .......
9dd0: 20 ea ee ed f2 e5 ea f1 f2 e0 0d 0a 23 64 65 66 ...........#def
9de0: 69 6e 65 20 42 4c 5f 45 4e 44 5f 43 4f 4e 54 45 ine BL_END_CONTE
9df0: 58 54 28 29 5c 0d 0a 09 74 79 70 65 64 65 66 20 XT()\...typedef
9e00: 65 6e 64 5f 64 65 66 3c 70 72 65 76 5f 74 79 70 end_def<prev_typ
9e10: 65 3c 54 52 55 45 2c 20 20 5f 5f 4c 49 4e 45 5f e<TRUE, __LINE_
9e20: 5f 3e 3a 3a 74 79 70 65 3e 20 65 6e 64 6d 65 74 _>::type> endmet
9e30: 68 73 3b 5c 0d 0a 09 74 79 70 65 64 65 66 20 65 hs;\...typedef e
9e40: 6e 64 5f 64 65 66 3c 70 72 65 76 5f 74 79 70 65 nd_def<prev_type
9e50: 3c 46 41 4c 53 45 2c 20 5f 5f 4c 49 4e 45 5f 5f <FALSE, __LINE__
9e60: 3e 3a 3a 74 79 70 65 3e 20 65 6e 64 70 72 6f 70 >::type> endprop
9e70: 73 0d 0a 0d 0a 0d 0a 2f 2f 20 d0 e5 e0 eb e8 e7 s......// ......
9e80: ee e2 e0 f2 fc 20 e0 e2 f2 ee 2d e8 ed e8 f6 e8 ..... ....-.....
9e90: e0 eb e8 e7 e0 f6 e8 fe 20 ea eb e0 f1 f1 e0 20 ........ ......
9ea0: ea ee ed f2 e5 ea f1 f2 e0 0d 0a 23 64 65 66 69 ...........#defi
9eb0: 6e 65 20 42 4c 5f 49 4e 49 54 5f 43 4f 4e 54 45 ne BL_INIT_CONTE
9ec0: 58 54 28 70 61 72 43 6c 61 73 73 4e 61 6d 65 29 XT(parClassName)
9ed0: 5c 0d 0a 09 5f 5f 64 65 63 6c 73 70 65 63 20 28 \...__declspec (
9ee0: 61 6c 6c 6f 63 61 74 65 28 22 2e 62 6c 63 24 62 allocate(".blc$b
9ef0: 22 29 29 5c 0d 0a 09 63 6f 6e 74 65 78 74 5f 6f "))\...context_o
9f00: 62 6a 3a 3a 50 5f 56 56 20 69 6e 69 74 23 23 70 bj::P_VV init##p
9f10: 61 72 43 6c 61 73 73 4e 61 6d 65 20 3d 20 26 70 arClassName = &p
9f20: 61 72 43 6c 61 73 73 4e 61 6d 65 3a 3a 49 6e 69 arClassName::Ini
9f30: 74 3b 5c 0d 0a 09 5f 5f 64 65 63 6c 73 70 65 63 t;\...__declspec
9f40: 20 28 61 6c 6c 6f 63 61 74 65 28 22 2e 62 6c 63 (allocate(".blc
9f50: 24 64 22 29 29 5c 0d 0a 09 63 6f 6e 74 65 78 74 $d"))\...context
9f60: 5f 6f 62 6a 3a 3a 50 5f 56 56 20 64 6f 6e 65 23 _obj::P_VV done#
9f70: 23 70 61 72 43 6c 61 73 73 4e 61 6d 65 20 3d 20 #parClassName =
9f80: 26 70 61 72 43 6c 61 73 73 4e 61 6d 65 3a 3a 44 &parClassName::D
9f90: 6f 6e 65 0d 0a 0d 0a 7d 2f 2f 6e 61 6d 65 73 70 one....}//namesp
9fa0: 61 63 65 20 63 6f 6e 74 65 78 74 5f 6f 62 6a 0d ace context_obj.
9fb0: 0a 75 73 69 6e 67 20 63 6f 6e 74 65 78 74 5f 6f .using context_o
9fc0: 62 6a 3a 3a 43 43 6f 6e 74 65 78 74 49 6d 70 6c bj::CContextImpl
9fd0: 3b 0d 0a 75 73 69 6e 67 20 63 6f 6e 74 65 78 74 ;..using context
9fe0: 5f 6f 62 6a 3a 3a 43 43 6f 6e 74 65 78 74 56 72 _obj::CContextVr
9ff0: 62 6c 41 72 67 73 3b 0d 0a 75 73 69 6e 67 20 63 blArgs;..using c
a000: 6f 6e 74 65 78 74 5f 6f 62 6a 3a 3a 6e 6f 5f 69 ontext_obj::no_i
a010: 6e 69 74 5f 64 6f 6e 65 3b 0d 0a nit_done;..