OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
XLSlicerCache.hpp
Go to the documentation of this file.
1/*
2 * OpenXLSX-NX - Modern High-Performance C++ Excel Library
3 *
4 * Original work Copyright (c) 2018-2025, Kenneth Troldal Balslev and OpenXLSX contributors
5 * Modified work Copyright (c) 2026, Curry Tang and OpenXLSX-NX contributors
6 *
7 * Distributed under the BSD 3-Clause License.
8 * See LICENSE.md in the project root or https://opensource.org/licenses/BSD-3-Clause
9 */
10
11#ifndef OPENXLSX_XLSLICERCACHE_HPP
12#define OPENXLSX_XLSLICERCACHE_HPP
13
14#include "OpenXLSX-Exports.hpp"
15#include "XLXmlFile.hpp"
16#include <string>
17#include <string_view>
18#include <vector>
19
20namespace OpenXLSX
21{
22 class OPENXLSX_EXPORT XLSlicerCache final : public XLXmlFile
23 {
24 public:
28 XLSlicerCache() : XLXmlFile(nullptr) {}
29
34
35 ~XLSlicerCache() = default;
36 XLSlicerCache(const XLSlicerCache& other) = default;
37 XLSlicerCache(XLSlicerCache&& other) noexcept = default;
38 XLSlicerCache& operator=(const XLSlicerCache& other) = default;
39 XLSlicerCache& operator=(XLSlicerCache&& other) noexcept = default;
40
44 std::string name() const;
45
49 void setName(std::string_view name);
50
54 std::string sourceName() const;
55
59 void setSourceName(std::string_view sourceName);
60
66 void syncWithPivotCache(const class XLPivotCacheDefinition& pivotCache, const std::vector<std::string>& selectedItems);
67 };
68} // namespace OpenXLSX
69
70#endif // OPENXLSX_XLSLICERCACHE_HPP
Definition XLPivotTable.hpp:421
XLSlicerCache(const XLSlicerCache &other)=default
XLSlicerCache()
Default constructor.
Definition XLSlicerCache.hpp:28
void setSourceName(std::string_view sourceName)
Set the source name.
Definition XLSlicerCache.cpp:37
XLSlicerCache(XLSlicerCache &&other) noexcept=default
XLSlicerCache & operator=(const XLSlicerCache &other)=default
void setName(std::string_view name)
Set the name of the slicer cache.
Definition XLSlicerCache.cpp:22
std::string sourceName() const
Get the source name (e.g. column name or pivot field name).
Definition XLSlicerCache.cpp:32
XLSlicerCache(XLXmlData *xmlData)
Constructor that wraps an XLXmlData pointer.
Definition XLSlicerCache.hpp:33
std::string name() const
Get the name of the slicer cache.
Definition XLSlicerCache.cpp:17
XLSlicerCache & operator=(XLSlicerCache &&other) noexcept=default
void syncWithPivotCache(const class XLPivotCacheDefinition &pivotCache, const std::vector< std::string > &selectedItems)
Synchronize selected filtering items with the pivot cache definition.
Definition XLSlicerCache.cpp:47
The XLXmlData class encapsulates the properties and behaviour of the .xml files in an ....
Definition XLXmlData.hpp:79
std::string xmlData(XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
Method for getting the XML data represented by the object.
Definition XLXmlFile.cpp:49
XLXmlFile()=default
Default constructor.
Definition IXLCellProvider.hpp:24