Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

MrDwgConnector.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #pragma once
11 
12 #include <vector>
13 #include "HIOManager.h"
14 
15 #ifdef HIO_DWG
16 #define HIO_API __declspec (dllexport)
17 #else
18 #define HIO_API
19 #endif
20 
21 class AcDbDatabase;
22 class hio_dwg;
23 
26 class HIO_API HIOConnectorDWG : public HIOConnector
27 {
28 public:
31  ~HIOConnectorDWG();
32 
36  void SetDatabase(AcDbDatabase * pAcDbDatabase)
37  {
38  // database needs to be alive for DWG pointers to be valid
39  m_pAcDbDatabase = pAcDbDatabase;
40  }
41 
42  // functions inherited from HIOConnector
43  HC_KEY GetHoopsEntity(void * pKernelEntity, HC_KEY modelKey = INVALID_KEY);
44  void * GetKernelEntity(HC_KEY key, HC_KEY modelKey = INVALID_KEY);
45  bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList, HC_KEY modelKey = INVALID_KEY);
46  bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList, HC_KEY modelKey = INVALID_KEY);
47  void AddConnection(HC_KEY key, void* pKernelEntity, HC_KEY modelKey = INVALID_KEY);
48 
49 protected:
51  AcDbDatabase * m_pAcDbDatabase;
52 
53 private:
54  void RegenerateHash(HC_KEY modelKey);
55  struct vhash_s *mhash_Hoops2Kernel;
56  struct vhash_s *mhash_Kernel2Hoops;
57 };
58 
59 extern "C" {
60  HIO_API void * CreateInput(HIOManager *manager);
61  HIO_API void * CreateOutput(HIOManager *manager);
62  HIO_API void * CreateConnector(void * unused);
63  HIO_API void Free(hio_dwg *);
64  HIO_API void FreeConnector(HIOConnectorDWG *connector);
65 
66 }
67 
68 #ifdef H_PACK_8
69 #pragma pack(pop)
70 #endif
Definition: HIOManager.h:1421
virtual void * GetKernelEntity(HC_KEY key)
struct vhash_s * mhash_Hoops2Kernel
A hash map between HOOPS Keys and kernel entities.
Definition: HIOManager.h:214
Definition: HIOManager.h:148
virtual HC_KEY GetHoopsEntity(void *pKernelEntity)
Definition: MrDwgConnector.h:26
#define HC_KEY
virtual void AddConnection(HC_KEY key, void *pKernelEntity)
Definition: hio_dwg.h:31
virtual bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList)
AcDbDatabase * m_pAcDbDatabase
Autocad Database pointer associated with the DWG file.
Definition: MrDwgConnector.h:51
A header file containing the HIO classes for passing to HBaseView::FileInput and HBaseView::FileOutpu...
struct vhash_s * mhash_Kernel2Hoops
A hash map between kernel entities and HOOPS Keys.
Definition: HIOManager.h:217
virtual bool GetHoopsEntities(void *pKernelEntity, vlist_s *ret_HoopsKeysList)
void SetDatabase(AcDbDatabase *pAcDbDatabase)
Definition: MrDwgConnector.h:36