Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HIOUtilitySKP.h
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 
00014 #ifndef _HIO_UTILITY_SKP_2__02052008_1230_
00015 #define _HIO_UTILITY_SKP_2__02052008_1230_
00016 
00017 #ifdef H_PACK_8
00018 #pragma pack(push)
00019 #pragma pack(8)
00020 #endif
00021 
00022 //#import "SketchUp.tlb" rename_namespace("SketchUp"), no_auto_exclude, rename("LoadImage", "Load_Image")
00023 
00024 #include "HSKPHelper.h"
00025 
00026 #include "HTools.h"
00027 #include "HIOManager.h"
00028 
00029 #ifdef HIO_SKP
00030 #define HIO_API __declspec (dllexport)
00031 #else
00032 #define HIO_API
00033 #endif
00034 
00038 class HIO_API HIOUtilitySKP : public HInputHandler
00039 {
00040 
00041 private:
00042 
00043      HMODULE m_rHModule;
00044      HSKPImporter* m_bImporter;
00045 
00046 public:
00047 
00048     CComPtr<ISkpApplication> m_pApp;
00050     HIOUtilitySKP() 
00051     { 
00052         m_pApp = 0;
00053         SetInputOps(HInputOpFileInputByKey);
00054     };
00055 
00056     ~HIOUtilitySKP() 
00057     {
00058         
00059     };
00060 
00063     const char * GetOutputName() { return "HIOUtilitySKP"; }
00064     const char * GetInputName() { return "HIOUtilitySKP"; }
00065 
00067     void RegisterInputHandlerTypes() {
00068         HIORegisterInputType("SKP",this);  // SKP (Google SketchUp's Format)
00069         HIORegisterInputType("skp",this);  // skp (Google SketchUp's Format)
00070     };
00071 
00073     HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;};
00074 
00076     const char * GetInputTypesString() {return "skp";};
00077 
00084     HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options);
00085 
00086     HFileInputResult FileInputByKey(const wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
00087 
00094     HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options);
00095 
00099     bool InitSKP();
00100 
00102     void ShutdownSKP();
00103 };
00104 
00105 #ifdef HIO_SKP
00106 extern "C" {
00107     HIO_API void * CreateInput(HIOManager *manager);
00108     HIO_API void * CreateOutput(HIOManager *manager);
00109     HIO_API void * CreateConnector(void *unused);
00110     HIO_API void Free(HIOUtilitySKP *);
00111     HIO_API void FreeConnector(HIOConnector *connector);
00112 }
00113 #endif
00114 
00115 
00116 
00117 #ifdef H_PACK_8
00118 #pragma pack(pop)
00119 #endif
00120 
00121 #endif  //_HIO_UTILITY_SKP_2__02052008_1230_
00122 
00123 
00124 
00125 
00126 
00127