1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef FORMULA_VECTORTOKEN_HXX
11 #define FORMULA_VECTORTOKEN_HXX
13 #include "formula/token.hxx"
18 * This token represents a single cell reference in a vectorized formula
19 * calculation context.
21 class FORMULA_DLLPUBLIC SingleVectorRefToken
: public FormulaToken
23 const double* mpArray
;
27 SingleVectorRefToken( const double* pArray
, size_t nLength
);
29 virtual FormulaToken
* Clone() const;
31 const double* GetArray() const;
32 size_t GetArrayLength() const;
36 * This token represents a range reference in a vectorized formula
37 * calculation context.
39 class FORMULA_DLLPUBLIC DoubleVectorRefToken
: public FormulaToken
41 std::vector
<const double*> maArrays
;
43 size_t mnArrayLength
; /// length of all arrays.
44 size_t mnRefRowSize
; /// original reference row size. The row size may
45 /// change as it goes down the array if either the
46 /// stard or end position is fixed.
48 bool mbStartFixed
:1; /// whether or not the start row position is absolute.
49 bool mbEndFixed
:1; /// whether or not the end row position is absolute.
53 const std::vector
<const double*>& rArrays
, size_t nArrayLength
, size_t nRefRowSize
, bool bStartFixed
, bool bEndFixed
);
55 virtual FormulaToken
* Clone() const;
57 const std::vector
<const double*>& GetArrays() const;
58 size_t GetArrayLength() const;
59 size_t GetRefRowSize() const;
60 bool IsStartFixed() const;
61 bool IsEndFixed() const;
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */