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

okteta

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

#include <wordbytearrayservice.h>

Public Member Functions

 WordByteArrayService (const AbstractByteArrayModel *byteArrayModel, const CharCodec *charCodec)
 
 ~WordByteArrayService ()
 
Address indexOfBeforeNextWordStart (Address index) const
 
Address indexOfLeftWordSelect (Address index) const
 
Address indexOfNextWordStart (Address index) const
 
Address indexOfPreviousWordStart (Address index) const
 
Address indexOfRightWordSelect (Address index) const
 
Address indexOfWordEnd (Address index) const
 
Address indexOfWordStart (Address index) const
 
bool isWordChar (Address index) const
 
QString text (Address index, Address lastIndex=-1) const
 
AddressRange wordSection (Address index) const
 

Protected Attributes

const AbstractByteArrayModel *const mByteArrayModel
 
const CharCodec *const mCharCodec
 

Detailed Description

Author
Friedrich W. H. Kossebau

Definition at line 44 of file wordbytearrayservice.h.

Constructor & Destructor Documentation

Okteta::WordByteArrayService::WordByteArrayService ( const AbstractByteArrayModel *  byteArrayModel,
const CharCodec *  charCodec 
)

Definition at line 34 of file wordbytearrayservice.cpp.

Okteta::WordByteArrayService::~WordByteArrayService ( )

Definition at line 275 of file wordbytearrayservice.cpp.

Member Function Documentation

Address Okteta::WordByteArrayService::indexOfBeforeNextWordStart ( Address  index) const

searches for the start of the next word not including the given index.

if there isn't a next word the index of the end is returned

Parameters
indexindex to start with
Returns
index of the last nonword char before the next word or the last index

Definition at line 100 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfLeftWordSelect ( Address  index) const

Definition at line 146 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfNextWordStart ( Address  index) const

searches for the start of the next word not including the given index.

if there isn't a next word the index behind end is returned

Parameters
index
Returns
index of the start of the next word or behind end

Definition at line 80 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfPreviousWordStart ( Address  index) const

searches for the first char after the end of the word including the given index.

If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;

Parameters
indexindex to start with
Returns
index of the first char after the current word or the given index if there is nonesearches for the first char after the end of the word including the given index. If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;
Parameters
indexindex to start with
Returns
index of the first char after the current word or the given index if there is nonesearches the start of the next previous word that does not include the given index, if no further word is found 0 is returned. if the index is out of range the behaviour is undefined.
Parameters
index
Returns
index of the next previous word start or 0

Definition at line 54 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfRightWordSelect ( Address  index) const

searches for the first char after the end of the word including the given index.

If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows that of behind the last byte;

Parameters
indexindex to start with
Returns
index of the first char after the current word or the given index if there is none

Definition at line 175 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfWordEnd ( Address  index) const

searches for the end of the word including the given index.

If the byte at the given index is already a nonword char the given index is returned. if no other nonwordchar follows, that of the last byte;

Parameters
indexindex to start with
Returns
index of the last char of the current word or the given index if there is none

Definition at line 133 of file wordbytearrayservice.cpp.

Address Okteta::WordByteArrayService::indexOfWordStart ( Address  index) const

searches for the start of the word including the given index.

if no other nonwordchar preceds this is 0; If the byte at the given index is already a nonword char the given index is returned.

Parameters
indexindex to start with
Returns
index of the first char of the current word or the given index if there is none

Definition at line 121 of file wordbytearrayservice.cpp.

bool Okteta::WordByteArrayService::isWordChar ( Address  index) const

if index is out of range the behaviour is undefined

Parameters
index
Returns
true if the byte at position i is a char of type CharType

Definition at line 47 of file wordbytearrayservice.cpp.

QString Okteta::WordByteArrayService::text ( Address  index,
Address  lastIndex = -1 
) const

returns the text starting at the given index until the first non-text byte if there is no text byte at the index the result is empty.

Parameters
index
lastIndexif -1 lastIndex is set to the end of th byte array.
Returns
the text starting at the index

Definition at line 246 of file wordbytearrayservice.cpp.

AddressRange Okteta::WordByteArrayService::wordSection ( Address  index) const

returns the section with a word around index.

if there is no word the section is empty

Parameters
index
Returns
the section with a word around index.

Definition at line 39 of file wordbytearrayservice.cpp.

Member Data Documentation

const AbstractByteArrayModel* const Okteta::WordByteArrayService::mByteArrayModel
protected

Definition at line 130 of file wordbytearrayservice.h.

const CharCodec* const Okteta::WordByteArrayService::mCharCodec
protected

Definition at line 131 of file wordbytearrayservice.h.


The documentation for this class was generated from the following files:
  • wordbytearrayservice.h
  • wordbytearrayservice.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