Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HIOUtilityDWG.h
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: 574fd56099744b5aa190aeb35d2140cee4ab9480 $
13 //
14 #ifndef _HIO_UTILITY_DWG_H
15 #define _HIO_UTILITY_DWG_H
16 
17 #ifdef H_PACK_8
18 #pragma pack(push)
19 #pragma pack(8)
20 #endif
21 
22 #include "HTools.h"
23 #include "HIOManager.h"
24 
25 #ifdef HIO_DWG
26 #define HIO_API __declspec (dllexport)
27 #else
28 #define HIO_API
29 #endif
30 
31 
33 {
34 public:
35  DWGException(const char* msg);
36  ~DWGException();
37  char* what()
38  {
39  return m_message;
40  }
41 private:
42  char* m_message;
43 };
44 
45 
50 class HIO_API HIOUtilityDWG: public HInputHandler
51 {
52 
53 public:
54 
58  };
59  virtual ~HIOUtilityDWG() {;};
60 
63  HIORegisterInputType("dwg",this);
64  HIORegisterInputType("dxf",this);
65  };
68  const char * GetOutputName() { return "HIOUtilityDWG"; }
69  const char * GetInputName() { return "HIOUtilityDWG"; }
70 
72  const char * GetInputTypesString() {return "dwg;dxf";};
73 
76 
84  HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options);
85 
86  HFileInputResult FileInputByKey(const wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
87 
95  HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options);
96 
104  HFileInputResult DatabaseInputByKey(AcDbDatabase* pAcDbDatabase,
105  HC_KEY key, HInputHandlerOptions * options);
106 
110  static bool InitRealDWG();
111 
115  static bool ShutDownRealDWG();
116 
117 };
118 
119 
120 class AcDbDatabase;
121 
124 class HIO_API HIOConnectorDWG : public HIOConnector
125 {
126 
127 public:
129  HIOConnectorDWG() : m_pAcDbDatabase(0) {;};
130  ~HIOConnectorDWG();
131 
135  void SetDatabase(AcDbDatabase * pAcDbDatabase)
136  {
137  // database needs to me alive for DWG pointers to be valid
138  m_pAcDbDatabase = pAcDbDatabase;
139  }
140 
141 protected:
142 
144  AcDbDatabase * m_pAcDbDatabase;
145 };
146 
147 
148 #ifdef HIO_DWG
149 extern "C" {
150  HIO_API void * CreateInput(HIOManager *manager);
151  HIO_API void * CreateOutput(HIOManager *manager);
152  HIO_API void * CreateConnector(void * unused);
153  HIO_API void Free(HIOUtilityDWG *);
154  HIO_API void FreeConnector(HIOConnectorDWG *connector);
155 }
156 #endif
157 
158 
159 
160 #ifdef H_PACK_8
161 #pragma pack(pop)
162 #endif
163 
164 #endif
165 
166 
167 
168 
169 
170 
HInputHandlerStyle GetInputStyle()
Definition: HIOUtilityDWG.h:75
Specifies an HInputHandler for model data.
Definition: HIOManager.h:227
Definition: HIOUtilityDWG.h:50
const char * GetOutputName()
Definition: HIOUtilityDWG.h:68
virtual HFileInputResult FileInputByKey(const char *filename, HC_KEY key, HInputHandlerOptions *options)
Definition: HIOManager.h:149
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:667
HIOConnectorDWG()
Definition: HIOUtilityDWG.h:129
Definition: HIOUtilityDWG.h:124
#define HIORegisterInputType(type, input_object)
Definition: HIOManager.h:87
void RegisterInputHandlerTypes()
Definition: HIOUtilityDWG.h:62
HInputHandlerStyle
Definition: HIOManager.h:226
HIOUtilityDWG()
Definition: HIOUtilityDWG.h:56
#define HInputOpFileInputByKey
This HInputHandler supports input to a segment key.
Definition: HIOManager.h:60
Definition: HIOUtilityDWG.h:32
Definition: HIOManager.h:247
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:836
const char * GetInputName()
Definition: HIOUtilityDWG.h:69
AcDbDatabase * m_pAcDbDatabase
Autocad Database pointer associated with the DWG file.
Definition: HIOUtilityDWG.h:144
A header file containing the HIO classes for passing to HBaseView::FileInput and HBaseView::FileOutpu...
const char * GetInputTypesString()
Definition: HIOUtilityDWG.h:72
void SetDatabase(AcDbDatabase *pAcDbDatabase)
Definition: HIOUtilityDWG.h:135