• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • core
  • piecetable
piecetable.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Core library, made within the KDE community.
3 
4  Copyright 2008 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef KPIECETABLE_PIECETABLE_H
24 #define KPIECETABLE_PIECETABLE_H
25 
26 // lib
27 #include "piecelist.h"
28 // Qt
29 #include <QtCore/QLinkedList>
30 
31 
32 namespace KPieceTable
33 {
34 
35 class PieceTable
36 {
37  public:
38  explicit PieceTable( Size size = 0 );
39 
40  public:
41  void init( Size size );
42  void insert( Address insertDataOffset, Size insertLength, Address storageOffset );
44  void insert( Address insertDataOffset, const PieceList& insertPieceList );
45  PieceList remove( const AddressRange& removeRange );
46  PieceList replace( const AddressRange& removeRange,
47  Size insertLength, Address storageOffset );
49  void replace( const AddressRange& removeRange, const PieceList& insertPieceList );
50  void swap( Address firstStart, const AddressRange& secondRange );
51  Piece replaceOne( Address dataOffset, Address storageOffset, int storageId = Piece::ChangeStorage );
52 
53 // int fill( const char FillChar, unsigned int Pos = 0, int Length = -1 ); TODO: filter change, calculated
54 
55  public:
56  bool getStorageData( int* storageId, Address* storageOffset, Address dataOffset ) const;
57  Size size() const;
58 
59  protected:
60  QLinkedList<Piece> mList;
61  Size mSize;
62 };
63 
64 inline Size PieceTable::size() const { return mSize; }
65 
66 }
67 
68 #endif
KPieceTable::PieceTable::replace
PieceList replace(const AddressRange &removeRange, Size insertLength, Address storageOffset)
Definition: piecetable.cpp:299
KPieceTable::Size
Okteta::Size Size
Definition: piece.h:33
KDE::NumberRange< Address, Size >
KPieceTable::PieceTable::PieceTable
PieceTable(Size size=0)
Definition: piecetable.cpp:32
KPieceTable::PieceTable::getStorageData
bool getStorageData(int *storageId, Address *storageOffset, Address dataOffset) const
Definition: piecetable.cpp:47
KPieceTable::PieceTable::size
Size size() const
Definition: piecetable.h:64
QLinkedList
KPieceTable::PieceList
Definition: piecelist.h:35
KPieceTable::PieceTable::mSize
Size mSize
Definition: piecetable.h:61
KPieceTable::Piece::ChangeStorage
Definition: piece.h:43
piecelist.h
KPieceTable::PieceTable::swap
void swap(Address firstStart, const AddressRange &secondRange)
Definition: piecetable.cpp:311
KPieceTable::PieceTable::replaceOne
Piece replaceOne(Address dataOffset, Address storageOffset, int storageId=Piece::ChangeStorage)
Definition: piecetable.cpp:406
KPieceTable::Address
Okteta::Address Address
Definition: piece.h:34
KPieceTable::PieceTable
Definition: piecetable.h:35
KPieceTable::Piece
Definition: piece.h:38
KPieceTable::PieceTable::init
void init(Size size)
Definition: piecetable.cpp:37
KPieceTable::PieceTable::mList
QLinkedList< Piece > mList
Definition: piecetable.h:60
KPieceTable::PieceTable::insert
void insert(Address insertDataOffset, Size insertLength, Address storageOffset)
Definition: piecetable.cpp:73
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal