Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ImpexObject.h

Go to the documentation of this file.
00001 #ifndef ImpexObjectH
00002 #define ImpexObjectH
00003 
00004 /*******************************************************************************
00005 Copyright 2002 Petr Kulhanek
00006 
00007     This file is part of Core plugin.
00008 
00009     Core plugin is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     Core plugin is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with Core plugin; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 *******************************************************************************/
00023 /*******************************************************************************
00024 ** PROJECT:             Project NEMESIS
00025 ** FILE:                ImpexObject
00026 ** FUNCTION:            base class form all import/export objects
00027 ** VERSION:             1.0
00028 ** LANGUAGE:            CBuilder C++
00029 ** TARGET COMPUTER:     IBM PC
00030 ** PROGRAMMER:          Petr Kulhánek
00031 ** HISTORY:
00032 VERSION DATE        NOTE
00033 1.0     2002-09-21
00034 *******************************************************************************/
00035 
00039 /* HEADER FILES ***************************************************************/
00040 
00041 #include "CoreMainHeader.h"
00042 #include "SimpleList.h"
00043 #include "ComObject.h"
00044 #include "UUIDClass.h"
00045 
00046 /* HEDER FILES END ************************************************************/
00047 
00048 extern NEMESIS_CORE_PACKAGE class CImpexObjectsList ImpexObjectsList;
00049 
00050 class CImpexObjectWrapper;
00051 class CPluginObjectDescription;
00052 
00053 //---------------------------------------------------------------------------
00054 
00056 
00059 class NEMESIS_CORE_PACKAGE CImpexObjectsList{
00060     public:
00061     bool __fastcall Init(void);
00062     bool __fastcall RemoveAll(void);
00063 
00064     public:
00065     CSimpleList<CImpexObjectWrapper>   ImpexObjects;
00066     };
00067 
00068 //---------------------------------------------------------------------------
00069 
00071 
00074 class NEMESIS_CORE_PACKAGE CImpexFormat{
00075     public:
00076                  __fastcall CImpexFormat(void);
00077     CSmallString __fastcall GetFullImpexFormatName(void);
00078 
00079     public:
00080     CSmallString Name;
00081     CSmallString Ext;
00082     int          FormatID;
00083     int          Position;
00084     bool         Hide;
00085     bool         Import;    // if false then it represents export functionality  
00086     };
00087 
00088 //---------------------------------------------------------------------------
00089 
00091 
00095 class NEMESIS_CORE_PACKAGE CImpexObjectWrapper{
00096     public:
00097         __fastcall CImpexObjectWrapper(const CUUID& uuid);
00098 
00099     bool __fastcall LoadObject(CPluginObjectDescription* p_pod);
00100 
00101     inline bool                __fastcall IsExportEnabled(void);
00102     inline bool                __fastcall IsImportEnabled(void);
00103     inline const CSmallString& __fastcall GetName(void);
00104 
00105 
00106     bool __fastcall Execute(int format_id=-1);
00107 
00108     public:
00109     CSimpleList<CImpexFormat>   SupportedFormats;
00110 
00111     private:
00112     CSmallString                Name;
00113     CUUID                       ImpexObjectUUID;
00114     bool                        ExportEnabled;
00115     bool                        ImportEnabled;
00116     };
00117 
00118 //---------------------------------------------------------------------------
00119 
00121 
00124 class NEMESIS_CORE_PACKAGE CImpexObject : public CComObject{
00125     public:
00126                  __fastcall CImpexObject(CComObject* owner,CPluginObjectInfo* objectinfo);
00127     virtual void __fastcall Execute(CImpexObjectWrapper* p_iow,CImpexFormat* p_form);
00128     };
00129 
00130 //---------------------------------------------------------------------------
00131 
00132 inline bool __fastcall CImpexObjectWrapper::IsExportEnabled(void)
00133 {
00134  return(ExportEnabled);
00135 }
00136 
00137 //---------------------------------------------------------------------------
00138 
00139 inline bool __fastcall CImpexObjectWrapper::IsImportEnabled(void)
00140 {
00141  return(ImportEnabled);
00142 }
00143 
00144 inline const CSmallString& __fastcall CImpexObjectWrapper::GetName(void)
00145 {
00146  return(Name);
00147 }
00148 
00149 //---------------------------------------------------------------------------
00150 #endif

Generated on Sun Feb 9 12:53:51 2003 for NemesisCore by doxygen1.3-rc2