\section{Kate\-Buf\-Block Class Reference}
\label{classKateBufBlock}\index{KateBufBlock@{KateBufBlock}}
The Kate\-Buf\-Block class contains an amount of data representing a certain number of lines.  


{\tt \#include $<$katebuffer.h$>$}

Collaboration diagram for Kate\-Buf\-Block:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=174pt]{classKateBufBlock__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf State} \{ {\bf state\-Swapped} =  0, 
{\bf state\-Clean} =  1, 
{\bf state\-Dirty} =  2
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Kate\-Buf\-Block} ({\bf Kate\-Buffer} $\ast$parent, {\bf Kate\-Buf\-Block} $\ast$prev=0, {\bf Kate\-Buf\-Block} $\ast$next=0, Kate\-File\-Loader $\ast$stream=0)
\item 
{\bf $\sim$Kate\-Buf\-Block} ()
\item 
{\bf State} {\bf state} () const 
\item 
{\bf Kate\-Text\-Line::Ptr} {\bf line} (uint i)
\item 
void {\bf insert\-Line} (uint i, {\bf Kate\-Text\-Line::Ptr} line)
\item 
void {\bf remove\-Line} (uint i)
\item 
void {\bf mark\-Dirty} ()
\item 
uint {\bf start\-Line} () const 
\item 
void {\bf set\-Start\-Line} (uint line)
\item 
uint {\bf end\-Line} () const 
\item 
uint {\bf lines} () const 
\item 
{\bf Kate\-Buf\-Block} $\ast$ {\bf prev} ()
\item 
{\bf Kate\-Buf\-Block} $\ast$ {\bf next} ()
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Kate\-Buf\-Block\-List}\label{classKateBufBlock_n0}

\end{CompactItemize}


\subsection{Detailed Description}
The Kate\-Buf\-Block class contains an amount of data representing a certain number of lines. 

\begin{Desc}
\item[Author:]Waldo Bastian $<${\tt bastian@kde.org}$>$ 

Christoph Cullmann $<${\tt cullmann@kde.org}$>$ \end{Desc}




Definition at line 49 of file katebuffer.h.

\subsection{Member Enumeration Documentation}
\index{KateBufBlock@{Kate\-Buf\-Block}!State@{State}}
\index{State@{State}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Kate\-Buf\-Block::State}}\label{classKateBufBlock_w3}


state flags 



Definition at line 80 of file katebuffer.h.

\subsection{Constructor \& Destructor Documentation}
\index{KateBufBlock@{Kate\-Buf\-Block}!KateBufBlock@{KateBufBlock}}
\index{KateBufBlock@{KateBufBlock}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Kate\-Buf\-Block::Kate\-Buf\-Block ({\bf Kate\-Buffer} $\ast$ {\em parent}, {\bf Kate\-Buf\-Block} $\ast$ {\em prev} = {\tt 0}, {\bf Kate\-Buf\-Block} $\ast$ {\em next} = {\tt 0}, Kate\-File\-Loader $\ast$ {\em stream} = {\tt 0})}\label{classKateBufBlock_a0}


Create an empty block. 

(empty == ONE line) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]buffer the block belongs to \item[{\em prev}]previous bufblock in the list \item[{\em next}]next bufblock in the list \item[{\em stream}]stream to load the content from, if any given \end{description}
\end{Desc}


Definition at line 1179 of file katebuffer.cpp.

References Kate\-Buf\-Block\-List::append(), Kate\-Buf\-Block\-List::count(), end\-Line(), Kate\-Buf\-Block\-List::first(), Kate\-Buffer::m\_\-loaded\-Blocks, m\_\-next, m\_\-prev, Kate\-Buffer::max\-Loaded\-Blocks(), QValue\-Vector::push\_\-back(), and swap\-Out().\index{KateBufBlock@{Kate\-Buf\-Block}!~KateBufBlock@{$\sim$KateBufBlock}}
\index{~KateBufBlock@{$\sim$KateBufBlock}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Kate\-Buf\-Block::$\sim${\bf Kate\-Buf\-Block} ()}\label{classKateBufBlock_a1}


destroy this block and take care of freeing all mem 



Definition at line 1227 of file katebuffer.cpp.

References m\_\-next, m\_\-prev, and Kate\-Buf\-Block\-List::remove().

\subsection{Member Function Documentation}
\index{KateBufBlock@{Kate\-Buf\-Block}!state@{state}}
\index{state@{state}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf State} Kate\-Buf\-Block::state () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a2}


returns the current state of this block 

\begin{Desc}
\item[Returns:]state \end{Desc}


Definition at line 91 of file katebuffer.h.\index{KateBufBlock@{Kate\-Buf\-Block}!line@{line}}
\index{line@{line}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Kate\-Text\-Line::Ptr} Kate\-Buf\-Block::line (uint {\em i})}\label{classKateBufBlock_a3}


return line {\tt i} The first line of this block is line 0. 

if you modifiy this line, please mark the block as dirty \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]line to return \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]line pointer \end{Desc}


Definition at line 1333 of file katebuffer.cpp.

References Kate\-Buf\-Block\-List::append(), Kate\-Buf\-Block\-List::is\-Last(), and Kate\-Buffer::m\_\-loaded\-Blocks.

Referenced by Kate\-Buffer::line(), and Kate\-Buffer::plain\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!insertLine@{insertLine}}
\index{insertLine@{insertLine}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buf\-Block::insert\-Line (uint {\em i}, {\bf Kate\-Text\-Line::Ptr} {\em line})}\label{classKateBufBlock_a4}


insert {\tt line} in front of line {\tt i} marks the block dirty 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]where to insert \item[{\em line}]line pointer \end{description}
\end{Desc}


Definition at line 1346 of file katebuffer.cpp.

References QValue\-Vector::begin(), QValue\-Vector::insert(), and mark\-Dirty().

Referenced by Kate\-Buffer::insert\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!removeLine@{removeLine}}
\index{removeLine@{removeLine}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buf\-Block::remove\-Line (uint {\em i})}\label{classKateBufBlock_a5}


remove line {\tt i} marks the block dirty 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em i}]line to remove \end{description}
\end{Desc}


Definition at line 1358 of file katebuffer.cpp.

References QValue\-Vector::begin(), QValue\-Vector::erase(), and mark\-Dirty().

Referenced by Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!markDirty@{markDirty}}
\index{markDirty@{markDirty}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buf\-Block::mark\-Dirty ()}\label{classKateBufBlock_a6}


mark this block as dirty, will invalidate the swap data insert/remove\-Line will mark the block dirty itself 



Definition at line 1370 of file katebuffer.cpp.

References Kate\-Buf\-Block\-List::append(), Kate\-Buf\-Block\-List::is\-Last(), and Kate\-Buffer::m\_\-loaded\-Blocks.

Referenced by Kate\-Buffer::change\-Line(), insert\-Line(), and remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!startLine@{startLine}}
\index{startLine@{startLine}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint Kate\-Buf\-Block::start\-Line () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a7}


start\-Line 

\begin{Desc}
\item[Returns:]first line in block \end{Desc}


Definition at line 129 of file katebuffer.h.

Referenced by Kate\-Buffer::edit\-End(), Kate\-Buffer::insert\-Line(), Kate\-Buffer::line(), Kate\-Buffer::plain\-Line(), and Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!setStartLine@{setStartLine}}
\index{setStartLine@{setStartLine}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Kate\-Buf\-Block::set\-Start\-Line (uint {\em line})\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a8}


update the first line, needed to keep it up to date 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em line}]new start\-Line \end{description}
\end{Desc}


Definition at line 135 of file katebuffer.h.

Referenced by Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!endLine@{endLine}}
\index{endLine@{endLine}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint Kate\-Buf\-Block::end\-Line () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a9}


first line behind this block 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em line}]behind block \end{description}
\end{Desc}


Definition at line 141 of file katebuffer.h.

Referenced by Kate\-Buffer::edit\-End(), Kate\-Buf\-Block(), Kate\-Buffer::open\-File(), and Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!lines@{lines}}
\index{lines@{lines}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint Kate\-Buf\-Block::lines () const\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a10}


lines in this block 

\begin{Desc}
\item[Returns:]lines \end{Desc}


Definition at line 147 of file katebuffer.h.

Referenced by Kate\-Buffer::clear(), Kate\-Buffer::open\-File(), and Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!prev@{prev}}
\index{prev@{prev}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Kate\-Buf\-Block}$\ast$ Kate\-Buf\-Block::prev ()\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a11}


prev block 

\begin{Desc}
\item[Returns:]previous block \end{Desc}


Definition at line 153 of file katebuffer.h.

Referenced by Kate\-Buffer::remove\-Line().\index{KateBufBlock@{Kate\-Buf\-Block}!next@{next}}
\index{next@{next}!KateBufBlock@{Kate\-Buf\-Block}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Kate\-Buf\-Block}$\ast$ Kate\-Buf\-Block::next ()\hspace{0.3cm}{\tt  [inline]}}\label{classKateBufBlock_a12}


next block 

\begin{Desc}
\item[Returns:]next block \end{Desc}


Definition at line 159 of file katebuffer.h.

Referenced by Kate\-Buffer::remove\-Line().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
katebuffer.h\item 
katebuffer.cpp\end{CompactItemize}
