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

EditableI.h

00001 //-------------------------------------------------------------------------
00002 //
00003 // File:        EditableI.h
00004 // Desc:        Editable interface.
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_EDITABLEI_H__
00015 #define __DEMOPAJA_EDITABLEI_H__
00016 
00017 // forward decl.
00018 namespace Edit {
00019     class EditableI;
00020 };
00021 
00022 #include "DataBlockI.h"
00023 #include "UndoC.h"
00024 #include "FileIO.h"
00025 
00026 
00027 namespace Edit {
00028 
00030 
00034     class EditableI : public DataBlockI
00035     {
00036     public:
00037         // Creates new datablock. See DataBlockI.
00038         virtual DataBlockI*         create() = 0;
00039 
00041 
00048         virtual DataBlockI*         create( EditableI* pOriginal ) = 0;
00049 
00050 
00052 
00077         virtual void                copy( EditableI* pEditable ) = 0;
00078 
00080 
00110         virtual void                restore( EditableI* pEditable ) = 0;
00111 
00113 
00118         virtual EditableI*          duplicate();
00119 
00121 
00131         virtual EditableI*          clone();
00132 
00134 
00151         virtual EditableI*          get_original() const;
00152 
00154 
00166         virtual UndoC*              begin_editing( UndoC* pUndo );
00167 
00169 
00175         virtual void                end_editing( UndoC* pUndo );
00176 
00178 
00183         virtual UndoC*              get_undo();
00184 
00186         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave ) = 0;
00187 
00189         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad ) = 0;
00190 
00191     protected:
00193         EditableI();
00195         EditableI( EditableI* m_pOriginal );
00197         virtual ~EditableI();
00198 
00199     private:
00200         EditableI*      m_pOriginal;
00201         UndoC*          m_pUndo;
00202         bool            m_bAlive;
00203     };
00204 
00205 };
00206 
00207 #endif // __DEMOPAJA_EDITABLEI_H__

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