home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / turbocad / v8trial / TurboCADv8ProfessionalNoReg.exe / Data.Cab / F37595_Merge.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  3.7 KB  |  149 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // Merge.h: interface for the CMerge class.
  12. //
  13. //////////////////////////////////////////////////////////////////////
  14.  
  15. #if !defined(AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_)
  16. #define AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_
  17.  
  18. #if _MSC_VER >= 1000
  19. #pragma once
  20. #endif // _MSC_VER >= 1000
  21.  
  22. class CMapStyles : public CMap<long, long, Style*, Style*>
  23. {
  24. public:
  25.     ~CMapStyles() {CleanAll();};
  26.     void CleanAll();
  27. };
  28.  
  29. class CMapLineStyles : public CMap<long, long, LineStyle*, LineStyle*>
  30. {
  31. public:
  32.     ~CMapLineStyles() {CleanAll();};
  33.     void CleanAll();
  34. };
  35. class CMapBrushStyles : public CMap<long, long, BrushStyle*, BrushStyle*>
  36. {
  37. public:
  38.     ~CMapBrushStyles() {CleanAll();};
  39.     void CleanAll();
  40. };
  41.  
  42. class CMapBlocks : public CMap<long, long, Block*, Block*>
  43. {
  44. public:
  45.     ~CMapBlocks() {CleanAll();};
  46.     void CleanAll();
  47. };
  48.  
  49. class CMapLayers : public CMap<long, long, Layer*, Layer*>
  50. {
  51. public:
  52.     ~CMapLayers() {CleanAll();};
  53.     void CleanAll();
  54. };
  55.  
  56. class CArrBlock : public CArray<Block*, Block*>
  57. {
  58. public:
  59.     ~CArrBlock() {CleanAll();};
  60.     void CleanAll();
  61. };
  62.  
  63. class CArrLayer : public CArray<Layer*, Layer*>
  64. {
  65. public:
  66.     ~CArrLayer() {CleanAll();};
  67.     void CleanAll();
  68. };
  69.  
  70. class CMergeGraphic;
  71. class CMerge  
  72. {
  73. public:
  74.     HRESULT CorrectGraphic(IGraphic *pIGr, BOOL bInsert = TRUE);
  75.  
  76.     void CleanAddedBlocks();
  77.     HRESULT CorrectAddedBlocks();
  78.  
  79.     void CleanAddedLayers();
  80.  
  81.     virtual void CleanAll();
  82.     CMerge();
  83.     virtual ~CMerge();
  84.  
  85.     HRESULT Init(IDrawing *pIDwgSrc, IDrawing *pIDwgTrg, BOOL bSel);
  86.     HRESULT InitA(IDrawing *pIDwgSrc, IDrawing *pIDwgTrg);
  87.  
  88.     HRESULT Run(IGraphic **ppIGrMerge, BOOL bGrsOnly = FALSE);
  89.     HRESULT RunA();
  90.  
  91.     HRESULT StyleMerge(IUnknown *pIUnkStyle);
  92.  
  93.     CMapStyles m_mapStyles;
  94.     CMapLineStyles m_mapLineStyles;
  95.     CMapBrushStyles m_mapBrushStyles;
  96.     CMapBlocks m_mapBlks;
  97.     CMapLayers m_mapLayers;
  98.  
  99.     CArrBlock m_arrBlks;
  100.     CArrLayer m_arrLyrs;
  101. private:
  102.     BOOL m_bSel;
  103.  
  104.     Selection* m_pSelSrc;
  105.     IGraphic * m_pIGrMerge;
  106.     BOOL m_bInit;
  107.  
  108.     IDrawing    *m_pIDwgSrc;
  109.     Styles        *m_pStylesSrc;
  110.     LineStyles    *m_pLineStylesSrc;
  111.     BrushStyles    *m_pBrushStylesSrc;
  112.     Blocks        *m_pBlksSrc;
  113.     Layers        *m_pLayersSrc;
  114.     Graphics    *m_pGrsSrc;
  115.  
  116.     IDrawing    *m_pIDwgTrg;
  117.     Styles        *m_pStylesTrg;
  118.     LineStyles    *m_pLineStylesTrg;
  119.     BrushStyles    *m_pBrushStylesTrg;
  120.     Blocks        *m_pBlksTrg;
  121.     Layers        *m_pLayersTrg;
  122.     Graphics    *m_pGrsTrg;
  123.  
  124.     HRESULT MergeStyles();
  125.     HRESULT MergeStyle(Style *pStSrc);
  126.  
  127.     HRESULT MergeLineStyles();
  128.     HRESULT MergeLineStyle(LineStyle *pLineStSrc);
  129.  
  130.     HRESULT MergeBrushStyles();
  131.     HRESULT MergeBrushStyle(BrushStyle *pBrStSrc);
  132.  
  133.     HRESULT MergeBlock(Block *pBlkSrc, Block** ppBlkTrg);
  134.     HRESULT MergeBlocks();
  135.  
  136.     HRESULT MergeLayer(Layer *pLyrSrc, Layer** ppLyrTrg);
  137.     HRESULT MergeLayers();
  138.  
  139.     HRESULT MergeSelGraphics();
  140.     HRESULT MergeGraphics(Graphics *pGrsSrc, Graphics *pGrsTrg);
  141.  
  142.     DRAWINGGETGRAPHIC m_pfnDwgGetGraphic;
  143.     GRAPHICGETDISPATCH m_pfnGrGetDispatch;
  144.  
  145.     friend class CMergeGraphic;
  146. };
  147.  
  148. #endif // !defined(AFX_MERGE_H__AB417D73_CF7E_11D1_B818_000021452DB6__INCLUDED_)
  149.