Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

MrDwgConnector.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #pragma once
00011 
00012 #include <vector>
00013 #include "HIOManager.h"
00014 
00015 #ifdef HIO_DWG
00016 #define HIO_API __declspec (dllexport)
00017 #else
00018 #define HIO_API
00019 #endif
00020 
00021 class AcDbDatabase;
00022 class hio_dwg;
00023 
00026 class HIO_API HIOConnectorDWG : public HIOConnector
00027 {
00028 public:
00030     HIOConnectorDWG();
00031     ~HIOConnectorDWG();
00032 
00036     void SetDatabase(AcDbDatabase * pAcDbDatabase)
00037     {   
00038         // database needs to be alive for DWG pointers to be valid
00039         m_pAcDbDatabase = pAcDbDatabase;                  
00040     }
00041 
00042     // functions inherited from HIOConnector
00043     HC_KEY GetHoopsEntity(void * pKernelEntity, HC_KEY modelKey = INVALID_KEY);
00044     void * GetKernelEntity(HC_KEY key, HC_KEY modelKey = INVALID_KEY);
00045     bool GetHoopsEntities(void * pKernelEntity, vlist_s *ret_HoopsKeysList, HC_KEY modelKey = INVALID_KEY);
00046     bool GetKernelEntities(HC_KEY key, vlist_s *ret_KernelEntitiesList, HC_KEY modelKey = INVALID_KEY);
00047     void AddConnection(HC_KEY key, void* pKernelEntity, HC_KEY modelKey = INVALID_KEY);
00048 
00049 protected:
00051     AcDbDatabase * m_pAcDbDatabase;
00052 
00053 private:
00054     void RegenerateHash(HC_KEY modelKey);
00055     struct vhash_s *mhash_Hoops2Kernel;
00056     struct vhash_s *mhash_Kernel2Hoops;
00057 };
00058 
00059 extern "C" {
00060     HIO_API void * CreateInput(HIOManager *manager);
00061     HIO_API void * CreateOutput(HIOManager *manager);
00062     HIO_API void * CreateConnector(void * unused);
00063     HIO_API void Free(hio_dwg *);
00064     HIO_API void FreeConnector(HIOConnectorDWG *connector);
00065     
00066 }
00067 
00068 #ifdef H_PACK_8
00069 #pragma pack(pop)
00070 #endif