Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HIOUtilityHOOPS.h
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$
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     };
00059     HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;};
00060 
00062     const char * GetInputTypesString() {return "hmf";};
00063 
00071     HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
00072 
00073     HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){
00074         return FileInputByKey(H_WCS(FileName).encodedText(), key, options);
00075     };
00076 
00077     HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){
00078         H_UTF16 utf16;
00079         utf16.encodedText((utf16_char const*) FileName);
00080         return FileInputByKey(H_WCS(utf16).encodedText(), key, options);
00081     };
00082 
00084     void RegisterOutputHandlerTypes() {
00085         HIORegisterOutputType("hmf",this);
00086     };
00087 
00089     const char * GetOutputTypesString() {return "hmf";};
00090 
00092     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;};
00093 
00101     HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
00102 
00103     HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
00104         H_UTF16 utf16;
00105         utf16.encodedText((utf16_char const*) filename);
00106         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00107     }
00108 
00109     HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
00110         return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
00111     }
00112 
00113 };
00114 
00115 
00119 class MVO_API HIOUtilityPostscript: public HOutputHandler
00120 {
00121 public:
00123     HIOUtilityPostscript() { 
00124         SetOutputOps(HOutputOpFileOutputByKey);
00125     };
00126 
00127     ~HIOUtilityPostscript() {;};
00128 
00131     const char * GetOutputName() { return "HIOUtilityPostscript"; }
00132     const char * GetInputName() { return "HIOUtilityPostscript"; }
00133 
00135     void RegisterOutputHandlerTypes() {
00136         HC_Begin_Segment_Search("/driver/postscript");{
00137             char seg[100];
00138             while(HC_Find_Segment(seg)){
00139                 if(strieq(seg, "/driver/postscript")){
00140                     HIORegisterOutputType("ps",this);
00141                     break;
00142                 }
00143             }
00144         }HC_End_Segment_Search();
00145     };
00146 
00148     const char * GetOutputTypesString() {return "ps";};
00149 
00151     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;};
00152 
00154     const char * GetOutputDefaultHSRA() {return "painters";};
00155 
00163     HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
00164 
00165     HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
00166         H_UTF16 utf16;
00167         utf16.encodedText((utf16_char const*) filename);
00168         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00169     }
00170 
00171     HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
00172         return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
00173     }
00174 };
00175 
00176 
00180 class MVO_API HIOUtilityHPGL2: public HOutputHandler
00181 {
00182 public:
00184     HIOUtilityHPGL2() { 
00185         SetOutputOps(HOutputOpFileOutputByKey);
00186     };
00187 
00188     ~HIOUtilityHPGL2() {;};
00189 
00192     const char * GetOutputName() { return "HIOUtilityHPGL2"; }
00193 
00195     void RegisterOutputHandlerTypes() {
00196         HC_Begin_Segment_Search("/driver/hpgl2");{
00197             char seg[100];
00198             while(HC_Find_Segment(seg)){
00199                 if(strieq(seg, "/driver/hpgl2")){
00200                     HIORegisterOutputType("hp",this);
00201                     break;
00202                 }
00203             }
00204         }HC_End_Segment_Search();
00205     };
00206 
00208     const char * GetOutputTypesString() {return "hp";};
00209 
00211     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;};
00212 
00214     const char * GetOutputDefaultHSRA() {return "painters";};
00215 
00223     HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
00224 
00225     HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
00226         H_UTF16 utf16;
00227         utf16.encodedText((utf16_char const*) filename);
00228         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00229     }
00230 
00231     HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
00232         return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
00233     }
00234 };
00235 
00239 class MVO_API HIOUtilityCGM: public HOutputHandler
00240 {
00241 public:
00243     HIOUtilityCGM() { 
00244         SetOutputOps(HOutputOpFileOutputByKey);
00245     };
00246 
00247     ~HIOUtilityCGM() {;};
00248 
00251     const char * GetOutputName() { return "HIOUtilityCGM"; }
00252 
00253 
00255     void RegisterOutputHandlerTypes() {
00256         HC_Begin_Segment_Search("/driver/cgm3");{
00257             char seg[100];
00258             while(HC_Find_Segment(seg)){
00259                 if(strieq(seg, "/driver/cgm3")){
00260                     HIORegisterOutputType("cgm",this);
00261                     break;
00262                 }
00263             }
00264         }HC_End_Segment_Search();
00265     };
00266 
00268     const char * GetOutputTypesString() {return "cgm";};
00269 
00271     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleHardcopy;};
00272 
00274     const char * GetOutputDefaultHSRA() {return "painters";};
00275 
00283     HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
00284 
00285     HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
00286         H_UTF16 utf16;
00287         utf16.encodedText((utf16_char const*) filename);
00288         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00289     }
00290 
00291     HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
00292         return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
00293     }
00294 };
00295 
00296 #ifdef H_PACK_8
00297 #pragma pack(pop)
00298 #endif
00299 
00300 #endif