EventArgs.hpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. #pragma once
  2. #include <functional>
  3. #include "DelegateArg.hpp"
  4. #include "String.DString.hpp"
  5. #include "String.WString.hpp"
  6. using namespace eSTR::Literals;
  7. #include "Utility.Error.hpp"
  8. #ifndef _DELEGATEARG_DLL
  9. #define DELEGATEARG_API _declspec(dllimport)
  10. #else
  11. #define DELEGATEARG_API _declspec(dllexport)
  12. #endif
  13. #ifndef _DELEGATEARG_DLL
  14. #ifdef _WIN64
  15. #ifdef _DEBUG
  16. #pragma comment (lib, "ECOM.Utility.DelegateArg64D.lib")
  17. #else
  18. #pragma comment (lib, "ECOM.Utility.DelegateArg64.lib")
  19. #endif
  20. #else // X86
  21. #ifdef _DEBUG
  22. #pragma comment (lib, "ECOM.Utility.DelegateArgD.lib")
  23. #else
  24. #pragma comment (lib, "ECOM.Utility.DelegateArg.lib")
  25. #endif
  26. #endif
  27. #endif // _DELEGATEARG_DLL
  28. #pragma warning (disable : 4275)
  29. namespace ECOM
  30. {
  31. namespace Utility
  32. {
  33. class DDateTime;
  34. }
  35. namespace DICOM
  36. {
  37. class DICOMCommandSet;
  38. class DICOMDataSet;
  39. class DICOMFile;
  40. using CommandSet = DICOMCommandSet ;
  41. using DataSet = DICOMDataSet ;
  42. }
  43. }
  44. class DicomFileHolder;
  45. class DStringArray;
  46. struct __EventArg_DWString
  47. {
  48. eSTR::DString m_sString;
  49. eSTR::WString m_wString;
  50. __EventArg_DWString ()
  51. {
  52. }
  53. __EventArg_DWString (const __EventArg_DWString & from)
  54. {
  55. m_sString = from.m_sString;
  56. m_wString = from.m_wString;
  57. }
  58. void Set (const eSTR::DString & str) { m_sString = str; }
  59. void Set (const eSTR::WString & str) { m_wString = str; }
  60. void Set (const eSTR::DStringView & str) { m_sString = str; }
  61. void Set (const eSTR::WStringView & str) { m_wString = str; }
  62. template <typename T> T Get () const { }
  63. template <> eSTR::DString Get () const { return m_sString; }
  64. template <> eSTR::WString Get () const { return m_wString; }
  65. template <typename T> T GetAs () const { }
  66. template <> eSTR::DString GetAs () const { if (m_sString.GetLength () > 0) return m_sString; return m_wString.ToDString (); }
  67. template <> eSTR::WString GetAs () const { if (m_wString.GetLength () > 0) return m_wString; return eSTR::WString (m_sString); }
  68. __EventArg_DWString & operator = (const eSTR::DString & str)
  69. {
  70. Set (str);
  71. return (*this);
  72. }
  73. __EventArg_DWString & operator = (const eSTR::WString & str)
  74. {
  75. Set (str);
  76. return (*this);
  77. }
  78. __EventArg_DWString & operator = (const eSTR::DStringView & str)
  79. {
  80. Set (str);
  81. return (*this);
  82. }
  83. __EventArg_DWString & operator = (const eSTR::WStringView & str)
  84. {
  85. Set (str);
  86. return (*this);
  87. }
  88. __EventArg_DWString & operator = (const __EventArg_DWString & from)
  89. {
  90. if (this == &from) return (*this);
  91. m_sString = from.m_sString;
  92. m_wString = from.m_wString;
  93. return (*this);
  94. }
  95. inline operator eSTR::DString () const
  96. {
  97. return GetAs <eSTR::DString> ();
  98. }
  99. inline operator eSTR::WString () const
  100. {
  101. return GetAs <eSTR::WString> ();
  102. }
  103. };
  104. //-----------------------------------------------------------------------------
  105. // A general DelegateArg of Error
  106. //-----------------------------------------------------------------------------
  107. class DELEGATEARG_API EventArgs_Error : public DelegateArgs
  108. {
  109. typedef DelegateArgs inherited;
  110. DECLARE_RTTI (EventArgs_Error)
  111. public:
  112. inline EventArgs_Error (const ECOM::Utility::Error::ErrorCode & ec)
  113. : ErrorCode (ec)
  114. {
  115. }
  116. public:
  117. const ECOM::Utility::Error::ErrorCode & ErrorCode;
  118. };
  119. //-----------------------------------------------------------------------------
  120. // A general DelegateArg of Pointer
  121. //-----------------------------------------------------------------------------
  122. class DELEGATEARG_API EventArgs_Pointer : public DelegateArgs
  123. {
  124. typedef DelegateArgs inherited;
  125. DECLARE_RTTI (EventArgs_Pointer)
  126. public:
  127. inline EventArgs_Pointer (void * ptr)
  128. {
  129. m_Pointer = ptr;
  130. }
  131. public:
  132. void * m_Pointer;
  133. };
  134. //-----------------------------------------------------------------------------
  135. // A general DelegateArg of DateTime
  136. //-----------------------------------------------------------------------------
  137. class DELEGATEARG_API EventArgs_DateTime : public DelegateArgs
  138. {
  139. typedef DelegateArgs inherited;
  140. DECLARE_RTTI (EventArgs_DateTime)
  141. public:
  142. inline EventArgs_DateTime (ECOM::Utility::DDateTime * Now)
  143. {
  144. m_pNow = Now;
  145. }
  146. public:
  147. const ECOM::Utility::DDateTime * m_pNow;
  148. };
  149. //-----------------------------------------------------------------------------
  150. // A general DelegateArg of int
  151. //-----------------------------------------------------------------------------
  152. class DELEGATEARG_API EventArgs_Int : public DelegateArgs
  153. {
  154. typedef DelegateArgs inherited;
  155. DECLARE_RTTI (EventArgs_Int)
  156. public:
  157. inline EventArgs_Int (int i)
  158. {
  159. m_int = i;
  160. }
  161. public:
  162. int m_int;
  163. };
  164. class DELEGATEARG_API EventArgs_2Int : public DelegateArgs
  165. {
  166. typedef DelegateArgs inherited;
  167. DECLARE_RTTI (EventArgs_2Int)
  168. public:
  169. inline EventArgs_2Int (int i1, int i2)
  170. {
  171. m_int1 = i1;
  172. m_int2 = i2;
  173. }
  174. public:
  175. int m_int1;
  176. int m_int2;
  177. };
  178. class DELEGATEARG_API EventArgs_3Int : public DelegateArgs
  179. {
  180. typedef DelegateArgs inherited;
  181. DECLARE_RTTI (EventArgs_3Int)
  182. public:
  183. inline EventArgs_3Int (int i1, int i2, int i3)
  184. {
  185. m_int1 = i1;
  186. m_int2 = i2;
  187. m_int3 = i3;
  188. }
  189. public:
  190. int m_int1;
  191. int m_int2;
  192. int m_int3;
  193. };
  194. class DELEGATEARG_API EventArgs_4Int : public DelegateArgs
  195. {
  196. typedef DelegateArgs inherited;
  197. DECLARE_RTTI (EventArgs_4Int)
  198. public:
  199. inline EventArgs_4Int (int i1, int i2, int i3, int i4)
  200. {
  201. m_int1 = i1;
  202. m_int2 = i2;
  203. m_int3 = i3;
  204. m_int4 = i4;
  205. }
  206. public:
  207. int m_int1;
  208. int m_int2;
  209. int m_int3;
  210. int m_int4;
  211. };
  212. class DELEGATEARG_API EventArgs_5Int : public DelegateArgs
  213. {
  214. typedef DelegateArgs inherited;
  215. DECLARE_RTTI (EventArgs_5Int)
  216. public:
  217. inline EventArgs_5Int (int i1, int i2, int i3, int i4, int i5)
  218. {
  219. m_int1 = i1;
  220. m_int2 = i2;
  221. m_int3 = i3;
  222. m_int4 = i4;
  223. m_int5 = i5;
  224. }
  225. public:
  226. int m_int1;
  227. int m_int2;
  228. int m_int3;
  229. int m_int4;
  230. int m_int5;
  231. };
  232. //-----------------------------------------------------------------------------
  233. // A general DelegateArg of double
  234. //-----------------------------------------------------------------------------
  235. class DELEGATEARG_API EventArgs_Double : public DelegateArgs
  236. {
  237. typedef DelegateArgs inherited;
  238. DECLARE_RTTI (EventArgs_Double)
  239. public:
  240. inline EventArgs_Double (double d)
  241. {
  242. m_double = d;
  243. }
  244. public:
  245. double m_double;
  246. };
  247. //-----------------------------------------------------------------------------
  248. // A general DelegateArg of DString
  249. //-----------------------------------------------------------------------------
  250. class DELEGATEARG_API EventArgs_String : public DelegateArgs
  251. {
  252. typedef DelegateArgs inherited;
  253. DECLARE_RTTI (EventArgs_String)
  254. public:
  255. inline EventArgs_String (eSTR::DString s)
  256. {
  257. m_String = s;
  258. }
  259. public:
  260. eSTR::DString m_String;
  261. };
  262. class DELEGATEARG_API EventArgs_2String : public EventArgs_String
  263. {
  264. typedef EventArgs_String inherited;
  265. DECLARE_RTTI (EventArgs_2String)
  266. public:
  267. inline EventArgs_2String (eSTR::DString s1, eSTR::DString s2) : inherited (s1), m_String1 (s1)
  268. {
  269. m_String2 = s2;
  270. }
  271. public:
  272. eSTR::DString & m_String1;
  273. eSTR::DString m_String2;
  274. };
  275. class DELEGATEARG_API EventArgs_4String : public DelegateArgs
  276. {
  277. typedef DelegateArgs inherited;
  278. DECLARE_RTTI (EventArgs_4String)
  279. public:
  280. eSTR::DString m_String [4];
  281. };
  282. class DELEGATEARG_API EventArgs_8String : public DelegateArgs
  283. {
  284. typedef DelegateArgs inherited;
  285. DECLARE_RTTI (EventArgs_8String)
  286. public:
  287. EventArgs_8String ()
  288. {
  289. }
  290. EventArgs_8String (const EventArgs_8String & from)
  291. {
  292. from.CopyTo (*this);
  293. }
  294. public:
  295. eSTR::DString m_String [8];
  296. public:
  297. void CopyTo (EventArgs_8String & to) const
  298. {
  299. for (int Index=0; Index<8; Index++)
  300. {
  301. to.m_String [Index] = m_String [Index];
  302. }
  303. }
  304. bool IsEqual (const EventArgs_8String & to) const
  305. {
  306. for (int Index=0; Index<8; Index++)
  307. {
  308. if (to.m_String [Index] != m_String [Index])
  309. return false;
  310. }
  311. return true;
  312. }
  313. EventArgs_8String & operator = (const EventArgs_8String & from)
  314. {
  315. from.CopyTo (*this);
  316. return (*this);
  317. }
  318. };
  319. inline bool __stdcall operator == (const EventArgs_8String& s1, const EventArgs_8String& s2)
  320. {
  321. return s1.IsEqual (s2);
  322. }
  323. //-----------------------------------------------------------------------------
  324. // A general DelegateArg of WString
  325. //-----------------------------------------------------------------------------
  326. class DELEGATEARG_API EventArgs_WString : public DelegateArgs
  327. {
  328. typedef DelegateArgs inherited;
  329. DECLARE_RTTI (EventArgs_WString)
  330. public:
  331. inline EventArgs_WString (eSTR::WString s)
  332. {
  333. m_String = s;
  334. }
  335. inline EventArgs_WString (CV_WString & s)
  336. {
  337. m_String = s;
  338. }
  339. inline EventArgs_WString (const wchar_t * s)
  340. {
  341. m_String = CV_WString (s);
  342. }
  343. public:
  344. eSTR::WString m_String;
  345. };
  346. class DELEGATEARG_API EventArgs_2WString : public EventArgs_WString
  347. {
  348. typedef EventArgs_WString inherited;
  349. DECLARE_RTTI (EventArgs_2WString)
  350. public:
  351. inline EventArgs_2WString (eSTR::WString s1, eSTR::WString s2) : inherited (s1), m_String1 (s1)
  352. {
  353. m_String2 = s2;
  354. }
  355. public:
  356. eSTR::WString & m_String1;
  357. eSTR::WString m_String2;
  358. };
  359. //-----------------------------------------------------------------------------
  360. // A general DelegateArg of DString & WString
  361. //-----------------------------------------------------------------------------
  362. class DELEGATEARG_API EventArgs_DWString : public DelegateArgs
  363. {
  364. typedef DelegateArgs inherited;
  365. DECLARE_RTTI (EventArgs_DWString)
  366. public:
  367. inline EventArgs_DWString (eSTR::WString ws, eSTR::DString ds)
  368. {
  369. m_wString = ws;
  370. m_dString = ds;
  371. }
  372. public:
  373. eSTR::WString m_wString;
  374. eSTR::DString m_dString;
  375. };
  376. class DELEGATEARG_API EventArgs_2DWString : public EventArgs_DWString
  377. {
  378. typedef EventArgs_DWString inherited;
  379. DECLARE_RTTI (EventArgs_2DWString)
  380. public:
  381. inline EventArgs_2DWString (eSTR::WString ws1, eSTR::DString ds1, eSTR::WString ws2, eSTR::DString ds2) :
  382. inherited (ws1, ds1),
  383. m_wString1 (ws1),
  384. m_dString1 (ds1)
  385. {
  386. m_wString2 = ws2;
  387. m_dString2 = ds2;
  388. }
  389. public:
  390. eSTR::WString & m_wString1;
  391. eSTR::DString & m_dString1;
  392. eSTR::WString m_wString2;
  393. eSTR::DString m_dString2;
  394. };
  395. //-----------------------------------------------------------------------------
  396. // A general DelegateArg of DICOM DataSet
  397. //-----------------------------------------------------------------------------
  398. class DELEGATEARG_API EventArgs_DataSet : public DelegateArgs
  399. {
  400. typedef DelegateArgs inherited;
  401. DECLARE_RTTI (EventArgs_DataSet)
  402. public:
  403. inline EventArgs_DataSet (const ECOM::DICOM::DICOMDataSet * dds)
  404. {
  405. m_DDS = dds;
  406. }
  407. public:
  408. const ECOM::DICOM::DICOMDataSet * m_DDS;
  409. };
  410. //-----------------------------
  411. // 带 2 个参数
  412. //-----------------------------
  413. class DELEGATEARG_API EventArgs_DataSetEx : public EventArgs_DataSet
  414. {
  415. typedef EventArgs_DataSet inherited;
  416. DECLARE_RTTI (EventArgs_DataSetEx)
  417. public:
  418. inline EventArgs_DataSetEx (const ECOM::DICOM::DICOMDataSet * DDS, eSTR::DString LocalAE, eSTR::DString RemoteAE)
  419. : inherited (DDS)
  420. , m_LocalAETitle (LocalAE)
  421. , m_RemoteAETitle (RemoteAE)
  422. {
  423. }
  424. public:
  425. eSTR::DString m_LocalAETitle;
  426. eSTR::DString m_RemoteAETitle;
  427. };
  428. //-----------------------------------------------------------------------------
  429. // A general DelegateArg of FileName
  430. //-----------------------------------------------------------------------------
  431. class DELEGATEARG_API EventArgs_FileName : public EventArgs_WString
  432. {
  433. typedef EventArgs_WString inherited;
  434. DECLARE_RTTI (EventArgs_FileName)
  435. public:
  436. inline EventArgs_FileName (eSTR::WString FN) : inherited (FN), m_FileName (m_String)
  437. {
  438. }
  439. inline EventArgs_FileName (CV_WString & FN) : inherited (FN), m_FileName (m_String)
  440. {
  441. }
  442. inline EventArgs_FileName (const wchar_t * FN) : inherited (FN), m_FileName (m_String)
  443. {
  444. }
  445. public:
  446. eSTR::WString & m_FileName;
  447. };
  448. //-----------------------------------------------------------------------------
  449. // A general DelegateArg of DICOMFile
  450. //-----------------------------------------------------------------------------
  451. class DELEGATEARG_API EventArgs_DicomFile : public DelegateArgs
  452. {
  453. typedef DelegateArgs inherited;
  454. DECLARE_RTTI (EventArgs_DicomFile)
  455. public:
  456. inline EventArgs_DicomFile (ECOM::DICOM::DICOMFile * DicomFile)
  457. {
  458. m_DicomFile = DicomFile;
  459. }
  460. public:
  461. ECOM::DICOM::DICOMFile * m_DicomFile;
  462. };
  463. class DELEGATEARG_API EventArgs_DicomFile_ImportExport : public EventArgs_DicomFile
  464. {
  465. typedef EventArgs_DicomFile inherited;
  466. DECLARE_RTTI (EventArgs_DicomFile_ImportExport)
  467. public:
  468. inline EventArgs_DicomFile_ImportExport (
  469. ECOM::DICOM::DICOMFile * DicomFile,
  470. const char * Calling, const char * Called,
  471. const char * IP, int Port) :
  472. EventArgs_DicomFile (DicomFile)
  473. {
  474. m_Calling = eSTR::StringView (Calling);
  475. m_Called = eSTR::StringView (Called);
  476. m_IP = eSTR::StringView (IP);
  477. m_Port = Port;
  478. }
  479. public:
  480. eSTR::DString m_Calling;
  481. eSTR::DString m_Called;
  482. eSTR::DString m_IP;
  483. int m_Port;
  484. };
  485. //-----------------------------
  486. // 带 6 个参数
  487. //-----------------------------
  488. class DELEGATEARG_API EventArgs_DicomFileEx2 : public EventArgs_DicomFile
  489. {
  490. typedef EventArgs_DicomFile inherited;
  491. DECLARE_RTTI (EventArgs_DicomFileEx2)
  492. public:
  493. inline EventArgs_DicomFileEx2 (
  494. ECOM::DICOM::DICOMFile * DicomFile,
  495. eSTR::DString LocalAE, eSTR::DString RemoteAE)
  496. : inherited (DicomFile)
  497. {
  498. m_LocalAETitle = LocalAE;
  499. m_RemoteAETitle = RemoteAE;
  500. }
  501. public:
  502. eSTR::DString m_LocalAETitle;
  503. eSTR::DString m_RemoteAETitle;
  504. };
  505. //-----------------------------
  506. // 带 6 个参数
  507. // 用于 BeforeSend, BeforeSave, BeforeCMove
  508. //-----------------------------
  509. class DELEGATEARG_API EventArgs_DicomFileEx6 : public EventArgs_DicomFileEx2
  510. {
  511. typedef EventArgs_DicomFileEx2 inherited;
  512. DECLARE_RTTI (EventArgs_DicomFileEx6)
  513. public:
  514. inline EventArgs_DicomFileEx6 (
  515. ECOM::DICOM::DICOMFile * DicomFile,
  516. eSTR::DString LocalAE, eSTR::DString RemoteAE,
  517. eSTR::DString CallingVersion, eSTR::DString CalledVersion,
  518. eSTR::DString ImageTransferSyntax, eSTR::DString PDUTransferSyntax)
  519. : inherited (DicomFile, LocalAE, RemoteAE)
  520. {
  521. m_CallingVersionClass = CallingVersion;
  522. m_CalledVersionClass = CalledVersion;
  523. m_ImageTransferSyntax = ImageTransferSyntax;
  524. m_PDUTransferSyntax = PDUTransferSyntax;
  525. }
  526. public:
  527. eSTR::DString m_CallingVersionClass;
  528. eSTR::DString m_CalledVersionClass;
  529. eSTR::DString m_ImageTransferSyntax;
  530. eSTR::DString m_PDUTransferSyntax;
  531. };
  532. //-----------------------------------------------------------------------------
  533. // A general DelegateArg of DicomFileHolder
  534. //-----------------------------------------------------------------------------
  535. class DELEGATEARG_API EventArgs_DicomFileHolder : public DelegateArgs
  536. {
  537. typedef DelegateArgs inherited;
  538. DECLARE_RTTI (EventArgs_DicomFileHolder)
  539. public:
  540. inline EventArgs_DicomFileHolder (::DicomFileHolder * holder)
  541. {
  542. m_pHolder = holder;
  543. }
  544. public:
  545. ::DicomFileHolder * m_pHolder;
  546. };
  547. //-----------------------------------------------------------------------------
  548. // A general DelegateArg of DICOM Connect
  549. //-----------------------------------------------------------------------------
  550. class DELEGATEARG_API EventArgs_Connect : public DelegateArgs
  551. {
  552. typedef DelegateArgs inherited;
  553. DECLARE_RTTI (EventArgs_Connect)
  554. public:
  555. inline EventArgs_Connect (void)
  556. {
  557. m_pCommandSet = NULL;
  558. m_bOK = true;
  559. }
  560. public:
  561. const ECOM::DICOM::DICOMCommandSet * m_pCommandSet;
  562. eSTR::DString m_CallingAETitle;
  563. eSTR::DString m_CalledAETitle;
  564. eSTR::DString m_ConnectedNode;
  565. UINT32 m_ConnectedPort;
  566. UINT32 m_ConnectionNumber;
  567. double m_ConnectedTime;
  568. bool m_bOK;
  569. };
  570. namespace DumpEventArgs::DICOM
  571. {
  572. enum class enDir { In = 1, Out = 2 };
  573. class DELEGATEARG_API Session : public DelegateArgs
  574. {
  575. typedef DelegateArgs inherited;
  576. DECLARE_RTTI (Session)
  577. int m_SessionID = 0;
  578. };
  579. //-----------------------------
  580. // 两个 AETitle
  581. //-----------------------------
  582. class DELEGATEARG_API AETitle : public Session
  583. {
  584. typedef Session inherited;
  585. DECLARE_RTTI (AETitle)
  586. public:
  587. AETitle () = default;
  588. public:
  589. eSTR::DString m_CallingAETitle;
  590. eSTR::DString m_CalledAETitle;
  591. };
  592. //-----------------------------
  593. // DICOM 谈判信息
  594. //-----------------------------
  595. class DELEGATEARG_API Negotiation : public AETitle
  596. {
  597. typedef AETitle inherited;
  598. DECLARE_RTTI (Negotiation)
  599. public:
  600. Negotiation (enDir dir) : m_Dir (dir) {}
  601. public:
  602. const enDir m_Dir;
  603. eSTR::DString m_Type; // "AARQ", "AAAC", "AARJ"
  604. eSTR::DString m_Detail; // AARQ.ToString (), AAAC.ToString (), etc.
  605. };
  606. //-----------------------------
  607. // 命令集
  608. //-----------------------------
  609. class DELEGATEARG_API CommandSet : public AETitle
  610. {
  611. typedef AETitle inherited;
  612. DECLARE_RTTI (CommandSet)
  613. public:
  614. inline CommandSet (enDir dir, const ECOM::DICOM::CommandSet * DCS)
  615. : m_Dir (dir), m_DCS (DCS)
  616. {
  617. ErrorCodeToString = [] (auto) { return eSTR::DString (); };
  618. }
  619. public:
  620. const enDir m_Dir;
  621. const ECOM::DICOM::CommandSet * m_DCS;
  622. std::function <eSTR::DString (UINT16)> ErrorCodeToString;
  623. };
  624. //-----------------------------
  625. // 命令集 + 数据集
  626. //-----------------------------
  627. class DELEGATEARG_API CommandDataSet : public CommandSet
  628. {
  629. typedef CommandSet inherited;
  630. DECLARE_RTTI (CommandDataSet)
  631. public:
  632. inline CommandDataSet (enDir dir, const ECOM::DICOM::CommandSet * DCS, const ECOM::DICOM::DataSet * DDS)
  633. : inherited (dir, DCS), m_DDS (DDS)
  634. {
  635. }
  636. public:
  637. const ECOM::DICOM::DataSet * m_DDS;
  638. };
  639. }