OpenXLSX 1.10.0
Loading...
Searching...
No Matches
OpenXLSX::XLSlicerCache Class Referencefinal

#include <XLSlicerCache.hpp>

Inheritance diagram for OpenXLSX::XLSlicerCache:
OpenXLSX::XLXmlFile

Public Member Functions

 XLSlicerCache ()
 Default constructor.
 
 XLSlicerCache (XLXmlData *xmlData)
 Constructor that wraps an XLXmlData pointer.
 
 ~XLSlicerCache ()=default
 
 XLSlicerCache (const XLSlicerCache &other)=default
 
 XLSlicerCache (XLSlicerCache &&other) noexcept=default
 
XLSlicerCacheoperator= (const XLSlicerCache &other)=default
 
XLSlicerCacheoperator= (XLSlicerCache &&other) noexcept=default
 
std::string name () const
 Get the name of the slicer cache.
 
void setName (std::string_view name)
 Set the name of the slicer cache.
 
std::string sourceName () const
 Get the source name (e.g. column name or pivot field name).
 
void setSourceName (std::string_view sourceName)
 Set the source name.
 
void syncWithPivotCache (const class XLPivotCacheDefinition &pivotCache, const std::vector< std::string > &selectedItems)
 Synchronize selected filtering items with the pivot cache definition.
 
- Public Member Functions inherited from OpenXLSX::XLXmlFile
 XLXmlFile ()=default
 Default constructor.
 
std::string xmlData (XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const
 Method for getting the XML data represented by the object.
 
 XLXmlFile (XLXmlData *xmlData)
 Constructor. Creates an object based on the xmlData input.
 
 XLXmlFile (const XLXmlFile &other)=default
 Copy constructor. Default implementation used.
 
 XLXmlFile (XLXmlFile &&other) noexcept=default
 Move constructor. Default implementation used.
 
 ~XLXmlFile ()=default
 Destructor. Default implementation used.
 
bool valid () const
 check whether class is linked to a valid XML file
 
XLXmlFileoperator= (const XLXmlFile &other)=default
 The copy assignment operator. The default implementation has been used.
 
XLXmlFileoperator= (XLXmlFile &&other) noexcept=default
 The move assignment operator. The default implementation has been used.
 
XLDocumentparentDoc ()
 This function provides access to the parent XLDocument object.
 
const XLDocumentparentDoc () const
 This function provides access to the parent XLDocument object.
 
XMLDocumentxmlDocument ()
 This function provides access to the underlying XMLDocument object.
 
const XMLDocumentxmlDocument () const
 This function provides access to the underlying XMLDocument object.
 
std::string getXmlPath () const
 Retrieve the path of the XML data in the .xlsx zip archive via m_xmlData->getXmlPath.
 

Additional Inherited Members

- Protected Member Functions inherited from OpenXLSX::XLXmlFile
void setXmlData (std::string_view xmlData)
 Provide the XML data represented by the object.
 
std::string relationshipID () const
 This function returns the relationship ID (the ID used in the XLRelationships objects) for the object.
 
- Protected Attributes inherited from OpenXLSX::XLXmlFile
XLXmlDatam_xmlData {nullptr}
 

Constructor & Destructor Documentation

◆ XLSlicerCache() [1/4]

OpenXLSX::XLSlicerCache::XLSlicerCache ( )
inline

Default constructor.

◆ XLSlicerCache() [2/4]

OpenXLSX::XLSlicerCache::XLSlicerCache ( XLXmlData xmlData)
inlineexplicit

Constructor that wraps an XLXmlData pointer.

◆ ~XLSlicerCache()

OpenXLSX::XLSlicerCache::~XLSlicerCache ( )
default

◆ XLSlicerCache() [3/4]

OpenXLSX::XLSlicerCache::XLSlicerCache ( const XLSlicerCache other)
default

◆ XLSlicerCache() [4/4]

OpenXLSX::XLSlicerCache::XLSlicerCache ( XLSlicerCache &&  other)
defaultnoexcept

Member Function Documentation

◆ name()

std::string XLSlicerCache::name ( ) const

Get the name of the slicer cache.

◆ operator=() [1/2]

XLSlicerCache & OpenXLSX::XLSlicerCache::operator= ( const XLSlicerCache other)
default

◆ operator=() [2/2]

XLSlicerCache & OpenXLSX::XLSlicerCache::operator= ( XLSlicerCache &&  other)
defaultnoexcept

◆ setName()

void XLSlicerCache::setName ( std::string_view  name)

Set the name of the slicer cache.

◆ setSourceName()

void XLSlicerCache::setSourceName ( std::string_view  sourceName)

Set the source name.

◆ sourceName()

std::string XLSlicerCache::sourceName ( ) const

Get the source name (e.g. column name or pivot field name).

◆ syncWithPivotCache()

void XLSlicerCache::syncWithPivotCache ( const class XLPivotCacheDefinition pivotCache,
const std::vector< std::string > &  selectedItems 
)

Synchronize selected filtering items with the pivot cache definition.

Parameters
pivotCacheThe pivot table's cache definition containing all fields and shared items.
selectedItemsList of items that should be selected/filtered. If empty, all items are selected.

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