Hex Artifact Content Вы: nobody
Вход

Artifact 1b507341b3ff991cd5885175bf9af60ae2c9a400:


0000: 2f 2f 20 64 6f 63 74 61 62 6c 65 73 2e 63 70 70  // doctables.cpp
0010: 0d 0a 23 69 6e 63 6c 75 64 65 20 22 53 74 64 41  ..#include "StdA
0020: 66 78 2e 68 22 0d 0a 23 69 6e 63 6c 75 64 65 20  fx.h"..#include 
0030: 22 64 6f 63 74 61 62 6c 65 73 2e 68 22 0d 0a 0d  "doctables.h"...
0040: 0a 43 44 54 54 61 62 49 6e 66 6f 3a 3a 43 44 54  .CDTTabInfo::CDT
0050: 54 61 62 49 6e 66 6f 28 43 53 74 72 69 6e 67 41  TabInfo(CStringA
0060: 72 72 61 79 26 20 61 72 72 4f 66 4e 61 6d 65 73  rray& arrOfNames
0070: 29 0d 0a 7b 0d 0a 09 43 44 6f 63 44 65 66 2a 20  )..{...CDocDef* 
0080: 70 44 6f 63 44 65 66 20 3d 20 70 4d 65 74 61 44  pDocDef = pMetaD
0090: 61 74 61 43 6f 6e 74 2d 3e 47 65 74 44 6f 63 44  ataCont->GetDocD
00a0: 65 66 28 61 72 72 4f 66 4e 61 6d 65 73 5b 31 5d  ef(arrOfNames[1]
00b0: 29 3b 0d 0a 09 69 66 28 21 70 44 6f 63 44 65 66  );...if(!pDocDef
00c0: 29 0d 0a 09 7b 0d 0a 09 09 73 65 74 45 72 72 6f  )...{....setErro
00d0: 72 28 22 c4 ee ea f3 ec e5 ed f2 20 25 73 20 ed  r("........ %s .
00e0: e5 20 ed e0 e9 e4 e5 ed 2e 22 2c 20 28 4c 50 43  . .......", (LPC
00f0: 53 54 52 29 61 72 72 4f 66 4e 61 6d 65 73 5b 31  STR)arrOfNames[1
0100: 5d 29 3b 0d 0a 09 09 72 65 74 75 72 6e 3b 0d 0a  ]);....return;..
0110: 09 7d 0d 0a 09 6d 5f 73 74 72 54 61 62 6c 65 4e  .}...m_strTableN
0120: 61 6d 65 20 3d 20 70 44 6f 63 44 65 66 2d 3e 47  ame = pDocDef->G
0130: 65 74 54 62 6c 54 61 62 6c 65 4e 61 6d 65 28 29  etTblTableName()
0140: 3b 0d 0a 09 6d 5f 70 54 61 62 6c 65 20 3d 20 73  ;...m_pTable = s
0150: 74 61 74 69 63 5f 63 61 73 74 3c 43 54 61 62 6c  tatic_cast<CTabl
0160: 65 45 78 2a 3e 28 70 44 61 74 61 44 69 63 74 2d  eEx*>(pDataDict-
0170: 3e 47 65 74 54 61 62 6c 65 28 6d 5f 73 74 72 54  >GetTable(m_strT
0180: 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 09 69 66  ableName));...if
0190: 28 21 6d 5f 70 54 61 62 6c 65 29 0d 0a 09 7b 0d  (!m_pTable)...{.
01a0: 0a 09 09 73 65 74 45 72 72 6f 72 28 22 c4 ee ea  ...setError("...
01b0: f3 ec e5 ed f2 20 25 73 20 ed e5 20 e8 ec e5 e5  ..... %s .. ....
01c0: f2 20 f2 e0 e1 eb e8 f7 ed ee e9 20 f7 e0 f1 f2  . ......... ....
01d0: e8 2e 22 2c 20 28 4c 50 43 53 54 52 29 61 72 72  ..", (LPCSTR)arr
01e0: 4f 66 4e 61 6d 65 73 5b 31 5d 29 3b 0d 0a 09 09  OfNames[1]);....
01f0: 72 65 74 75 72 6e 3b 0d 0a 09 7d 0d 0a 09 0d 0a  return;...}.....
0200: 09 43 4e 6f 43 61 73 65 4d 61 70 3c 43 53 74 72  .CNoCaseMap<CStr
0210: 69 6e 67 3e 20 61 6c 69 61 63 65 73 3b 0d 0a 09  ing> aliaces;...
0220: 66 69 6c 6c 4e 61 6d 65 73 46 72 6f 6d 4f 62 6a  fillNamesFromObj
0230: 73 28 70 44 6f 63 44 65 66 2d 3e 47 65 74 54 61  s(pDocDef->GetTa
0240: 62 6c 65 73 28 29 2c 20 61 6c 69 61 63 65 73 29  bles(), aliaces)
0250: 3b 0d 0a 09 66 69 6c 6c 54 61 62 49 6e 66 6f 28  ;...fillTabInfo(
0260: 61 6c 69 61 63 65 73 29 3b 0d 0a 7d              aliaces);..}