okteta
#include <bytearraytablelayout.h>
Protected Member Functions | |
void | calcEnd () |
void | calcStart () |
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.
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.
|
inline |
returns the offset of the start of the displayed byte array section
Definition at line 210 of file bytearraytablelayout.h.
|
protected |
calculates the final coord by startoffset, length, and number of bytes per line
Definition at line 150 of file bytearraytablelayout.cpp.
|
protected |
calculates the start coord by startoffset and number of bytes per line
Definition at line 144 of file bytearraytablelayout.cpp.
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.
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.
returns the coord if valid or the nearest valid coord
Definition at line 245 of file bytearraytablelayout.cpp.
returns the index if valid or the nearest valid index
Definition at line 237 of file bytearraytablelayout.cpp.
|
inline |
returns the coord of the end
Definition at line 214 of file bytearraytablelayout.h.
|
inline |
Definition at line 219 of file bytearraytablelayout.h.
|
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.
|
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.
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.
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.
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.
calculates the index of coord.
if coord is invalid the behaviour is undefinded
Definition at line 213 of file bytearraytablelayout.cpp.
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.
calculates the index of last pos in line.
if line is invalid the behaviour is undefinded
Definition at line 207 of file bytearraytablelayout.cpp.
|
inline |
Definition at line 212 of file bytearraytablelayout.h.
|
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.
|
inline |
returns the length of the displayed byte array section
Definition at line 211 of file bytearraytablelayout.h.
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.
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.
|
inline |
returns number of bytes per line
Definition at line 209 of file bytearraytablelayout.h.
|
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.
|
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.
|
inline |
returns the coord of the start
Definition at line 215 of file bytearraytablelayout.h.
|
inline |
Definition at line 218 of file bytearraytablelayout.h.
|
inline |
Definition at line 207 of file bytearraytablelayout.h.
Member Data Documentation
|
protected |
offset in the given bytearray
Definition at line 195 of file bytearraytablelayout.h.
|
protected |
Definition at line 203 of file bytearraytablelayout.h.
|
protected |
starting offset of the first displayed line
Definition at line 189 of file bytearraytablelayout.h.
|
protected |
last offset in the displayed bytearray section
Definition at line 197 of file bytearraytablelayout.h.
|
protected |
how many chars per line
Definition at line 187 of file bytearraytablelayout.h.
|
protected |
number of lines that are moved by page up/down
Definition at line 199 of file bytearraytablelayout.h.
|
protected |
Definition at line 193 of file bytearraytablelayout.h.
|
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:
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.