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 #ifndef _HIOUTILITYHOOPS_H 00011 #define _HIOUTILITYHOOPS_H 00012 00013 #ifdef H_PACK_8 00014 #pragma pack(push) 00015 #pragma pack(8) 00016 #endif 00017 00018 #include "HTools.h" 00019 #include "HIOManager.h" 00020 #include "HDB.h" 00021 00022 00023 00029 class MVO_API HIOUtilityHMF: public HInputHandler, public HOutputHandler 00030 { 00031 public: 00033 HIOUtilityHMF() { 00034 SetInputOps(HInputOpFileInputByKey); 00035 SetOutputOps(HOutputOpFileOutputByKey); 00036 }; 00037 00038 ~HIOUtilityHMF() {;}; 00039 00040 00043 const char * GetOutputName() { return "HIOUtilityHMF"; } 00044 const char * GetInputName() { return "HIOUtilityHMF"; } 00045 00046 00047 00049 void RegisterInputHandlerTypes() { 00050 HIORegisterInputType("hmf",this); 00051 HIORegisterInputType("gz",this); 00052 }; 00054 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00055 00057 const char * GetInputTypesString() {return "hmf;gz";}; 00058 00066 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00067 00068 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00069 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00070 }; 00071 00072 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00073 H_UTF16 utf16; 00074 utf16.encodedText((utf16_char const*) FileName); 00075 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00076 }; 00077 00079 void RegisterOutputHandlerTypes() { 00080 HIORegisterOutputType("hmf",this); 00081 }; 00082 00084 const char * GetOutputTypesString() {return "hmf";}; 00085 00087 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}; 00088 00096 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00097 00098 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00099 H_UTF16 utf16; 00100 utf16.encodedText((utf16_char const*) filename); 00101 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00102 } 00103 00104 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00105 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00106 } 00107 00108 }; 00109 00110 00114 class MVO_API HIOUtilityPostscript: public HOutputHandler 00115 { 00116 public: 00118 HIOUtilityPostscript() { 00119 SetOutputOps(HOutputOpFileOutputByKey); 00120 }; 00121 00122 ~HIOUtilityPostscript() {;}; 00123 00126 const char * GetOutputName() { return "HIOUtilityPostscript"; } 00127 const char * GetInputName() { return "HIOUtilityPostscript"; } 00128 00130 void RegisterOutputHandlerTypes() { 00131 HC_Begin_Segment_Search("/driver/postscript");{ 00132 char seg[100]; 00133 while(HC_Find_Segment(seg)){ 00134 if(strieq(seg, "/driver/postscript")){ 00135 HIORegisterOutputType("ps",this); 00136 HIORegisterOutputType("eps",this); 00137 break; 00138 } 00139 } 00140 }HC_End_Segment_Search(); 00141 }; 00142 00144 const char * GetOutputTypesString() {return "ps";}; 00145 00147 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00148 00150 const char * GetOutputDefaultHSRA() {return "painters";}; 00151 00159 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00160 00161 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00162 H_UTF16 utf16; 00163 utf16.encodedText((utf16_char const*) filename); 00164 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00165 } 00166 00167 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00168 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00169 } 00170 }; 00171 00172 00176 class MVO_API HIOUtilityHPGL2: public HOutputHandler 00177 { 00178 public: 00180 HIOUtilityHPGL2() { 00181 SetOutputOps(HOutputOpFileOutputByKey); 00182 }; 00183 00184 ~HIOUtilityHPGL2() {;}; 00185 00188 const char * GetOutputName() { return "HIOUtilityHPGL2"; } 00189 00191 void RegisterOutputHandlerTypes() { 00192 HC_Begin_Segment_Search("/driver/hpgl2");{ 00193 char seg[100]; 00194 while(HC_Find_Segment(seg)){ 00195 if(strieq(seg, "/driver/hpgl2")){ 00196 HIORegisterOutputType("hp",this); 00197 break; 00198 } 00199 } 00200 }HC_End_Segment_Search(); 00201 }; 00202 00204 const char * GetOutputTypesString() {return "hp";}; 00205 00207 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00208 00210 const char * GetOutputDefaultHSRA() {return "painters";}; 00211 00219 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00220 00221 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00222 H_UTF16 utf16; 00223 utf16.encodedText((utf16_char const*) filename); 00224 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00225 } 00226 00227 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00228 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00229 } 00230 }; 00231 00235 class MVO_API HIOUtilityCGM: public HOutputHandler 00236 { 00237 public: 00239 HIOUtilityCGM() { 00240 SetOutputOps(HOutputOpFileOutputByKey); 00241 }; 00242 00243 ~HIOUtilityCGM() {;}; 00244 00247 const char * GetOutputName() { return "HIOUtilityCGM"; } 00248 00249 00251 void RegisterOutputHandlerTypes() { 00252 HC_Begin_Segment_Search("/driver/cgm3");{ 00253 char seg[100]; 00254 while(HC_Find_Segment(seg)){ 00255 if(strieq(seg, "/driver/cgm3")){ 00256 HIORegisterOutputType("cgm",this); 00257 break; 00258 } 00259 } 00260 }HC_End_Segment_Search(); 00261 }; 00262 00264 const char * GetOutputTypesString() {return "cgm";}; 00265 00267 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00268 00270 const char * GetOutputDefaultHSRA() {return "painters";}; 00271 00279 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00280 00281 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00282 H_UTF16 utf16; 00283 utf16.encodedText((utf16_char const*) filename); 00284 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00285 } 00286 00287 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00288 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00289 } 00290 }; 00291 00292 #ifdef H_PACK_8 00293 #pragma pack(pop) 00294 #endif 00295 00296 #endif