HIOUtilityHOOPS.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 #ifndef _HIOUTILITYHOOPS_H
11 #define _HIOUTILITYHOOPS_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 #include "HTools.h"
19 #include "HIOManager.h"
20 #include "HDB.h"
21 
22 
23 
29 class MVO_API HIOUtilityHMF: public HInputHandler, public HOutputHandler
30 {
31 public:
36  };
37 
38  ~HIOUtilityHMF() {;};
39 
40 
43  const char * GetOutputName() { return "HIOUtilityHMF"; }
44  const char * GetInputName() { return "HIOUtilityHMF"; }
45 
46 
47 
50  HIORegisterInputType("hmf",this);
51  HIORegisterInputType("gz",this);
52  };
55 
57  const char * GetInputTypesString() {return "hmf;gz";};
58 
66  HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
67 
68  HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){
69  return FileInputByKey(H_WCS(FileName).encodedText(), key, options);
70  };
71 
72  HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){
73  H_UTF16 utf16;
74  utf16.encodedText((utf16_char const*) FileName);
75  return FileInputByKey(H_WCS(utf16).encodedText(), key, options);
76  };
77 
80  HIORegisterOutputType("hmf",this);
81  };
82 
84  const char * GetOutputTypesString() {return "hmf";};
85 
87  HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;};
88 
96  HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
97 
98  HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
99  H_UTF16 utf16;
100  utf16.encodedText((utf16_char const*) filename);
101  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
102  }
103 
104  HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
105  return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
106  }
107 
108 };
109 
110 
115 {
116 public:
120  };
121 
122  ~HIOUtilityPostscript() {;};
123 
126  const char * GetOutputName() { return "HIOUtilityPostscript"; }
127  const char * GetInputName() { return "HIOUtilityPostscript"; }
128 
131  HC_Begin_Segment_Search("/driver/postscript");{
132  char seg[100];
133  while(HC_Find_Segment(seg)){
134  if(strieq(seg, "/driver/postscript")){
135  HIORegisterOutputType("ps",this);
136  HIORegisterOutputType("eps",this);
137  break;
138  }
139  }
141  };
142 
144  const char * GetOutputTypesString() {return "ps";};
145 
148 
150  const char * GetOutputDefaultHSRA() {return "painters";};
151 
159  HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
160 
161  HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
162  H_UTF16 utf16;
163  utf16.encodedText((utf16_char const*) filename);
164  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
165  }
166 
167  HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
168  return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
169  }
170 };
171 
172 
176 class MVO_API HIOUtilityHPGL2: public HOutputHandler
177 {
178 public:
182  };
183 
184  ~HIOUtilityHPGL2() {;};
185 
188  const char * GetOutputName() { return "HIOUtilityHPGL2"; }
189 
192  HC_Begin_Segment_Search("/driver/hpgl2");{
193  char seg[100];
194  while(HC_Find_Segment(seg)){
195  if(strieq(seg, "/driver/hpgl2")){
196  HIORegisterOutputType("hp",this);
197  break;
198  }
199  }
201  };
202 
204  const char * GetOutputTypesString() {return "hp";};
205 
208 
210  const char * GetOutputDefaultHSRA() {return "painters";};
211 
219  HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
220 
221  HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
222  H_UTF16 utf16;
223  utf16.encodedText((utf16_char const*) filename);
224  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
225  }
226 
227  HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
228  return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
229  }
230 };
231 
235 class MVO_API HIOUtilityCGM: public HOutputHandler
236 {
237 public:
241  };
242 
243  ~HIOUtilityCGM() {;};
244 
247  const char * GetOutputName() { return "HIOUtilityCGM"; }
248 
249 
252  HC_Begin_Segment_Search("/driver/cgm3");{
253  char seg[100];
254  while(HC_Find_Segment(seg)){
255  if(strieq(seg, "/driver/cgm3")){
256  HIORegisterOutputType("cgm",this);
257  break;
258  }
259  }
261  };
262 
264  const char * GetOutputTypesString() {return "cgm";};
265 
268 
270  const char * GetOutputDefaultHSRA() {return "painters";};
271 
279  HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
280 
281  HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
282  H_UTF16 utf16;
283  utf16.encodedText((utf16_char const*) filename);
284  return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
285  }
286 
287  HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
288  return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
289  }
290 };
291 
292 #ifdef H_PACK_8
293 #pragma pack(pop)
294 #endif
295 
296 #endif
Definition: HIOUtilityHOOPS.h:29
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityHOOPS.h:267
virtual HFileOutputResult FileOutputByKey(const char *filename, HC_KEY key, HOutputHandlerOptions *options)
const char * GetOutputName()
Definition: HIOUtilityHOOPS.h:188
const char * GetOutputName()
Definition: HIOUtilityHOOPS.h:43
const char * GetOutputTypesString()
Definition: HIOUtilityHOOPS.h:264
const char * GetInputTypesString()
Definition: HIOUtilityHOOPS.h:57
const char * GetOutputDefaultHSRA()
Definition: HIOUtilityHOOPS.h:270
HIOUtilityPostscript()
Definition: HIOUtilityHOOPS.h:118
Specifies an HInputHandler for model data.
Definition: HIOManager.h:226
#define HOutputOpFileOutputByKey
This HOutputHandler supports output from a segment key.
Definition: HIOManager.h:73
const char * GetInputName()
Definition: HIOUtilityHOOPS.h:44
void RegisterOutputHandlerTypes()
Definition: HIOUtilityHOOPS.h:130
const char * GetOutputName()
Definition: HIOUtilityHOOPS.h:126
virtual HFileInputResult FileInputByKey(const char *filename, HC_KEY key, HInputHandlerOptions *options)
HInputHandler an abstract base class for model and image input.
Definition: HIOManager.h:671
HOutputHandlerStyle
Definition: HIOManager.h:862
const char * GetOutputDefaultHSRA()
Definition: HIOUtilityHOOPS.h:210
Specifies an HOutputHandler for an image.
Definition: HIOManager.h:866
void RegisterInputHandlerTypes()
Definition: HIOUtilityHOOPS.h:49
bool HC_Find_Segment(char *segment)
HOutputHandler an abstract base class for model and image output.
Definition: HIOManager.h:1269
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityHOOPS.h:207
const char * GetOutputTypesString()
Definition: HIOUtilityHOOPS.h:204
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityHOOPS.h:87
#define HIORegisterInputType(type, input_object)
Definition: HIOManager.h:85
HIOUtilityCGM()
Definition: HIOUtilityHOOPS.h:239
const char * GetOutputTypesString()
Definition: HIOUtilityHOOPS.h:84
const char * GetOutputName()
Definition: HIOUtilityHOOPS.h:247
#define HIORegisterOutputType(type, output_object)
HIORegisterOutputType(type,output_object) Used by a HOutputHandler to set extension types that it han...
Definition: HIOManager.h:90
Definition: HIOUtilityHOOPS.h:114
HInputHandlerStyle
Definition: HIOManager.h:225
Definition: HIOManager.h:908
void RegisterOutputHandlerTypes()
Definition: HIOUtilityHOOPS.h:79
Definition: HIOUtilityHOOPS.h:235
const char * GetOutputTypesString()
Definition: HIOUtilityHOOPS.h:144
const char * GetOutputDefaultHSRA()
Definition: HIOUtilityHOOPS.h:150
HOutputHandlerStyle GetOutputStyle()
Definition: HIOUtilityHOOPS.h:147
#define HInputOpFileInputByKey
This HInputHandler supports input to a segment key.
Definition: HIOManager.h:58
Definition: HIOManager.h:246
void SetInputOps(unsigned long ops)
This sets the HInputOp.
Definition: HIOManager.h:841
void HC_End_Segment_Search(void)
void SetOutputOps(unsigned long ops)
This sets the HOutputOp.
Definition: HIOManager.h:1434
void RegisterOutputHandlerTypes()
Definition: HIOUtilityHOOPS.h:251
A header file containing the HIO classes for passing to HBaseView::FileInput and HBaseView::FileOutpu...
HIOUtilityHMF()
Definition: HIOUtilityHOOPS.h:33
HIOUtilityHPGL2()
Definition: HIOUtilityHOOPS.h:180
void RegisterOutputHandlerTypes()
Definition: HIOUtilityHOOPS.h:191
HInputHandlerStyle GetInputStyle()
Definition: HIOUtilityHOOPS.h:54
void HC_Begin_Segment_Search(char const *segspec)
Definition: HIOUtilityHOOPS.h:176