KateBuffer Class Reference
The KateBuffer class maintains a collections of lines. More...
#include <katebuffer.h>
Inheritance diagram for KateBuffer:


Public Slots | |
void | codeFoldingColumnUpdate (unsigned int lineNr) |
Signals | |
void | codeFoldingUpdated () |
void | tagLines (int start, int end) |
Public Member Functions | |
KateBuffer (KateDocument *doc) | |
~KateBuffer () | |
void | editStart () |
void | editEnd () |
void | clear () |
bool | openFile (const QString &m_file) |
bool | loadingBorked () const |
bool | binary () const |
bool | canEncode () |
bool | saveFile (const QString &m_file) |
KateTextLine::Ptr | line (uint i) |
KateTextLine::Ptr | plainLine (uint i) |
uint | count () const |
void | changeLine (uint i) |
void | insertLine (uint i, KateTextLine::Ptr line) |
void | removeLine (uint i) |
uint | countVisible () |
uint | lineNumber (uint visibleLine) |
uint | lineVisibleNumber (uint line) |
void | lineInfo (KateLineInfo *info, unsigned int line) |
uint | tabWidth () const |
void | setTabWidth (uint w) |
void | setHighlight (uint hlMode) |
KateHighlighting * | highlight () |
void | invalidateHighlighting () |
KateCodeFoldingTree * | foldingTree () |
Static Public Member Functions | |
static uint | maxLoadedBlocks () |
static void | setMaxLoadedBlocks (uint count) |
Friends | |
class | KateBufBlock |
Detailed Description
The KateBuffer class maintains a collections of lines.It allows to maintain state information in a lazy way. It handles swapping out of data using secondary storage.
It is designed to handle large amounts of text-data efficiently with respect to CPU and memory usage.
- Author:
- Waldo Bastian <bastian@kde.org>
Christoph Cullmann <cullmann@kde.org>
Definition at line 341 of file katebuffer.h.
Constructor & Destructor Documentation
|
Create an empty buffer.
Definition at line 317 of file katebuffer.cpp. References clear(). |
|
Goodbye buffer.
Definition at line 344 of file katebuffer.cpp. References KateHighlighting::release(), and QValueVector::size(). |
Member Function Documentation
|
maximal loaded block count
Definition at line 352 of file katebuffer.h. Referenced by KateBufBlock::KateBufBlock(), KateSaveConfigTab::KateSaveConfigTab(), KateDocument::readConfig(), and KateDocument::writeConfig(). |
|
modifier for max loaded blocks limit
Definition at line 79 of file katebuffer.cpp. Referenced by KateSaveConfigTab::apply(), and KateDocument::readConfig(). |
|
start some editing action
Definition at line 355 of file katebuffer.cpp. Referenced by KateDocument::editStart(). |
|
finish some editing action
Definition at line 368 of file katebuffer.cpp. References KateBufBlock::endLine(), KateHighlighting::noHighlighting(), and KateBufBlock::startLine(). Referenced by KateDocument::editEnd(). |
|
Clear the buffer.
Definition at line 450 of file katebuffer.cpp. References QValueVector::append(), QValueVector::clear(), KateCodeFoldingTree::clear(), KateBufBlock, KateBufBlock::lines(), and QValueVector::size(). Referenced by KateDocument::closeURL(), KateBuffer(), and openFile(). |
|
Open a file, use the given filename.
Definition at line 477 of file katebuffer.cpp. References QValueVector::append(), QValueVector::clear(), clear(), KateDocumentConfig::codec(), KateDocument::config(), QFile::encodeName(), endl(), KateBufBlock::endLine(), KateCodeFoldingTree::fixRoot(), QValueVector::isEmpty(), KateBufBlock, kdDebug(), KateBufBlock::lines(), KateHighlighting::noHighlighting(), KateDocumentConfig::setEol(), and QValueVector::size(). Referenced by KateDocument::openFile(). |
|
was the last loading broken because of not enough tmp disk space ? (will be reseted on successful save of the file, user gets warning if he really wants to do it)
Definition at line 447 of file katebuffer.h. Referenced by KateDocument::openFile(), and KateDocument::saveFile(). |
|
is this file a binary?
Definition at line 453 of file katebuffer.h. Referenced by KateDocument::openFile(), and KateDocument::saveFile(). |
|
Can the current codec handle all chars.
Definition at line 559 of file katebuffer.cpp. References QTextCodec::canEncode(), KateDocumentConfig::codec(), KateDocument::config(), endl(), kdDebug(), QTextCodec::name(), and plainLine(). Referenced by KateDocument::saveFile(). |
|
Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream).
Definition at line 583 of file katebuffer.cpp. References QFile::close(), KateDocumentConfig::codec(), KateDocument::config(), KateDocument::configFlags(), KateDocument::editEnd(), KateDocument::editInsertText(), KateDocument::editRemoveText(), KateDocument::editStart(), KateDocumentConfig::eolString(), QString::fill(), QFile::open(), plainLine(), QTextStream::setCodec(), QTextStream::setEncoding(), and KateDocumentConfig::tabWidth(). Referenced by KateDocument::saveFile(). |
|
|
Return line
Definition at line 494 of file katebuffer.h. References KateBufBlock::line(), and KateBufBlock::startLine(). Referenced by KateDocument::backspace(), canEncode(), codeFoldingColumnUpdate(), KateDocument::comment(), KateDocument::currentColumn(), KateDocument::del(), KateDocument::findMatchingBracket(), KateDocument::getWord(), KateDocument::indent(), KateDocument::length(), KateDocument::lineLength(), KateDocument::plainKateTextLine(), KateDocument::removeText(), saveFile(), KateDocument::searchText(), KateDocument::selectLength(), KateDocument::selectWord(), KateDocument::text(), KateDocument::textLine(), KateDocument::transform(), KateDocument::transpose(), and KateDocument::typeChars(). |
|
Return the total number of lines in the buffer.
Definition at line 506 of file katebuffer.h. Referenced by KateCodeFoldingTree::collapseOne(), KateCodeFoldingTree::collapseToplevelNodes(), KateCodeFoldingTree::expandOne(), KateCodeFoldingTree::expandToplevelNodes(), KateDocument::numLines(), KateDocument::text(), and KateCodeFoldingTree::toggleRegionVisibility(). |
|
Mark line
Definition at line 749 of file katebuffer.cpp. References KateBufBlock::markDirty(). Referenced by KateDocument::editInsertLine(), KateDocument::editInsertText(), KateDocument::editMarkLineAutoWrapped(), KateDocument::editRemoveText(), KateDocument::editUnWrapLine(), and KateDocument::editWrapLine(). |
|
Insert
Definition at line 759 of file katebuffer.cpp. References KateBufBlock::insertLine(), KateCodeFoldingTree::lineHasBeenInserted(), and KateBufBlock::startLine(). Referenced by KateDocument::editInsertLine(), and KateDocument::editWrapLine(). |
|
Remove line
Definition at line 794 of file katebuffer.cpp. References QValueVector::begin(), KateBufBlock::endLine(), QValueVector::erase(), KateCodeFoldingTree::lineHasBeenRemoved(), KateBufBlock::lines(), KateBufBlock::next(), KateBufBlock::prev(), KateBufBlock::removeLine(), KateBufBlock::setStartLine(), and KateBufBlock::startLine(). Referenced by KateDocument::editRemoveLine(), and KateDocument::editUnWrapLine(). |
|
Use
Definition at line 860 of file katebuffer.cpp. References KateDocument::bufferHlChanged(), KateDocument::config(), KateHlManager::getHl(), KateHighlighting::indentation(), invalidateHighlighting(), QString::isEmpty(), KateAutoIndent::modeNumber(), KateHighlighting::noHighlighting(), KateHighlighting::release(), KateHlManager::self(), KateDocumentConfig::setIndentationMode(), and KateHighlighting::use(). Referenced by KateDocument::closeURL(), KateDocument::KateDocument(), KateDocument::openFile(), KateDocument::readSessionConfig(), KateDocument::saveFile(), and KateDocument::setHlMode(). |
|
Invalidate highlighting of whole buffer.
Definition at line 892 of file katebuffer.cpp. Referenced by KateDocument::makeAttribs(), setHighlight(), and setTabWidth(). |
|
Emittend if codefolding returned with a changed list.
|
|
Emitted when the highlighting of a certain range has changed.
|
The documentation for this class was generated from the following files: