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: 638b056369813e650e5b4ffc1abcdeda47508cbf $ 00013 // 00014 00015 00016 #ifndef _HIOUTILITYOBJ_H 00017 #define _HIOUTILITYOBJ_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 00066 class MVO_API HIOUtilityObj: public HInputHandler, public HOutputHandler 00067 { 00068 00069 public: 00070 00072 HIOUtilityObj() { 00073 SetInputOps(HInputOpFileInputByKey); 00074 }; 00075 virtual ~HIOUtilityObj() {;}; 00076 00079 const char * GetOutputName() { return "HIOUtilityObj"; } 00080 const char * GetInputName() { return "HIOUtilityObj"; } 00081 00082 00084 void RegisterInputHandlerTypes() { 00085 HIORegisterInputType("obj",this); 00086 } 00087 00089 const char * GetInputTypesString() {return "obj";}; 00090 00092 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00093 00102 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00103 00104 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00105 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00106 }; 00107 00108 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00109 H_UTF16 utf16; 00110 utf16.encodedText((utf16_char const*) FileName); 00111 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00112 }; 00113 00115 void RegisterOutputHandlerTypes() { 00116 HIORegisterOutputType("OBJ",this); 00117 HIORegisterOutputType("obj",this); 00118 }; 00119 00121 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}; 00122 00124 const char * GetOutputTypesString() 00125 {return "obj";}; 00126 00134 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00135 00136 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00137 H_UTF16 utf16; 00138 utf16.encodedText((utf16_char const*) filename); 00139 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00140 } 00141 00142 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00143 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00144 } 00145 }; 00146 00147 00148 #ifdef H_PACK_8 00149 #pragma pack(pop) 00150 #endif 00151 00152 #endif