2
* This file is part of HexEditor plugin for Code::Blocks Studio
3
* Copyright (C) 2008-2009 Bartlomiej Swiecki
5
* HexEditor plugin is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3 of the License, or
8
* (at your option) any later version.
10
* HexEditor pluging is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with HexEditor. If not, see <http://www.gnu.org/licenses/>.
19
* $Id: FileContentBuffered.h 5445 2009-02-07 00:35:09Z byo $
20
* $HeadURL: svn+ssh://jenslody@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/plugins/contrib/HexEditor/FileContentBuffered.h $
23
#ifndef FILECONTENTBUFFERED_H
24
#define FILECONTENTBUFFERED_H
26
#include "FileContentBase.h"
30
/** \brief Class responsible for managing content of the file */
31
class FileContentBuffered: public FileContentBase
36
FileContentBuffered();
39
~FileContentBuffered();
41
/** \brief Reading the data */
42
bool ReadFile( const wxString& fileName );
44
/** \brief Writing the data */
45
bool WriteFile( const wxString& fileName );
47
/** \brief Getting size of the content */
50
/** \brief Reading some part of data */
51
OffsetT Read( void* buff, OffsetT position, OffsetT length );
55
/** \brief Create modification object for change operation */
56
virtual ModificationData* BuildChangeModification( OffsetT position, OffsetT length, const void* data = 0 );
58
/** \brief Create modification object for data add operation */
59
virtual ModificationData* BuildAddModification( OffsetT position, OffsetT length, const void* data = 0 );
61
/** \brief Create modification object for data remove operation */
62
virtual ModificationData* BuildRemoveModification( OffsetT position, OffsetT length );
66
/** \brief Forward-declaration for internal modification data */
67
class IntModificationData;
69
std::vector< char > m_Buffer;