00001 // 00002 // Copyright (c) 2005 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 00013 #ifndef _HIOUTILITYU3D_H 00014 #define _HIOUTILITYU3D_H 00015 00016 #ifdef H_PACK_8 00017 #pragma pack(push) 00018 #pragma pack(8) 00019 #endif 00020 00021 #include "HTools.h" 00022 #include "HIOManager.h" 00023 00024 #ifdef HIO_U3D 00025 #define HIO_API __declspec (dllexport) 00026 #else 00027 #define HIO_API 00028 #endif 00029 00041 class HIO_API HIOUtilityU3D: public HInputHandler, public HOutputHandler 00042 { 00043 00044 public: 00046 HIOUtilityU3D() { 00047 SetInputOps(HInputOpFileInputByKey); 00048 SetOutputOps(HOutputOpFileOutputByKey); 00049 }; 00050 00051 ~HIOUtilityU3D() {;}; 00052 00055 const char * GetOutputName() { return "HIOUtilityU3D"; } 00056 const char * GetInputName() { return "HIOUtilityU3D"; } 00057 00058 00060 void RegisterInputHandlerTypes() { 00061 // TODO: Import U3D 00062 HIORegisterInputType("U3D",this); 00063 HIORegisterInputType("u3d",this); 00064 }; 00065 00067 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00068 00070 const char * GetInputTypesString() 00071 {return "u3d";}; 00072 00079 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00080 00081 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00082 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00083 }; 00084 00085 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00086 H_UTF16 utf16; 00087 utf16.encodedText((utf16_char const*) FileName); 00088 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00089 }; 00090 00091 00093 void RegisterOutputHandlerTypes() { 00094 HIORegisterOutputType("U3D",this); 00095 HIORegisterOutputType("u3d",this); 00096 }; 00097 00099 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}; 00100 00102 const char * GetOutputTypesString() 00103 {return "u3d";}; 00104 00112 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00113 00114 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00115 H_UTF16 utf16; 00116 utf16.encodedText((utf16_char const*) filename); 00117 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00118 } 00119 00120 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00121 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00122 } 00123 00124 }; 00125 00126 #ifdef HIO_U3D 00127 extern "C" { 00128 HIO_API void * CreateInput(HIOManager *manager); 00129 HIO_API void * CreateOutput(HIOManager *manager); 00130 HIO_API void * CreateConnector(void * unused); 00131 HIO_API void Free(HIOUtilityU3D *); 00132 HIO_API void FreeConnector(HIOConnector *connector); 00133 } 00134 #endif 00135 00136 00137 00138 #ifdef H_PACK_8 00139 #pragma pack(pop) 00140 #endif 00141 00142 #endif