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

okteta

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

#include <bytearraytablelayout.h>

Public Member Functions

 ByteArrayTableLayout (Size noOfBytesPerLine, Address firstLineOffset, Address startOffset, Address byteArrayOffset, Size byteArrayLength)
 
 ~ByteArrayTableLayout ()
 
bool atFirstLinePosition (const Coord &coord) const
 
bool atLastLinePosition (const Coord &coord) const
 
Address byteArrayOffset () const
 
Coord coordOfCIndex (Address index) const
 
Coord coordOfIndex (Address index) const
 
CoordRange coordRangeOfIndizes (const AddressRange &indizes) const
 
Coord correctCoord (const Coord &coord) const
 
Address correctIndex (Address index) const
 
Coord finalCoord () const
 
Line finalLine () const
 
Address firstLineOffset () const
 
LinePosition firstLinePosition (Line line) const
 
LinePosition firstLinePosition (const Coord &coord) const
 
LinePosition firstStartLinePosition () const
 
bool hasContent (Line line) const
 
Address indexAtCCoord (const Coord &coord) const
 
Address indexAtCFirstLinePosition (Line line) const
 
Address indexAtCLastLinePosition (Line line) const
 
Address indexAtCoord (const Coord &coord) const
 
Address indexAtFirstLinePosition (Line line) const
 
Address indexAtLastLinePosition (Line line) const
 
Address lastByteArrayOffset () const
 
LinePosition lastFinalLinePosition () const
 
LinePosition lastLinePosition (Line line) const
 
LinePosition lastLinePosition (const Coord &coord) const
 
Size length () const
 
Line lineAtCIndex (Address index) const
 
Line lineAtIndex (Address index) const
 
LinePositionRange linePositions (Line line) const
 
Size noOfBytesPerLine () const
 
LineSize noOfLines () const
 
LineSize noOfLinesPerPage () const
 
bool setByteArrayOffset (Address byteArrayOffset)
 
bool setFirstLineOffset (Address firstLineOffset)
 
bool setLength (Size length)
 
bool setNoOfBytesPerLine (LineSize noOfBytesPerLine)
 
void setNoOfLinesPerPage (LineSize noOfLinesPerPage)
 
bool setStartOffset (Address startOffset)
 
Coord startCoord () const
 
Line startLine () const
 
Address startOffset () const
 

Protected Member Functions

void calcEnd ()
 
void calcStart ()
 

Protected Attributes

Address mByteArrayOffset
 
CoordRange mCoordRange
 
Address mFirstLineOffset
 
Address mLastByteArrayOffset
 
Size mNoOfBytesPerLine
 
LineSize mNoOfLinesPerPage
 
Address mRelativeStartOffset
 
Address mStartOffset
 

Detailed Description

the logical layout of a byte array table for a view

Given the values for

  • number of bytes per line,
  • a possible offset of the first line displayed,
  • a possible offset of the displayed bytearray, and
  • length of the byte array as well as
  • offset in the byte array
  • the number of lines per page jump the following values are calculated:
  • starting line of display,
  • starting position in this line,
  • final line of display,
  • final position in this line, and
  • the total number of lines (is final line +1 or 0)

This layout sees the buffer as a continuous stream of byte, thus uses each line after the start from the begin to the end.

If the buffer is empty the end coord will be set one pos left to the start coord to easen the cursor handling.

Author
Friedrich W. H. Kossebau

Definition at line 61 of file bytearraytablelayout.h.

Constructor & Destructor Documentation

Okteta::ByteArrayTableLayout::ByteArrayTableLayout ( Size  noOfBytesPerLine,
Address  firstLineOffset,
Address  startOffset,
Address  byteArrayOffset,
Size  byteArrayLength 
)

Definition at line 31 of file bytearraytablelayout.cpp.

Okteta::ByteArrayTableLayout::~ByteArrayTableLayout ( )

Definition at line 298 of file bytearraytablelayout.cpp.

Member Function Documentation

bool Okteta::ByteArrayTableLayout::atFirstLinePosition ( const Coord &  coord) const

returns true if the coord is the first in it's line.

if coord is invalid the behaviour is undefinded

Definition at line 254 of file bytearraytablelayout.cpp.

bool Okteta::ByteArrayTableLayout::atLastLinePosition ( const Coord &  coord) const

returns true if the coord is the last in it's line.

if coord is invalid the behaviour is undefinded

Definition at line 260 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::byteArrayOffset ( ) const
inline

returns the offset of the start of the displayed byte array section

Definition at line 210 of file bytearraytablelayout.h.

void Okteta::ByteArrayTableLayout::calcEnd ( )
protected

calculates the final coord by startoffset, length, and number of bytes per line

Definition at line 150 of file bytearraytablelayout.cpp.

void Okteta::ByteArrayTableLayout::calcStart ( )
protected

calculates the start coord by startoffset and number of bytes per line

Definition at line 144 of file bytearraytablelayout.cpp.

Coord Okteta::ByteArrayTableLayout::coordOfCIndex ( Address  index) const

calculates the coord in which index is found If the index is below the first index the first coord is returned, if the index is above the last index the last coord is returned

Definition at line 193 of file bytearraytablelayout.cpp.

Coord Okteta::ByteArrayTableLayout::coordOfIndex ( Address  index) const

calculates the coord in which index is found.

if index is invalid the behaviour is undefinded

Definition at line 223 of file bytearraytablelayout.cpp.

CoordRange Okteta::ByteArrayTableLayout::coordRangeOfIndizes ( const AddressRange &  indizes) const

calculates the range of coords in which the indizes are found.

if indizes are invalid the behaviour is undefinded

Definition at line 228 of file bytearraytablelayout.cpp.

Coord Okteta::ByteArrayTableLayout::correctCoord ( const Coord &  coord) const

returns the coord if valid or the nearest valid coord

Definition at line 245 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::correctIndex ( Address  index) const

returns the index if valid or the nearest valid index

Definition at line 237 of file bytearraytablelayout.cpp.

Coord Okteta::ByteArrayTableLayout::finalCoord ( ) const
inline

returns the coord of the end

Definition at line 214 of file bytearraytablelayout.h.

Line Okteta::ByteArrayTableLayout::finalLine ( ) const
inline

Definition at line 219 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::firstLineOffset ( ) const
inline

Definition at line 208 of file bytearraytablelayout.h.

LinePosition Okteta::ByteArrayTableLayout::firstLinePosition ( Line  line) const

returns the first Pos in line.

if line is invalid the behaviour is undefinded

Definition at line 283 of file bytearraytablelayout.cpp.

LinePosition Okteta::ByteArrayTableLayout::firstLinePosition ( const Coord &  coord) const

returns the valid Pos or the first Pos in line.

if coord is invalid the behaviour is undefinded

Definition at line 273 of file bytearraytablelayout.cpp.

LinePosition Okteta::ByteArrayTableLayout::firstStartLinePosition ( ) const
inline

Definition at line 216 of file bytearraytablelayout.h.

bool Okteta::ByteArrayTableLayout::hasContent ( Line  line) const

returns true if the line has content

Definition at line 293 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtCCoord ( const Coord &  coord) const

calculates the index of the coord If the coord is before the first coord the first index is returned, if the coord is behind the last coord the last index is returned

Definition at line 175 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtCFirstLinePosition ( Line  line) const

calculates the index of the first pos in line.

If the line is below the first line the first index is returned, if the line is above the last line the last index is returned

Definition at line 159 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtCLastLinePosition ( Line  line) const

calculates the index of last pos in line If the line is below the first line the first index is returned, if the line is above the last line the last index is returned

Definition at line 167 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtCoord ( const Coord &  coord) const

calculates the index of coord.

if coord is invalid the behaviour is undefinded

Definition at line 213 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtFirstLinePosition ( Line  line) const

calculates the index of the first pos in line.

if line is invalid the behaviour is undefinded

Definition at line 201 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::indexAtLastLinePosition ( Line  line) const

calculates the index of last pos in line.

if line is invalid the behaviour is undefinded

Definition at line 207 of file bytearraytablelayout.cpp.

Address Okteta::ByteArrayTableLayout::lastByteArrayOffset ( ) const
inline

Definition at line 212 of file bytearraytablelayout.h.

LinePosition Okteta::ByteArrayTableLayout::lastFinalLinePosition ( ) const
inline

Definition at line 217 of file bytearraytablelayout.h.

LinePosition Okteta::ByteArrayTableLayout::lastLinePosition ( Line  line) const

returns the last Pos in line.

if line is invalid the behaviour is undefinded

Definition at line 288 of file bytearraytablelayout.cpp.

LinePosition Okteta::ByteArrayTableLayout::lastLinePosition ( const Coord &  coord) const

returns the valid Pos or the last Pos in line.

if coord is invalid the behaviour is undefinded

Definition at line 278 of file bytearraytablelayout.cpp.

Size Okteta::ByteArrayTableLayout::length ( ) const
inline

returns the length of the displayed byte array section

Definition at line 211 of file bytearraytablelayout.h.

Line Okteta::ByteArrayTableLayout::lineAtCIndex ( Address  index) const

calculates the line in which index is found If the index is below the first index the first line is returned, if the index is above the last index the last line is returned

Definition at line 185 of file bytearraytablelayout.cpp.

Line Okteta::ByteArrayTableLayout::lineAtIndex ( Address  index) const

calculates the line in which index is found.

if index is invalid the behaviour is undefinded

Definition at line 218 of file bytearraytablelayout.cpp.

LinePositionRange Okteta::ByteArrayTableLayout::linePositions ( Line  line) const

returns the used positions in line

Definition at line 267 of file bytearraytablelayout.cpp.

Size Okteta::ByteArrayTableLayout::noOfBytesPerLine ( ) const
inline

returns number of bytes per line

Definition at line 209 of file bytearraytablelayout.h.

LineSize Okteta::ByteArrayTableLayout::noOfLines ( ) const
inline

tells how much lines this layout needs (incl.

blank leading lines due to mStartOffset and mFirstLineOffset)

Definition at line 221 of file bytearraytablelayout.h.

LineSize Okteta::ByteArrayTableLayout::noOfLinesPerPage ( ) const
inline

returns number of lines per visual page

Definition at line 220 of file bytearraytablelayout.h.

bool Okteta::ByteArrayTableLayout::setByteArrayOffset ( Address  byteArrayOffset)

sets offset in the data to display, returns true if changed

Definition at line 99 of file bytearraytablelayout.cpp.

bool Okteta::ByteArrayTableLayout::setFirstLineOffset ( Address  firstLineOffset)

sets mStartOffset, returns true if changed

Definition at line 63 of file bytearraytablelayout.cpp.

bool Okteta::ByteArrayTableLayout::setLength ( Size  length)

sets length of data to display, returns true if changed

Definition at line 119 of file bytearraytablelayout.cpp.

bool Okteta::ByteArrayTableLayout::setNoOfBytesPerLine ( LineSize  noOfBytesPerLine)

sets number of bytes per line, returns true if changed

Definition at line 81 of file bytearraytablelayout.cpp.

void Okteta::ByteArrayTableLayout::setNoOfLinesPerPage ( LineSize  noOfLinesPerPage)

sets number of lines per page, 1 as default

Definition at line 138 of file bytearraytablelayout.cpp.

bool Okteta::ByteArrayTableLayout::setStartOffset ( Address  startOffset)

sets mStartOffset, returns true if changed

Definition at line 46 of file bytearraytablelayout.cpp.

Coord Okteta::ByteArrayTableLayout::startCoord ( ) const
inline

returns the coord of the start

Definition at line 215 of file bytearraytablelayout.h.

Line Okteta::ByteArrayTableLayout::startLine ( ) const
inline

Definition at line 218 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::startOffset ( ) const
inline

Definition at line 207 of file bytearraytablelayout.h.

Member Data Documentation

Address Okteta::ByteArrayTableLayout::mByteArrayOffset
protected

offset in the given bytearray

Definition at line 195 of file bytearraytablelayout.h.

CoordRange Okteta::ByteArrayTableLayout::mCoordRange
protected

Definition at line 203 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::mFirstLineOffset
protected

starting offset of the first displayed line

Definition at line 189 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::mLastByteArrayOffset
protected

last offset in the displayed bytearray section

Definition at line 197 of file bytearraytablelayout.h.

Size Okteta::ByteArrayTableLayout::mNoOfBytesPerLine
protected

how many chars per line

Definition at line 187 of file bytearraytablelayout.h.

LineSize Okteta::ByteArrayTableLayout::mNoOfLinesPerPage
protected

number of lines that are moved by page up/down

Definition at line 199 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::mRelativeStartOffset
protected

Definition at line 193 of file bytearraytablelayout.h.

Address Okteta::ByteArrayTableLayout::mStartOffset
protected

starting offset of the displayed bytearray

Definition at line 191 of file bytearraytablelayout.h.


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