Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ImportInterfaceC.h

00001 //-------------------------------------------------------------------------
00002 //
00003 // File:        ImportInterfaceC.h
00004 // Desc:        Import interface class.
00005 // Author:      memon <memon@inside.org>
00006 //
00007 //-------------------------------------------------------------------------
00008 //  Copyright (c) 2000-2002 Moppi Productions. All Rights Reserved.
00009 //  This file is part of Moppi Demopaja SDK. For conditions of 
00010 //  distribution and use, see the accompanying license.txt file.
00011 //  http://moppi.inside.org/demopaja/
00012 //-------------------------------------------------------------------------
00013 
00014 #ifndef __DEMOPAJA_IMPORTINTERFACEC_H__
00015 #define __DEMOPAJA_IMPORTINTERFACEC_H__
00016 
00017 namespace Import {
00018     class ImportInterfaceC;
00019 };
00020 
00021 #include "FactoryC.h"
00022 #include "ImportableI.h"
00023 #include "ClassIdC.h"
00024 #include "FileListC.h"
00025 #include "FileHandleC.h"
00026 #include "TimeContextC.h"
00027 #include "DeviceContextC.h"
00028 #include "CommonDialogI.h"
00029 #include <string>
00030 #include <vector>
00031 #include <map>
00032 
00033 namespace Import {
00034 
00036 
00043     class ImportInterfaceC
00044     {
00045     public:
00047         ImportInterfaceC( PajaSystem::DeviceContextC* pContext, PajaSystem::TimeContextC* pTimeContext, FileListC* pFileList, PluginClass::FactoryC* pFactory );
00049         virtual ~ImportInterfaceC();
00050 
00052 
00067         virtual FileHandleC*    request_import( const char* szName, const PluginClass::SuperClassIdC& rSuperFilter,
00068                                                 const PluginClass::ClassIdC& rClassFilter );
00069 
00071         virtual void            initialize_importable( Import::ImportableI* pImp, PajaTypes::uint32 ui32Reason );
00072 
00074         virtual FileListC*      get_filelist();
00075 
00077 
00080         virtual void            set_project_path( const char* szDir );
00081 
00083         virtual const char*     get_project_path() const;
00084 
00086 
00089         virtual bool            is_relative_path( const char* szFileName );
00090 
00092 
00096         virtual const char*     get_relative_path( const char* szFileName );
00097 
00099 
00102         virtual const char*     get_absolute_path( const char* szFileName );
00103 
00105         virtual void                        add_common_dialog( PajaSystem::CommonDialogI* pDlg );
00107         virtual PajaSystem::CommonDialogI*  get_common_dialog( const PluginClass::ClassIdC& rClassID );
00108 
00110         virtual void                        set_parent_folder( Import::FileHandleC* pFolder );
00112         virtual PajaTypes::uint32           begin_session();
00114         virtual void                        end_session( PajaTypes::uint32 ui32SessionID );
00115 
00116     private:
00117 
00118         typedef std::map<std::string, PluginClass::ClassDescC*> DefaultImpMapT;
00119 
00120         struct ImportSessionS {
00121             DefaultImpMapT              m_rDefaultImp;
00122             PajaTypes::uint32           m_ui32SessionID;
00123             Import::FileHandleC*        m_pFolder;
00124         };
00125 
00126         PluginClass::FactoryC*      m_pFactory;
00127         FileListC*                  m_pFileList;
00128         PajaSystem::DeviceContextC* m_pDevContext;
00129         PajaSystem::TimeContextC*   m_pTimeContext;
00130         std::string                 m_sProjectPath;
00131         std::vector<PajaSystem::CommonDialogI*> m_rCommonDialogs;
00132         std::vector<ImportSessionS> m_rSessions;
00133         PajaTypes::uint32           m_ui32SessionID;
00134     };
00135 
00136 };
00137 
00138 #endif // __DEMOPAJA_IMPORTINTERFACEC_H__

Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions