Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HIOUtilityU3D.h
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 _HIOUTILITYU3D_H
00011 #define _HIOUTILITYU3D_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 
00021 #ifdef HIO_U3D
00022 #define HIO_API __declspec (dllexport)
00023 #else
00024 #define HIO_API
00025 #endif
00026 
00038 class HIO_API HIOUtilityU3D: public HInputHandler, public HOutputHandler
00039 {
00040 
00041 public:
00043     HIOUtilityU3D() { 
00044         SetInputOps(HInputOpFileInputByKey);
00045         SetOutputOps(HOutputOpFileOutputByKey);
00046     };
00047 
00048     ~HIOUtilityU3D() {;};
00049 
00052     const char * GetOutputName() { return "HIOUtilityU3D"; }
00053     const char * GetInputName() { return "HIOUtilityU3D"; }
00054 
00055 
00057     void RegisterInputHandlerTypes() {
00058         // TODO: Import U3D
00059         HIORegisterInputType("U3D",this);
00060         HIORegisterInputType("u3d",this);
00061     };
00062 
00064     HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;};
00065 
00067     const char * GetInputTypesString() 
00068     {return "u3d";};
00069 
00076     HFileInputResult FileInputByKey(const __wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
00077 
00078     HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options){
00079         return FileInputByKey(H_WCS(FileName).encodedText(), key, options);
00080     };
00081 
00082     HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options){
00083         H_UTF16 utf16;
00084         utf16.encodedText((utf16_char const*) FileName);
00085         return FileInputByKey(H_WCS(utf16).encodedText(), key, options);
00086     };
00087 
00088 
00090     void RegisterOutputHandlerTypes() {
00091         HIORegisterOutputType("U3D",this); 
00092         HIORegisterOutputType("u3d",this); 
00093     };
00094 
00096     HOutputHandlerStyle GetOutputStyle() {return HOutputHandlerStyleModel;};
00097 
00099     const char * GetOutputTypesString() 
00100     {return "u3d";};
00101 
00109     HFileOutputResult FileOutputByKey(const __wchar_t * filename, HC_KEY key, HOutputHandlerOptions * options);
00110 
00111     HFileOutputResult FileOutputByKey(const unsigned short * filename, HC_KEY key, HOutputHandlerOptions * options){
00112         H_UTF16 utf16;
00113         utf16.encodedText((utf16_char const*) filename);
00114         return FileOutputByKey(H_WCS(utf16).encodedText(), key, options);
00115     }
00116 
00117     HFileOutputResult FileOutputByKey(const char * filename, HC_KEY key, HOutputHandlerOptions * options){
00118         return FileOutputByKey(H_WCS(filename).encodedText(), key, options);
00119     }
00120 
00121 };
00122 
00123 #ifdef HIO_U3D
00124 extern "C" {
00125     HIO_API void * CreateInput(HIOManager *manager);
00126     HIO_API void * CreateOutput(HIOManager *manager);
00127     HIO_API void * CreateConnector(void * unused);
00128     HIO_API void Free(HIOUtilityU3D *); 
00129     HIO_API void FreeConnector(HIOConnector *connector);
00130 }
00131 #endif
00132 
00133 
00134 
00135 #ifdef H_PACK_8
00136 #pragma pack(pop)
00137 #endif
00138 
00139 #endif