LibreOffice Module sc (master)  1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ScJumpMatrix Class Reference

#include <jumpmatrix.hxx>

Public Member Functions

 ScJumpMatrix (OpCode eOp, SCSIZE nColsP, SCSIZE nRowsP)
 
 ~ScJumpMatrix ()
 
void GetDimensions (SCSIZE &rCols, SCSIZE &rRows) const
 
void SetJump (SCSIZE nCol, SCSIZE nRow, double fBool, short nStart, short nNext)
 
void GetJump (SCSIZE nCol, SCSIZE nRow, double &rBool, short &rStart, short &rNext, short &rStop) const
 
void SetAllJumps (double fBool, short nStart, short nNext, short nStop=SHRT_MAX)
 
void SetJumpParameters (ScTokenVec &&p)
 
const ScTokenVecGetJumpParameters () const
 
bool HasResultMatrix () const
 
ScMatrixGetResultMatrix ()
 also applies pending buffered values More...
 
void GetPos (SCSIZE &rCol, SCSIZE &rRow) const
 
bool Next (SCSIZE &rCol, SCSIZE &rRow)
 
void GetResMatDimensions (SCSIZE &rCols, SCSIZE &rRows)
 
void SetNewResMat (SCSIZE nNewCols, SCSIZE nNewRows)
 
ScRefListGetRefList ()
 
OpCode GetOpCode () const
 
void PutResultDouble (double fVal, SCSIZE nC, SCSIZE nR)
 
void PutResultString (const svl::SharedString &rStr, SCSIZE nC, SCSIZE nR)
 
void PutResultEmpty (SCSIZE nC, SCSIZE nR)
 
void PutResultEmptyPath (SCSIZE nC, SCSIZE nR)
 

Private Types

enum  BufferType {
  BUFFER_NONE,
  BUFFER_DOUBLE,
  BUFFER_STRING,
  BUFFER_EMPTY,
  BUFFER_EMPTYPATH
}
 

Private Member Functions

void FlushBufferOtherThan (BufferType eType, SCSIZE nC, SCSIZE nR)
 Flush different types or non-consecutive buffers. More...
 
 ScJumpMatrix (const ScJumpMatrix &)=delete
 
ScJumpMatrixoperator= (const ScJumpMatrix &)=delete
 

Private Attributes

std::vector< ScJumpMatrixEntrymvJump
 
ScMatrixRef pMat
 
ScRefList mvRefList
 
ScTokenVec mvParams
 
SCSIZE nCols
 
SCSIZE nRows
 
SCSIZE nCurCol
 
SCSIZE nCurRow
 
SCSIZE nResMatCols
 
SCSIZE nResMatRows
 
OpCode meOp
 
bool bStarted
 
::std::vector< svl::SharedStringmvBufferStrings
 
::std::vector< double > mvBufferDoubles
 
SCSIZE mnBufferCol
 
SCSIZE mnBufferRowStart
 
SCSIZE mnBufferEmptyCount
 
SCSIZE mnBufferEmptyPathCount
 

Detailed Description

Definition at line 58 of file jumpmatrix.hxx.

Member Enumeration Documentation

Enumerator
BUFFER_NONE 
BUFFER_DOUBLE 
BUFFER_STRING 
BUFFER_EMPTY 
BUFFER_EMPTYPATH 

Definition at line 84 of file jumpmatrix.hxx.

Constructor & Destructor Documentation

ScJumpMatrix::ScJumpMatrix ( const ScJumpMatrix )
privatedelete
ScJumpMatrix::ScJumpMatrix ( OpCode  eOp,
SCSIZE  nColsP,
SCSIZE  nRowsP 
)

pJump not initialized

Definition at line 30 of file jumpmatrix.cxx.

References CreateDoubleError(), and NotAvailable.

ScJumpMatrix::~ScJumpMatrix ( )

Definition at line 52 of file jumpmatrix.cxx.

References i, and mvParams.

Member Function Documentation

void ScJumpMatrix::FlushBufferOtherThan ( ScJumpMatrix::BufferType  eType,
SCSIZE  nC,
SCSIZE  nR 
)
private
void ScJumpMatrix::GetDimensions ( SCSIZE rCols,
SCSIZE rRows 
) const

Definition at line 58 of file jumpmatrix.cxx.

References nCols, and nRows.

Referenced by lcl_AdjustJumpMatrix().

void ScJumpMatrix::GetJump ( SCSIZE  nCol,
SCSIZE  nRow,
double &  rBool,
short &  rStart,
short &  rNext,
short &  rStop 
) const

Definition at line 70 of file jumpmatrix.cxx.

References mvJump, nCols, and nRows.

const ScTokenVec& ScJumpMatrix::GetJumpParameters ( ) const
inline

Definition at line 107 of file jumpmatrix.hxx.

References mvParams.

OpCode ScJumpMatrix::GetOpCode ( ) const
inline

Definition at line 115 of file jumpmatrix.hxx.

References meOp.

void ScJumpMatrix::GetPos ( SCSIZE rCol,
SCSIZE rRow 
) const

Definition at line 105 of file jumpmatrix.cxx.

References nCurCol, and nCurRow.

Referenced by Next().

ScRefList & ScJumpMatrix::GetRefList ( )

Definition at line 170 of file jumpmatrix.cxx.

References mvRefList.

void ScJumpMatrix::GetResMatDimensions ( SCSIZE rCols,
SCSIZE rRows 
)

Definition at line 130 of file jumpmatrix.cxx.

References nResMatCols, and nResMatRows.

Referenced by lcl_AdjustJumpMatrix().

ScMatrix * ScJumpMatrix::GetResultMatrix ( )

also applies pending buffered values

Definition at line 203 of file jumpmatrix.cxx.

References BUFFER_NONE, FlushBufferOtherThan(), nResMatRows, and pMat.

bool ScJumpMatrix::HasResultMatrix ( ) const

Definition at line 164 of file jumpmatrix.cxx.

References pMat.

bool ScJumpMatrix::Next ( SCSIZE rCol,
SCSIZE rRow 
)

Definition at line 111 of file jumpmatrix.cxx.

References bStarted, GetPos(), nCurCol, nCurRow, nResMatCols, and nResMatRows.

ScJumpMatrix& ScJumpMatrix::operator= ( const ScJumpMatrix )
privatedelete
void ScJumpMatrix::PutResultDouble ( double  fVal,
SCSIZE  nC,
SCSIZE  nR 
)
void ScJumpMatrix::PutResultEmpty ( SCSIZE  nC,
SCSIZE  nR 
)
void ScJumpMatrix::PutResultEmptyPath ( SCSIZE  nC,
SCSIZE  nR 
)
void ScJumpMatrix::PutResultString ( const svl::SharedString rStr,
SCSIZE  nC,
SCSIZE  nR 
)
void ScJumpMatrix::SetAllJumps ( double  fBool,
short  nStart,
short  nNext,
short  nStop = SHRT_MAX 
)

Definition at line 90 of file jumpmatrix.cxx.

References mvJump, n, nCols, and nRows.

void ScJumpMatrix::SetJump ( SCSIZE  nCol,
SCSIZE  nRow,
double  fBool,
short  nStart,
short  nNext 
)

Definition at line 64 of file jumpmatrix.cxx.

References mvJump, and nRows.

void ScJumpMatrix::SetJumpParameters ( ScTokenVec &&  p)

Definition at line 100 of file jumpmatrix.cxx.

References mvParams, and p.

void ScJumpMatrix::SetNewResMat ( SCSIZE  nNewCols,
SCSIZE  nNewRows 
)

Member Data Documentation

bool ScJumpMatrix::bStarted
private

Definition at line 71 of file jumpmatrix.hxx.

Referenced by Next().

OpCode ScJumpMatrix::meOp
private

Definition at line 70 of file jumpmatrix.hxx.

Referenced by GetOpCode().

SCSIZE ScJumpMatrix::mnBufferCol
private
SCSIZE ScJumpMatrix::mnBufferEmptyCount
private

Definition at line 81 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultEmpty().

SCSIZE ScJumpMatrix::mnBufferEmptyPathCount
private

Definition at line 82 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultEmptyPath().

SCSIZE ScJumpMatrix::mnBufferRowStart
private
::std::vector< double > ScJumpMatrix::mvBufferDoubles
private

Definition at line 78 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultDouble().

::std::vector< svl::SharedString > ScJumpMatrix::mvBufferStrings
private

Definition at line 77 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultString().

std::vector<ScJumpMatrixEntry> ScJumpMatrix::mvJump
private

Definition at line 60 of file jumpmatrix.hxx.

Referenced by GetJump(), SetAllJumps(), and SetJump().

ScTokenVec ScJumpMatrix::mvParams
private

Definition at line 63 of file jumpmatrix.hxx.

Referenced by GetJumpParameters(), SetJumpParameters(), and ~ScJumpMatrix().

ScRefList ScJumpMatrix::mvRefList
private

Definition at line 62 of file jumpmatrix.hxx.

Referenced by GetRefList().

SCSIZE ScJumpMatrix::nCols
private

Definition at line 64 of file jumpmatrix.hxx.

Referenced by GetDimensions(), GetJump(), and SetAllJumps().

SCSIZE ScJumpMatrix::nCurCol
private

Definition at line 66 of file jumpmatrix.hxx.

Referenced by GetPos(), Next(), and SetNewResMat().

SCSIZE ScJumpMatrix::nCurRow
private

Definition at line 67 of file jumpmatrix.hxx.

Referenced by GetPos(), Next(), and SetNewResMat().

SCSIZE ScJumpMatrix::nResMatCols
private

Definition at line 68 of file jumpmatrix.hxx.

Referenced by GetResMatDimensions(), Next(), and SetNewResMat().

SCSIZE ScJumpMatrix::nResMatRows
private
SCSIZE ScJumpMatrix::nRows
private

Definition at line 65 of file jumpmatrix.hxx.

Referenced by GetDimensions(), GetJump(), SetAllJumps(), SetJump(), and SetNewResMat().

ScMatrixRef ScJumpMatrix::pMat
private

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