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         SetInputOps(HInputOpFileInputByKey);
00053     };
00054 
00055     ~HIOUtilitySKP() 
00056     {
00057         
00058     };
00059 
00062     const char * GetOutputName() { return "HIOUtilitySKP"; }
00063     const char * GetInputName() { return "HIOUtilitySKP"; }
00064 
00066     void RegisterInputHandlerTypes() {
00067         HIORegisterInputType("SKP",this);  // SKP (Google SketchUp's Format)
00068         HIORegisterInputType("skp",this);  // skp (Google SketchUp's Format)
00069     };
00070 
00072     HInputHandlerStyle GetInputStyle() {return HInputHandlerStyleModel;};
00073 
00075     const char * GetInputTypesString() {return "skp";};
00076 
00083     HFileInputResult FileInputByKey(const char * FileName, HC_KEY key, HInputHandlerOptions * options);
00084 
00085     HFileInputResult FileInputByKey(const wchar_t * FileName, HC_KEY key, HInputHandlerOptions * options);
00086 
00093     HFileInputResult FileInputByKey(const unsigned short * FileName, HC_KEY key, HInputHandlerOptions * options);
00094 
00098     bool InitSKP();
00099 
00101     void ShutdownSKP();
00102 };
00103 
00104 #ifdef HIO_SKP
00105 extern "C" {
00106     HIO_API void * CreateInput(HIOManager *manager);
00107     HIO_API void * CreateOutput(HIOManager *manager);
00108     HIO_API void * CreateConnector(void *unused);
00109     HIO_API void Free(HIOUtilitySKP *);
00110     HIO_API void FreeConnector(HIOConnector *connector);
00111 }
00112 #endif
00113 
00114 
00115 
00116 #ifdef H_PACK_8
00117 #pragma pack(pop)
00118 #endif
00119 
00120 #endif  //_HIO_UTILITY_SKP_2__02052008_1230_
00121 
00122 
00123 
00124 
00125 
00126