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

FileListC.h

00001 //-------------------------------------------------------------------------
00002 //
00003 // File:        FileListC.h
00004 // Desc:        File list 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_FILELISTC_H__
00015 #define __DEMOPAJA_FILELISTC_H__
00016 
00017 namespace Import {
00018     class FileListC;
00019 };
00020 
00021 #include "PajaTypes.h"
00022 #include "DataBlockI.h"
00023 #include "EditableI.h"
00024 #include "UndoC.h"
00025 #include <vector>
00026 #include "ImportableI.h"
00027 #include "FileHandleC.h"
00028 #include "FileIO.h"
00029 #include "ImportInterfaceC.h"
00030 #include "DeviceContextC.h"
00031 #include "TimeContextC.h"
00032 #include "ClassIdC.h"
00033 
00034 namespace Import {
00035 
00037 
00044     class FileListC : public Edit::EditableI
00045     {
00046     public:
00048         static FileListC*           create_new();
00050         virtual Edit::DataBlockI*   create();
00052         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
00054         virtual void                copy( Edit::EditableI* pEditable );
00056         virtual void                restore( Edit::EditableI* pEditable );
00057 
00059         virtual FileHandleC*        add_file( ImportableI* pImportable, FileHandleC* pFolder );
00060         virtual FileHandleC*        add_folder( const char* szName, FileHandleC* pFolder );
00062         virtual PajaTypes::uint32   get_file_count();
00063 
00065 
00071         virtual void                reload_file( PajaTypes::uint32 ui32Index, ImportInterfaceC* pIface );
00073 
00079         virtual void                replace_file( PajaTypes::uint32 ui32Index, const char* szName, ImportInterfaceC* pIface );
00081         virtual FileHandleC*        get_file( PajaTypes::uint32 ui32Index );
00083         virtual FileHandleC*        get_file( const char* szName );
00085         virtual FileHandleC*        get_equal_file( ImportableI* pImportable );
00087         virtual void                del_file( PajaTypes::uint32 ui32Index );
00089         virtual void                del_file( FileHandleC* pHandle );
00091         virtual bool                prompt_properties( PajaTypes::uint32 ui32Index, PajaSystem::DeviceContextC* pContext, PajaSystem::TimeContextC* pTimeContext, ImportInterfaceC* pIface );
00092 
00093         // Serialize editable to a Demopaja output stream.
00094         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
00095         // Serialize editable from a Demopaja input stream.
00096         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
00097 
00098     protected:
00100         FileListC();
00102         FileListC( Edit::EditableI* pOriginal );
00104         virtual ~FileListC();
00105 
00107         void    clear_list();
00108 
00109     private:
00110         std::vector<FileHandleC*>   m_rFiles;
00111 
00112     };
00113 
00114 }; // namespace
00115 
00116 #endif // __DEMOPAJA_FILELISTC_H__

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