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 _HIOUTILITYOBJ_H 00011 #define _HIOUTILITYOBJ_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 00060 class MVO_API HIOUtilityObj: public HInputHandler, public HOutputHandler 00061 { 00062 00063 public: 00064 00066 HIOUtilityObj() { 00067 SetInputOps(HInputOpFileInputByKey); 00068 }; 00069 virtual ~HIOUtilityObj() {;}; 00070 00073 const char * GetOutputName() { return "HIOUtilityObj"; } 00074 const char * GetInputName() { return "HIOUtilityObj"; } 00075 00076 00078 void RegisterInputHandlerTypes() { 00079 HIORegisterInputType("obj",this); 00080 } 00081 00083 const char * GetInputTypesString() {return "obj";}; 00084 00086 HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;}; 00087 00096 HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options); 00097 00098 HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){ 00099 return FileInputByKey(H_WCS(FileName).encodedText(), key, options); 00100 }; 00101 00102 HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){ 00103 H_UTF16 utf16; 00104 utf16.encodedText((utf16_char const*) FileName); 00105 return FileInputByKey(H_WCS(utf16).encodedText(), key, options); 00106 }; 00107 00109 void RegisterOutputHandlerTypes() { 00110 HIORegisterOutputType("OBJ",this); 00111 HIORegisterOutputType("obj",this); 00112 }; 00113 00115 HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;}; 00116 00118 const char * GetOutputTypesString() 00119 {return "obj";}; 00120 00128 HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options); 00129 00130 HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){ 00131 H_UTF16 utf16; 00132 utf16.encodedText((utf16_char const*) filename); 00133 return FileOutputByKey(H_WCS(utf16).encodedText(), key, options); 00134 } 00135 00136 HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){ 00137 return FileOutputByKey(H_WCS(filename).encodedText(), key, options); 00138 } 00139 }; 00140 00141 00142 #ifdef H_PACK_8 00143 #pragma pack(pop) 00144 #endif 00145 00146 #endif