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

okteta

  • Okteta
  • PieceTableByteArrayModel
Signals | Public Member Functions | Protected Attributes | List of all members
Okteta::PieceTableByteArrayModel Class Reference

#include <piecetablebytearraymodel.h>

Inheritance diagram for Okteta::PieceTableByteArrayModel:
Inheritance graph
[legend]

Signals

void bookmarksAdded (const QList< Okteta::Bookmark > &bookmarks)
 
void bookmarksModified (bool modified)
 
void bookmarksModified (const QList< int > &indizes)
 
void bookmarksRemoved (const QList< Okteta::Bookmark > &bookmarks)
 
void changesDone (const QList< Okteta::ByteArrayChange > &changes, int oldVersionIndex, int newVersionIndex)
 
void headVersionChanged (int newHeadVersionIndex)
 
void headVersionDescriptionChanged (const QString &versionDescription)
 
void revertedToVersionIndex (int versionIndex)
 
- Signals inherited from Okteta::AbstractByteArrayModel
void contentsChanged (const Okteta::ArrayChangeMetricsList &changeList)
 
void modifiedChanged (bool isModified)
 
void readOnlyChanged (bool isReadOnly)
 
void searchedBytes (Okteta::Size bytes) const
 

Public Member Functions

 PieceTableByteArrayModel (const QByteArray &data, QObject *parent=0)
 
 PieceTableByteArrayModel (int size=0, Byte fillByte= '\0', QObject *parent=0)
 
virtual ~PieceTableByteArrayModel ()
 
virtual void addBookmarks (const QList< Okteta::Bookmark > &bookmarks)
 
virtual const Okteta::Bookmark & bookmarkAt (unsigned int index) const
 
virtual const Okteta::Bookmark & bookmarkFor (int offset) const
 
virtual unsigned int bookmarksCount () const
 
virtual Byte byte (Address offset) const
 
virtual void cancelGroupedChange ()
 
virtual QList< ByteArrayChange > changes (int firstVersionIndex, int lastVersionIndex) const
 
virtual void closeGroupedChange (const QString &description)
 
virtual bool containsBookmarkFor (int offset) const
 
virtual
Okteta::BookmarksConstIterator 
createBookmarksConstIterator () const
 
virtual void doChanges (const QList< Okteta::ByteArrayChange > &changes, int oldVersionIndex, int newVersionIndex)
 
virtual Size fill (Byte fillByte, Address offset=0, Size fillLength=-1)
 
virtual QByteArray initialData () const
 
virtual Size insert (Address offset, const Byte *insertData, int insertLength)
 
virtual bool isModified () const
 
virtual bool isReadOnly () const
 
virtual void openGroupedChange (const QString &description)
 
virtual Size remove (const AddressRange &removeRange)
 
virtual void removeAllBookmarks ()
 
virtual void removeBookmarks (const QList< Okteta::Bookmark > &bookmarks)
 
virtual Size replace (const AddressRange &removeRange, const Byte *insertData, int insertLength)
 
virtual void revertToVersionByIndex (int versionIndex)
 
virtual void setBookmark (unsigned int index, const Okteta::Bookmark &bookmark)
 
virtual void setByte (Address offset, Byte byte)
 
void setData (const QByteArray &data)
 
virtual void setModified (bool modified=true)
 
virtual void setReadOnly (bool isReadOnly=true)
 
virtual Size size () const
 
virtual bool swap (Address firstStart, const AddressRange &secondRange)
 
virtual int versionCount () const
 
virtual QString versionDescription (int versionIndex) const
 
virtual int versionIndex () const
 
- Public Member Functions inherited from Okteta::AbstractByteArrayModel
virtual ~AbstractByteArrayModel ()
 
virtual Size copyTo (Byte *dest, const AddressRange &copyRange) const
 
Size copyTo (Byte *dest, Address offset, Size copyLength) const
 
Size fill (Byte fillChar, const AddressRange &fillRange)
 
virtual Address indexOf (const Byte *pattern, int patternLength, Address fromOffset=0, Address toOffset=-1) const
 
Address indexOf (const QByteArray &pattern, Address fromOffset=0, Address toOffset=-1) const
 
Address indexOfCaseInsensitive (const CharCodec *charCodec, const QByteArray &pattern, Address fromOffset=0, Address toOffset=-1) const
 
Size insert (Address offset, const QByteArray &insertData)
 
virtual Address lastIndexOf (const Byte *pattern, int patternLength, Address fromOffset=-1, Address toOffset=0) const
 
Address lastIndexOf (const QByteArray &pattern, Address fromOffset=-1, Address toOffset=0) const
 
Address lastIndexOfCaseInsensitive (const CharCodec *charCodec, const QByteArray &pattern, Address fromOffset=-1, Address toOffset=0) const
 
Size remove (Address offset, Size removeLength)
 
Size replace (const AddressRange &removeRange, const QByteArray &insertData)
 
Size replace (Address offset, Size removeLength, const Byte *insertData, Size insertLength)
 
- Public Member Functions inherited from Okteta::Versionable
virtual ~Versionable ()
 
virtual void headVersionChanged (int newHeadVersionIndex)=0
 
virtual void headVersionDescriptionChanged (const QString &versionDescription)=0
 
virtual void revertedToVersionIndex (int versionIndex)=0
 
- Public Member Functions inherited from Okteta::Bookmarkable
virtual ~Bookmarkable ()
 
virtual void bookmarksAdded (const QList< Okteta::Bookmark > &bookmarks)=0
 
virtual void bookmarksModified (const QList< int > &indizes)=0
 
virtual void bookmarksModified (bool modified)=0
 
virtual void bookmarksRemoved (const QList< Okteta::Bookmark > &bookmarks)=0
 
- Public Member Functions inherited from Okteta::ChangesDescribable
virtual ~ChangesDescribable ()
 
- Public Member Functions inherited from Okteta::ChangeHistory
virtual ~ChangeHistory ()
 
virtual void changesDone (const QList< Okteta::ByteArrayChange > &changes, int oldVersionIndex, int newVersionIndex)=0
 

Protected Attributes

PieceTableByteArrayModelPrivate
*const 
d
 

Additional Inherited Members

- Protected Member Functions inherited from Okteta::AbstractByteArrayModel
 AbstractByteArrayModel (QObject *parent=0)
 

Detailed Description

Author
Friedrich W. H. Kossebau

Definition at line 44 of file piecetablebytearraymodel.h.

Constructor & Destructor Documentation

Okteta::PieceTableByteArrayModel::PieceTableByteArrayModel ( const QByteArray &  data,
QObject *  parent = 0 
)
explicit

Definition at line 31 of file piecetablebytearraymodel.cpp.

Okteta::PieceTableByteArrayModel::PieceTableByteArrayModel ( int  size = 0,
Byte  fillByte = '\0',
QObject *  parent = 0 
)
explicit

Definition at line 36 of file piecetablebytearraymodel.cpp.

Okteta::PieceTableByteArrayModel::~PieceTableByteArrayModel ( )
virtual

Definition at line 180 of file piecetablebytearraymodel.cpp.

Member Function Documentation

void Okteta::PieceTableByteArrayModel::addBookmarks ( const QList< Okteta::Bookmark > &  bookmarks)
virtual

Implements Okteta::Bookmarkable.

Definition at line 103 of file piecetablebytearraymodel.cpp.

const Okteta::Bookmark & Okteta::PieceTableByteArrayModel::bookmarkAt ( unsigned int  index) const
virtual

Implements Okteta::Bookmarkable.

Definition at line 128 of file piecetablebytearraymodel.cpp.

const Okteta::Bookmark & Okteta::PieceTableByteArrayModel::bookmarkFor ( int  offset) const
virtual

Implements Okteta::Bookmarkable.

Definition at line 133 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::bookmarksAdded ( const QList< Okteta::Bookmark > &  bookmarks)
signal
unsigned int Okteta::PieceTableByteArrayModel::bookmarksCount ( ) const
virtual

Implements Okteta::Bookmarkable.

Definition at line 143 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::bookmarksModified ( bool  modified)
signal
void Okteta::PieceTableByteArrayModel::bookmarksModified ( const QList< int > &  indizes)
signal
void Okteta::PieceTableByteArrayModel::bookmarksRemoved ( const QList< Okteta::Bookmark > &  bookmarks)
signal
Byte Okteta::PieceTableByteArrayModel::byte ( Address  offset) const
virtual

locates working range The idea behind is to tell buffer which range will be requested in the following time, so that e.g.

the corresponding pages will be loaded in advance TODO: do we really need this? Where will this lead to real enhancements?

Parameters
Range
Returns
true if successfully, false otherwiseconvenience function, same as above creates an iterator to expects pointer to memory, should be in prepared range it is only expected to be a valid pointer until any further call to this or any modifying function
Parameters
Section
Returns
pointer to convenience function, same as above requests a single byte if the offset is not valid the behaviour is undefined
Parameters
offsetoffset of the datum requested

Implements Okteta::AbstractByteArrayModel.

Definition at line 42 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::cancelGroupedChange ( )
virtual

Implements Okteta::ChangesDescribable.

Definition at line 153 of file piecetablebytearraymodel.cpp.

QList< ByteArrayChange > Okteta::PieceTableByteArrayModel::changes ( int  firstVersionIndex,
int  lastVersionIndex 
) const
virtual

Implements Okteta::ChangeHistory.

Definition at line 163 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::changesDone ( const QList< Okteta::ByteArrayChange > &  changes,
int  oldVersionIndex,
int  newVersionIndex 
)
signal
void Okteta::PieceTableByteArrayModel::closeGroupedChange ( const QString &  description)
virtual

Implements Okteta::ChangesDescribable.

Definition at line 158 of file piecetablebytearraymodel.cpp.

bool Okteta::PieceTableByteArrayModel::containsBookmarkFor ( int  offset) const
virtual

Implements Okteta::Bookmarkable.

Definition at line 138 of file piecetablebytearraymodel.cpp.

Okteta::BookmarksConstIterator Okteta::PieceTableByteArrayModel::createBookmarksConstIterator ( ) const
virtual

Implements Okteta::Bookmarkable.

Definition at line 123 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::doChanges ( const QList< Okteta::ByteArrayChange > &  changes,
int  oldVersionIndex,
int  newVersionIndex 
)
virtual

Implements Okteta::ChangeHistory.

Definition at line 173 of file piecetablebytearraymodel.cpp.

Size Okteta::PieceTableByteArrayModel::fill ( Byte  fillByte,
Address  offset = 0,
Size  fillLength = -1 
)
virtual

fills the buffer with the FillChar.

If the buffer is to small it will be extended as much as possible.

Parameters
fillBytebyte to use
offsetposition where the filling starts
fillLengthnumber of bytes to fill. If Length is -1, the buffer is filled till the end.
Returns
number of filled bytes

Implements Okteta::AbstractByteArrayModel.

Definition at line 81 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::headVersionChanged ( int  newHeadVersionIndex)
signal
void Okteta::PieceTableByteArrayModel::headVersionDescriptionChanged ( const QString &  versionDescription)
signal
QByteArray Okteta::PieceTableByteArrayModel::initialData ( ) const
virtual

Implements Okteta::ChangeHistory.

Definition at line 168 of file piecetablebytearraymodel.cpp.

Size Okteta::PieceTableByteArrayModel::insert ( Address  offset,
const Byte *  insertData,
int  insertLength 
)
virtual

inserts bytes copied from the given source at Position.

The original data beginnung at the position is moved with the buffer enlarged as needed If the buffer is readOnly this is a noop and returns 0.

Parameters
offset
insertDatadata source
insertLengthnumber of bytes to copy
Returns
length of inserted data

Reimplemented from Okteta::AbstractByteArrayModel.

Definition at line 61 of file piecetablebytearraymodel.cpp.

bool Okteta::PieceTableByteArrayModel::isModified ( ) const
virtual
Returns
true if the buffer has been modified, false otherwise

Implements Okteta::AbstractByteArrayModel.

Definition at line 46 of file piecetablebytearraymodel.cpp.

bool Okteta::PieceTableByteArrayModel::isReadOnly ( ) const
virtual

Default returns true.

Returns
true if the buffer can only be read, false if writing is allowed

Reimplemented from Okteta::AbstractByteArrayModel.

Definition at line 45 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::openGroupedChange ( const QString &  description)
virtual

Implements Okteta::ChangesDescribable.

Definition at line 148 of file piecetablebytearraymodel.cpp.

Size Okteta::PieceTableByteArrayModel::remove ( const AddressRange &  removeRange)
virtual

removes beginning with position as much as possible

Parameters
removeRange
Returns
length of removed data

Reimplemented from Okteta::AbstractByteArrayModel.

Definition at line 66 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::removeAllBookmarks ( )
virtual

Implements Okteta::Bookmarkable.

Definition at line 113 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::removeBookmarks ( const QList< Okteta::Bookmark > &  bookmarks)
virtual

Implements Okteta::Bookmarkable.

Definition at line 108 of file piecetablebytearraymodel.cpp.

Size Okteta::PieceTableByteArrayModel::replace ( const AddressRange &  removeRange,
const Byte *  insertData,
int  insertLength 
)
virtual

replaces as much as possible

Parameters
removeRange
insertData
insertLength
Returns
length of inserted data

Implements Okteta::AbstractByteArrayModel.

Definition at line 71 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::revertedToVersionIndex ( int  versionIndex)
signal
void Okteta::PieceTableByteArrayModel::revertToVersionByIndex ( int  versionIndex)
virtual

Implements Okteta::Versionable.

Definition at line 100 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::setBookmark ( unsigned int  index,
const Okteta::Bookmark &  bookmark 
)
virtual

Implements Okteta::Bookmarkable.

Definition at line 118 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::setByte ( Address  offset,
Byte  byte 
)
virtual

sets a single byte if the offset is not valid the behaviour is undefined

Parameters
offsetoffset of the datum requested
bytenew byte value

Implements Okteta::AbstractByteArrayModel.

Definition at line 56 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::setData ( const QByteArray &  data)

Definition at line 51 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::setModified ( bool  modified = true)
virtual

sets the modified flag for the buffer

Parameters
modified

Implements Okteta::AbstractByteArrayModel.

Definition at line 49 of file piecetablebytearraymodel.cpp.

void Okteta::PieceTableByteArrayModel::setReadOnly ( bool  isReadOnly = true)
virtual

sets the readonly flag for the byte array if this is possible.

Default implementation does not do anything.

Parameters
isReadOnlynew state

Reimplemented from Okteta::AbstractByteArrayModel.

Definition at line 48 of file piecetablebytearraymodel.cpp.

Size Okteta::PieceTableByteArrayModel::size ( ) const
virtual
Returns
the size of the data

Implements Okteta::AbstractByteArrayModel.

Definition at line 43 of file piecetablebytearraymodel.cpp.

bool Okteta::PieceTableByteArrayModel::swap ( Address  firstStart,
const AddressRange &  secondRange 
)
virtual

moves the second section before the start of the first which is the same as moving the first behind the second.

Parameters
firstStartposition of the data where the section should be moved behind
secondRangedata range to be moved
Returns
if operation was successful, otherwise

Implements Okteta::AbstractByteArrayModel.

Definition at line 76 of file piecetablebytearraymodel.cpp.

int Okteta::PieceTableByteArrayModel::versionCount ( ) const
virtual

Implements Okteta::Versionable.

Definition at line 97 of file piecetablebytearraymodel.cpp.

QString Okteta::PieceTableByteArrayModel::versionDescription ( int  versionIndex) const
virtual

Implements Okteta::Versionable.

Definition at line 98 of file piecetablebytearraymodel.cpp.

int Okteta::PieceTableByteArrayModel::versionIndex ( ) const
virtual

Implements Okteta::Versionable.

Definition at line 96 of file piecetablebytearraymodel.cpp.

Member Data Documentation

PieceTableByteArrayModelPrivate* const Okteta::PieceTableByteArrayModel::d
protected

Definition at line 135 of file piecetablebytearraymodel.h.


The documentation for this class was generated from the following files:
  • piecetablebytearraymodel.h
  • piecetablebytearraymodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:13 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