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 57 of file jumpmatrix.hxx.

Member Enumeration Documentation

◆ BufferType

Enumerator
BUFFER_NONE 
BUFFER_DOUBLE 
BUFFER_STRING 
BUFFER_EMPTY 
BUFFER_EMPTYPATH 

Definition at line 83 of file jumpmatrix.hxx.

Constructor & Destructor Documentation

◆ ScJumpMatrix() [1/2]

ScJumpMatrix::ScJumpMatrix ( const ScJumpMatrix )
privatedelete

◆ ScJumpMatrix() [2/2]

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

pJump not initialized

Definition at line 29 of file jumpmatrix.cxx.

References CreateDoubleError(), and NotAvailable.

◆ ~ScJumpMatrix()

ScJumpMatrix::~ScJumpMatrix ( )

Definition at line 51 of file jumpmatrix.cxx.

References i, and mvParams.

Member Function Documentation

◆ FlushBufferOtherThan()

void ScJumpMatrix::FlushBufferOtherThan ( ScJumpMatrix::BufferType  eType,
SCSIZE  nC,
SCSIZE  nR 
)
private

◆ GetDimensions()

void ScJumpMatrix::GetDimensions ( SCSIZE rCols,
SCSIZE rRows 
) const

Definition at line 57 of file jumpmatrix.cxx.

References nCols, and nRows.

Referenced by lcl_AdjustJumpMatrix(), and ScInterpreter::ScRandomImpl().

◆ GetJump()

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

Definition at line 69 of file jumpmatrix.cxx.

References GetJump(), mvJump, nCols, and nRows.

Referenced by GetJump(), and ScInterpreter::JumpMatrix().

◆ GetJumpParameters()

const ScTokenVec & ScJumpMatrix::GetJumpParameters ( ) const
inline

Definition at line 106 of file jumpmatrix.hxx.

References mvParams.

Referenced by ScInterpreter::JumpMatrix().

◆ GetOpCode()

OpCode ScJumpMatrix::GetOpCode ( ) const
inline

Definition at line 114 of file jumpmatrix.hxx.

References meOp.

Referenced by ScInterpreter::JumpMatrix().

◆ GetPos()

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

◆ GetRefList()

ScRefList & ScJumpMatrix::GetRefList ( )

Definition at line 169 of file jumpmatrix.cxx.

References mvRefList.

Referenced by ScInterpreter::JumpMatrix().

◆ GetResMatDimensions()

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

Definition at line 129 of file jumpmatrix.cxx.

References nResMatCols, and nResMatRows.

Referenced by lcl_AdjustJumpMatrix().

◆ GetResultMatrix()

ScMatrix * ScJumpMatrix::GetResultMatrix ( )

also applies pending buffered values

Definition at line 202 of file jumpmatrix.cxx.

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

Referenced by ScInterpreter::JumpMatrix().

◆ HasResultMatrix()

bool ScJumpMatrix::HasResultMatrix ( ) const

Definition at line 163 of file jumpmatrix.cxx.

References pMat.

Referenced by ScInterpreter::JumpMatrix().

◆ Next()

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

Definition at line 110 of file jumpmatrix.cxx.

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

Referenced by ScInterpreter::JumpMatrix().

◆ operator=()

ScJumpMatrix & ScJumpMatrix::operator= ( const ScJumpMatrix )
privatedelete

◆ PutResultDouble()

void ScJumpMatrix::PutResultDouble ( double  fVal,
SCSIZE  nC,
SCSIZE  nR 
)

◆ PutResultEmpty()

void ScJumpMatrix::PutResultEmpty ( SCSIZE  nC,
SCSIZE  nR 
)

◆ PutResultEmptyPath()

void ScJumpMatrix::PutResultEmptyPath ( SCSIZE  nC,
SCSIZE  nR 
)

◆ PutResultString()

void ScJumpMatrix::PutResultString ( const svl::SharedString rStr,
SCSIZE  nC,
SCSIZE  nR 
)

◆ SetAllJumps()

void ScJumpMatrix::SetAllJumps ( double  fBool,
short  nStart,
short  nNext,
short  nStop = SHRT_MAX 
)

Definition at line 89 of file jumpmatrix.cxx.

References mvJump, n, nCols, and nRows.

◆ SetJump()

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

Definition at line 63 of file jumpmatrix.cxx.

References mvJump, nRows, and SetJump().

Referenced by SetJump().

◆ SetJumpParameters()

void ScJumpMatrix::SetJumpParameters ( ScTokenVec &&  p)

Definition at line 99 of file jumpmatrix.cxx.

References mvParams, and p.

◆ SetNewResMat()

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

Member Data Documentation

◆ bStarted

bool ScJumpMatrix::bStarted
private

Definition at line 70 of file jumpmatrix.hxx.

Referenced by Next().

◆ meOp

OpCode ScJumpMatrix::meOp
private

Definition at line 69 of file jumpmatrix.hxx.

Referenced by GetOpCode().

◆ mnBufferCol

SCSIZE ScJumpMatrix::mnBufferCol
private

◆ mnBufferEmptyCount

SCSIZE ScJumpMatrix::mnBufferEmptyCount
private

Definition at line 80 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultEmpty().

◆ mnBufferEmptyPathCount

SCSIZE ScJumpMatrix::mnBufferEmptyPathCount
private

Definition at line 81 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultEmptyPath().

◆ mnBufferRowStart

SCSIZE ScJumpMatrix::mnBufferRowStart
private

◆ mvBufferDoubles

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

Definition at line 77 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultDouble().

◆ mvBufferStrings

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

Definition at line 76 of file jumpmatrix.hxx.

Referenced by FlushBufferOtherThan(), and PutResultString().

◆ mvJump

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

Definition at line 59 of file jumpmatrix.hxx.

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

◆ mvParams

ScTokenVec ScJumpMatrix::mvParams
private

Definition at line 62 of file jumpmatrix.hxx.

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

◆ mvRefList

ScRefList ScJumpMatrix::mvRefList
private

Definition at line 61 of file jumpmatrix.hxx.

Referenced by GetRefList().

◆ nCols

SCSIZE ScJumpMatrix::nCols
private

Definition at line 63 of file jumpmatrix.hxx.

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

◆ nCurCol

SCSIZE ScJumpMatrix::nCurCol
private

Definition at line 65 of file jumpmatrix.hxx.

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

◆ nCurRow

SCSIZE ScJumpMatrix::nCurRow
private

Definition at line 66 of file jumpmatrix.hxx.

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

◆ nResMatCols

SCSIZE ScJumpMatrix::nResMatCols
private

Definition at line 67 of file jumpmatrix.hxx.

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

◆ nResMatRows

SCSIZE ScJumpMatrix::nResMatRows
private

◆ nRows

SCSIZE ScJumpMatrix::nRows
private

Definition at line 64 of file jumpmatrix.hxx.

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

◆ pMat

ScMatrixRef ScJumpMatrix::pMat
private

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