GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
HistoryScrollBuffer Class Reference

#include "History.h"

Inheritance diagram for HistoryScrollBuffer:
Collaboration diagram for HistoryScrollBuffer:

Public Types

typedef QVector< CharacterHistoryLine
 

Public Member Functions

 HistoryScrollBuffer (unsigned int maxNbLines=1000)
 
virtual ~HistoryScrollBuffer ()
 
virtual void addCells (const Character a[], int count)
 
virtual void addCellsVector (const QVector< Character > &cells)
 
virtual void addLine (bool previousWrapped=false)
 
Character getCell (int lineno, int colno)
 
virtual void getCells (int lineno, int colno, int count, Character res[])
 
virtual int getLineLen (int lineno)
 
virtual int getLines ()
 
const HistoryTypegetType ()
 
virtual bool hasScroll ()
 
virtual bool isWrappedLine (int lineno)
 
unsigned int maxNbLines ()
 
void setMaxNbLines (unsigned int nbLines)
 

Protected Attributes

HistoryTypem_histType
 

Private Member Functions

int bufferIndex (int lineNumber)
 

Private Attributes

int _head
 
HistoryLine_historyBuffer
 
int _maxLineCount
 
int _usedLines
 
QBitArray _wrappedLine
 

Detailed Description

Definition at line 151 of file History.h.

Member Typedef Documentation

◆ HistoryLine

Definition at line 154 of file History.h.

Constructor & Destructor Documentation

◆ HistoryScrollBuffer()

HistoryScrollBuffer::HistoryScrollBuffer ( unsigned int  maxNbLines = 1000)

Definition at line 280 of file History.cpp.

References setMaxNbLines().

◆ ~HistoryScrollBuffer()

HistoryScrollBuffer::~HistoryScrollBuffer ( )
virtual

Definition at line 290 of file History.cpp.

References _historyBuffer.

Member Function Documentation

◆ addCells()

void HistoryScrollBuffer::addCells ( const Character  a[],
int  count 
)
virtual

Implements HistoryScroll.

Definition at line 309 of file History.cpp.

References addCellsVector().

◆ addCellsVector()

void HistoryScrollBuffer::addCellsVector ( const QVector< Character > &  cells)
virtual

Reimplemented from HistoryScroll.

Definition at line 295 of file History.cpp.

References _head, _historyBuffer, _maxLineCount, _usedLines, _wrappedLine, and bufferIndex().

Referenced by addCells().

◆ addLine()

void HistoryScrollBuffer::addLine ( bool  previousWrapped = false)
virtual

Implements HistoryScroll.

Definition at line 317 of file History.cpp.

References _usedLines, _wrappedLine, and bufferIndex().

◆ bufferIndex()

int HistoryScrollBuffer::bufferIndex ( int  lineNumber)
private

Definition at line 397 of file History.cpp.

References _head, _maxLineCount, and _usedLines.

Referenced by addCellsVector(), addLine(), getCells(), getLineLen(), isWrappedLine(), and setMaxNbLines().

◆ getCell()

Character HistoryScroll::getCell ( int  lineno,
int  colno 
)
inlineinherited

Definition at line 94 of file History.h.

References HistoryScroll::getCells().

◆ getCells()

void HistoryScrollBuffer::getCells ( int  lineno,
int  colno,
int  count,
Character  res[] 
)
virtual

Implements HistoryScroll.

Definition at line 354 of file History.cpp.

References _historyBuffer, _maxLineCount, _usedLines, and bufferIndex().

◆ getLineLen()

int HistoryScrollBuffer::getLineLen ( int  lineno)
virtual

Implements HistoryScroll.

Definition at line 327 of file History.cpp.

References _historyBuffer, _maxLineCount, _usedLines, and bufferIndex().

◆ getLines()

int HistoryScrollBuffer::getLines ( )
virtual

Implements HistoryScroll.

Definition at line 322 of file History.cpp.

References _usedLines.

◆ getType()

const HistoryType& HistoryScroll::getType ( )
inlineinherited

Definition at line 112 of file History.h.

References HistoryScroll::m_histType.

Referenced by Screen::getScroll().

◆ hasScroll()

bool HistoryScroll::hasScroll ( )
virtualinherited

Reimplemented in HistoryScrollNone.

Definition at line 193 of file History.cpp.

Referenced by Screen::hasScroll().

◆ isWrappedLine()

bool HistoryScrollBuffer::isWrappedLine ( int  lineno)
virtual

Implements HistoryScroll.

Definition at line 341 of file History.cpp.

References _maxLineCount, _usedLines, _wrappedLine, and bufferIndex().

◆ maxNbLines()

unsigned int HistoryScrollBuffer::maxNbLines ( )
inline

Definition at line 169 of file History.h.

References _maxLineCount.

◆ setMaxNbLines()

void HistoryScrollBuffer::setMaxNbLines ( unsigned int  nbLines)

Member Data Documentation

◆ _head

int HistoryScrollBuffer::_head
private

Definition at line 179 of file History.h.

Referenced by addCellsVector(), bufferIndex(), and setMaxNbLines().

◆ _historyBuffer

HistoryLine* HistoryScrollBuffer::_historyBuffer
private

Definition at line 175 of file History.h.

Referenced by ~HistoryScrollBuffer(), addCellsVector(), getCells(), getLineLen(), and setMaxNbLines().

◆ _maxLineCount

int HistoryScrollBuffer::_maxLineCount
private

◆ _usedLines

int HistoryScrollBuffer::_usedLines
private

◆ _wrappedLine

QBitArray HistoryScrollBuffer::_wrappedLine
private

Definition at line 176 of file History.h.

Referenced by addCellsVector(), addLine(), isWrappedLine(), and setMaxNbLines().

◆ m_histType

HistoryType* HistoryScroll::m_histType
protectedinherited

Definition at line 115 of file History.h.

Referenced by HistoryScroll::~HistoryScroll(), and HistoryScroll::getType().


The documentation for this class was generated from the following files: