00001 // 00002 // Copyright (c) 2000 by Tech Soft 3D, LLC. 00003 // The information contained herein is confidential and proprietary to 00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 // civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 // and criminal remedies in the event of unauthorized use or misappropriation 00007 // of its trade secrets. Use of this information by anyone other than 00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 // written non-disclosure agreement, expressly prescribing the scope and 00010 // manner of such use. 00011 // 00012 // $Id: ae522ae4e4908b1ad2e17ca421e8d89784c5e6f3 $ 00013 // 00014 00015 00016 #ifndef _HIOUTILITYHOOPS_H 00017 #define _HIOUTILITYHOOPS_H 00018 00019 #ifdef H_PACK_8 00020 #pragma pack(push) 00021 #pragma pack(8) 00022 #endif 00023 00024 #include "HTools.h" 00025 #include "HIOManager.h" 00026 #include "HDB.h" 00027 00028 00029 00035 class MVO_API HIOUtilityHMF: public HInputHandler, public HOutputHandler 00036 { 00037 public: 00039 HIOUtilityHMF() { 00040 SetInputOps(HInputOpFileInputByKey); 00041 SetOutputOps(HOutputOpFileOutputByKey); 00042 }; 00043 00044 ~HIOUtilityHMF() {;}; 00045 00046 00049 const char * GetOutputName() { return "HIOUtilityHMF"; } 00050 const char * GetInputName() { return "HIOUtilityHMF"; } 00051 00052 00053 00055 void RegisterInputHandlerTypes() { 00056 HIORegisterInputType("hmf",this); 00057 HIORegisterInputType("gz",this); 00058 }; 00060 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00061 00063 const char * GetInputTypesString() {return "hmf;gz";}; 00064 00072 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00073 00074 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00075 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00076 }; 00077 00078 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00079 H_UTF16 utf16; 00080 utf16.encodedText((utf16_char const*) FileName); 00081 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00082 }; 00083 00085 void RegisterOutputHandlerTypes() { 00086 HIORegisterOutputType("hmf",this); 00087 }; 00088 00090 const char * GetOutputTypesString() {return "hmf";}; 00091 00093 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}; 00094 00102 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00103 00104 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00105 H_UTF16 utf16; 00106 utf16.encodedText((utf16_char const*) filename); 00107 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00108 } 00109 00110 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00111 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00112 } 00113 00114 }; 00115 00116 00120 class MVO_API HIOUtilityPostscript: public HOutputHandler 00121 { 00122 public: 00124 HIOUtilityPostscript() { 00125 SetOutputOps(HOutputOpFileOutputByKey); 00126 }; 00127 00128 ~HIOUtilityPostscript() {;}; 00129 00132 const char * GetOutputName() { return "HIOUtilityPostscript"; } 00133 const char * GetInputName() { return "HIOUtilityPostscript"; } 00134 00136 void RegisterOutputHandlerTypes() { 00137 HC_Begin_Segment_Search("/driver/postscript");{ 00138 char seg[100]; 00139 while(HC_Find_Segment(seg)){ 00140 if(strieq(seg, "/driver/postscript")){ 00141 HIORegisterOutputType("ps",this); 00142 HIORegisterOutputType("eps",this); 00143 break; 00144 } 00145 } 00146 }HC_End_Segment_Search(); 00147 }; 00148 00150 const char * GetOutputTypesString() {return "ps";}; 00151 00153 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00154 00156 const char * GetOutputDefaultHSRA() {return "painters";}; 00157 00165 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00166 00167 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00168 H_UTF16 utf16; 00169 utf16.encodedText((utf16_char const*) filename); 00170 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00171 } 00172 00173 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00174 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00175 } 00176 }; 00177 00178 00182 class MVO_API HIOUtilityHPGL2: public HOutputHandler 00183 { 00184 public: 00186 HIOUtilityHPGL2() { 00187 SetOutputOps(HOutputOpFileOutputByKey); 00188 }; 00189 00190 ~HIOUtilityHPGL2() {;}; 00191 00194 const char * GetOutputName() { return "HIOUtilityHPGL2"; } 00195 00197 void RegisterOutputHandlerTypes() { 00198 HC_Begin_Segment_Search("/driver/hpgl2");{ 00199 char seg[100]; 00200 while(HC_Find_Segment(seg)){ 00201 if(strieq(seg, "/driver/hpgl2")){ 00202 HIORegisterOutputType("hp",this); 00203 break; 00204 } 00205 } 00206 }HC_End_Segment_Search(); 00207 }; 00208 00210 const char * GetOutputTypesString() {return "hp";}; 00211 00213 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00214 00216 const char * GetOutputDefaultHSRA() {return "painters";}; 00217 00225 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00226 00227 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00228 H_UTF16 utf16; 00229 utf16.encodedText((utf16_char const*) filename); 00230 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00231 } 00232 00233 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00234 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00235 } 00236 }; 00237 00241 class MVO_API HIOUtilityCGM: public HOutputHandler 00242 { 00243 public: 00245 HIOUtilityCGM() { 00246 SetOutputOps(HOutputOpFileOutputByKey); 00247 }; 00248 00249 ~HIOUtilityCGM() {;}; 00250 00253 const char * GetOutputName() { return "HIOUtilityCGM"; } 00254 00255 00257 void RegisterOutputHandlerTypes() { 00258 HC_Begin_Segment_Search("/driver/cgm3");{ 00259 char seg[100]; 00260 while(HC_Find_Segment(seg)){ 00261 if(strieq(seg, "/driver/cgm3")){ 00262 HIORegisterOutputType("cgm",this); 00263 break; 00264 } 00265 } 00266 }HC_End_Segment_Search(); 00267 }; 00268 00270 const char * GetOutputTypesString() {return "cgm";}; 00271 00273 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;}; 00274 00276 const char * GetOutputDefaultHSRA() {return "painters";}; 00277 00285 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00286 00287 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00288 H_UTF16 utf16; 00289 utf16.encodedText((utf16_char const*) filename); 00290 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00291 } 00292 00293 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00294 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00295 } 00296 }; 00297 00298 #ifdef H_PACK_8 00299 #pragma pack(pop) 00300 #endif 00301 00302 #endif