summaryrefslogtreecommitdiff
path: root/include/formula/vectortoken.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-04-29 11:18:54 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-04-30 13:10:41 -0400
commit7fb73a8475623de9c559f549fb8127993b62ba06 (patch)
treebb0c873559cb8f3a9edbc3fedde17acf680934d2 /include/formula/vectortoken.hxx
parent2f72495cd8097f782f0c8543c13605403f3e90c2 (diff)
Initial cut on vector formula ref tokens. Not used yet.
Change-Id: I4b28c269759bc01bfc94cfdd6a1c651d03d829c7
Diffstat (limited to 'include/formula/vectortoken.hxx')
-rw-r--r--include/formula/vectortoken.hxx60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/formula/vectortoken.hxx b/include/formula/vectortoken.hxx
new file mode 100644
index 000000000000..5af2690a5de6
--- /dev/null
+++ b/include/formula/vectortoken.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef FORMULA_VECTORTOKEN_HXX
+#define FORMULA_VECTORTOKEN_HXX
+
+#include "formula/token.hxx"
+
+namespace formula {
+
+struct VectorArray
+{
+ const double* mpArray;
+ size_t mnLength;
+
+ VectorArray( const double* pArray, size_t nLength );
+};
+
+class FORMULA_DLLPUBLIC SingleVectorRefToken : public FormulaToken
+{
+ const VectorArray maArray;
+public:
+ SingleVectorRefToken( const double* pArray, size_t nLength );
+
+ const VectorArray& GetArray() const;
+};
+
+/**
+ * This token describes a range reference in a vectorized formula
+ * calculation context.
+ */
+class FORMULA_DLLPUBLIC DoubleVectorRefToken : public FormulaToken
+{
+ std::vector<VectorArray> maArrays;
+
+ size_t mnColSize;
+ size_t mnRowSize;
+
+ bool mbAbsStart:1; /// whether or not the start row position is absolute.
+ bool mbAbsEnd:1; /// whether or not the end row position is absolute.
+
+public:
+ DoubleVectorRefToken(
+ const std::vector<VectorArray>& rArrays, size_t nColSize, size_t nRowSize,
+ bool bAbsStart, bool bAbsEnd );
+
+ const std::vector<VectorArray>& GetArrays() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */