Hex Artifact Content Вы: nobody
Вход

Artifact acc4ef483ec60fcb58a47c18130cac57bd7d14d3:


0000: 2f 2f 72 65 67 69 73 74 65 72 2e 63 70 70 0d 0a  //register.cpp..
0010: 23 69 6e 63 6c 75 64 65 20 22 53 74 64 41 66 78  #include "StdAfx
0020: 2e 68 22 0d 0a 23 69 6e 63 6c 75 64 65 20 22 72  .h"..#include "r
0030: 65 67 69 73 74 65 72 2e 68 22 0d 0a 0d 0a 43 52  egister.h"....CR
0040: 65 67 54 61 62 49 6e 66 6f 3a 3a 43 52 65 67 54  egTabInfo::CRegT
0050: 61 62 49 6e 66 6f 28 43 53 74 72 69 6e 67 41 72  abInfo(CStringAr
0060: 72 61 79 26 20 61 72 72 4f 66 4e 61 6d 65 73 29  ray& arrOfNames)
0070: 0d 0a 7b 0d 0a 09 43 52 65 67 44 65 66 2a 20 70  ..{...CRegDef* p
0080: 52 65 67 44 65 66 20 3d 20 70 4d 65 74 61 44 61  RegDef = pMetaDa
0090: 74 61 43 6f 6e 74 2d 3e 47 65 74 52 65 67 44 65  taCont->GetRegDe
00a0: 66 28 61 72 72 4f 66 4e 61 6d 65 73 5b 31 5d 29  f(arrOfNames[1])
00b0: 3b 0d 0a 09 69 66 28 21 70 52 65 67 44 65 66 29  ;...if(!pRegDef)
00c0: 0d 0a 09 7b 0d 0a 09 09 73 65 74 45 72 72 6f 72  ...{....setError
00d0: 28 22 d0 e5 e3 e8 f1 f2 f0 20 25 73 20 ed e5 20  ("....... %s .. 
00e0: ed e0 e9 e4 e5 ed 2e 22 2c 20 28 4c 50 43 53 54  .......", (LPCST
00f0: 52 29 61 72 72 4f 66 4e 61 6d 65 73 5b 31 5d 29  R)arrOfNames[1])
0100: 3b 0d 0a 09 09 72 65 74 75 72 6e 3b 0d 0a 09 7d  ;....return;...}
0110: 0d 0a 09 6d 5f 73 74 72 54 61 62 6c 65 4e 61 6d  ...m_strTableNam
0120: 65 20 3d 20 70 52 65 67 44 65 66 2d 3e 47 65 74  e = pRegDef->Get
0130: 52 65 67 41 63 74 54 61 62 6c 65 4e 61 6d 65 28  RegActTableName(
0140: 29 3b 0d 0a 09 6d 5f 70 54 61 62 6c 65 20 3d 20  );...m_pTable = 
0150: 73 74 61 74 69 63 5f 63 61 73 74 3c 43 54 61 62  static_cast<CTab
0160: 6c 65 45 78 2a 3e 28 70 44 61 74 61 44 69 63 74  leEx*>(pDataDict
0170: 2d 3e 47 65 74 54 61 62 6c 65 28 6d 5f 73 74 72  ->GetTable(m_str
0180: 54 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a 09 0d  TableName));....
0190: 0a 09 43 4e 6f 43 61 73 65 4d 61 70 3c 43 53 74  ..CNoCaseMap<CSt
01a0: 72 69 6e 67 3e 20 61 6c 69 61 63 65 73 3b 0d 0a  ring> aliaces;..
01b0: 09 66 69 6c 6c 4e 61 6d 65 73 46 72 6f 6d 4f 62  .fillNamesFromOb
01c0: 6a 73 28 70 52 65 67 44 65 66 2d 3e 47 65 74 46  js(pRegDef->GetF
01d0: 69 67 75 72 65 28 29 2c 20 61 6c 69 61 63 65 73  igure(), aliaces
01e0: 29 3b 0d 0a 09 66 69 6c 6c 4e 61 6d 65 73 46 72  );...fillNamesFr
01f0: 6f 6d 4f 62 6a 73 28 70 52 65 67 44 65 66 2d 3e  omObjs(pRegDef->
0200: 47 65 74 46 69 6c 64 73 28 29 2c 20 61 6c 69 61  GetFilds(), alia
0210: 63 65 73 29 3b 0d 0a 09 66 69 6c 6c 4e 61 6d 65  ces);...fillName
0220: 73 46 72 6f 6d 4f 62 6a 73 28 70 52 65 67 44 65  sFromObjs(pRegDe
0230: 66 2d 3e 47 65 74 50 72 6f 70 73 28 29 2c 20 61  f->GetProps(), a
0240: 6c 69 61 63 65 73 29 3b 0d 0a 09 66 69 6c 6c 54  liaces);...fillT
0250: 61 62 49 6e 66 6f 28 61 6c 69 61 63 65 73 29 3b  abInfo(aliaces);
0260: 0d 0a 7d 0d 0a 0d 0a 43 52 65 67 54 6f 74 61 6c  ..}....CRegTotal
0270: 73 54 61 62 49 6e 66 6f 3a 3a 43 52 65 67 54 6f  sTabInfo::CRegTo
0280: 74 61 6c 73 54 61 62 49 6e 66 6f 28 43 53 74 72  talsTabInfo(CStr
0290: 69 6e 67 41 72 72 61 79 26 20 61 72 72 4f 66 4e  ingArray& arrOfN
02a0: 61 6d 65 73 29 0d 0a 7b 0d 0a 09 43 52 65 67 44  ames)..{...CRegD
02b0: 65 66 2a 20 70 52 65 67 44 65 66 20 3d 20 70 4d  ef* pRegDef = pM
02c0: 65 74 61 44 61 74 61 43 6f 6e 74 2d 3e 47 65 74  etaDataCont->Get
02d0: 52 65 67 44 65 66 28 61 72 72 4f 66 4e 61 6d 65  RegDef(arrOfName
02e0: 73 5b 31 5d 29 3b 0d 0a 09 69 66 28 21 70 52 65  s[1]);...if(!pRe
02f0: 67 44 65 66 29 0d 0a 09 7b 0d 0a 09 09 73 65 74  gDef)...{....set
0300: 45 72 72 6f 72 28 22 d0 e5 e3 e8 f1 f2 f0 20 25  Error("....... %
0310: 73 20 ed e5 20 ed e0 e9 e4 e5 ed 2e 22 2c 20 28  s .. .......", (
0320: 4c 50 43 53 54 52 29 61 72 72 4f 66 4e 61 6d 65  LPCSTR)arrOfName
0330: 73 5b 31 5d 29 3b 0d 0a 09 09 72 65 74 75 72 6e  s[1]);....return
0340: 3b 0d 0a 09 7d 0d 0a 09 6d 5f 73 74 72 54 61 62  ;...}...m_strTab
0350: 6c 65 4e 61 6d 65 20 3d 20 70 52 65 67 44 65 66  leName = pRegDef
0360: 2d 3e 47 65 74 52 65 67 54 61 62 6c 65 4e 61 6d  ->GetRegTableNam
0370: 65 28 29 3b 0d 0a 09 6d 5f 70 54 61 62 6c 65 20  e();...m_pTable 
0380: 3d 20 73 74 61 74 69 63 5f 63 61 73 74 3c 43 54  = static_cast<CT
0390: 61 62 6c 65 45 78 2a 3e 28 70 44 61 74 61 44 69  ableEx*>(pDataDi
03a0: 63 74 2d 3e 47 65 74 54 61 62 6c 65 28 6d 5f 73  ct->GetTable(m_s
03b0: 74 72 54 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a  trTableName));..
03c0: 09 0d 0a 09 43 4e 6f 43 61 73 65 4d 61 70 3c 43  ....CNoCaseMap<C
03d0: 53 74 72 69 6e 67 3e 20 61 6c 69 61 63 65 73 3b  String> aliaces;
03e0: 0d 0a 09 66 69 6c 6c 4e 61 6d 65 73 46 72 6f 6d  ...fillNamesFrom
03f0: 4f 62 6a 73 28 70 52 65 67 44 65 66 2d 3e 47 65  Objs(pRegDef->Ge
0400: 74 46 69 67 75 72 65 28 29 2c 20 61 6c 69 61 63  tFigure(), aliac
0410: 65 73 29 3b 0d 0a 09 66 69 6c 6c 4e 61 6d 65 73  es);...fillNames
0420: 46 72 6f 6d 4f 62 6a 73 28 70 52 65 67 44 65 66  FromObjs(pRegDef
0430: 2d 3e 47 65 74 50 72 6f 70 73 28 29 2c 20 61 6c  ->GetProps(), al
0440: 69 61 63 65 73 29 3b 0d 0a 09 66 69 6c 6c 54 61  iaces);...fillTa
0450: 62 49 6e 66 6f 28 61 6c 69 61 63 65 73 29 3b 0d  bInfo(aliaces);.
0460: 0a 7d 0d 0a 0d 0a                                .}....