OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
OpenXLSX::XLPackageServices Class Referenceabstract

Abstract package services port (archive + XML parts + relationships + content types). More...

#include <XLPackageServices.hpp>

Inheritance diagram for OpenXLSX::XLPackageServices:
OpenXLSX::XLDocument

Public Member Functions

virtual ~XLPackageServices ()=default
virtual IZipArchive & archive ()=0
virtual const IZipArchive & archive () const =0
virtual XLContentTypes & contentTypes ()=0
virtual const XLContentTypes & contentTypes () const =0
virtual XLXmlData * findXmlPart (std::string_view path, bool doNotThrow=false)=0
 Locate a managed XML part by package path (e.g. "xl/pivotCache/pivotCacheDefinition1.xml").
virtual const XLXmlData * findXmlPart (std::string_view path, bool doNotThrow=false) const =0
virtual XLXmlData * emplaceXmlPart (const std::string &path, const std::string &id, XLContentType type)=0
 Create and register a new managed XML part in the document's part list.
virtual XLRelationships & workbookRelationships ()=0
virtual XLRelationships xmlRelationships (std::string_view xmlPath)=0
 Relationships for an arbitrary package XML part (…/_rels/name.xml.rels).
virtual XLRelationships drawingRelationships (std::string_view drawingPath)=0
 Relationships for a drawing part.

Detailed Description

Abstract package services port (archive + XML parts + relationships + content types).

Note
Implementations must outlive any object that stores a pointer/reference to them. XLDocument is the primary implementation.

Constructor & Destructor Documentation

◆ ~XLPackageServices()

virtual OpenXLSX::XLPackageServices::~XLPackageServices ( )
virtualdefault

Member Function Documentation

◆ archive() [1/2]

virtual const IZipArchive & OpenXLSX::XLPackageServices::archive ( ) const
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ archive() [2/2]

virtual IZipArchive & OpenXLSX::XLPackageServices::archive ( )
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ contentTypes() [1/2]

virtual const XLContentTypes & OpenXLSX::XLPackageServices::contentTypes ( ) const
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ contentTypes() [2/2]

virtual XLContentTypes & OpenXLSX::XLPackageServices::contentTypes ( )
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ drawingRelationships()

virtual XLRelationships OpenXLSX::XLPackageServices::drawingRelationships ( std::string_view drawingPath)
nodiscardpure virtual

Relationships for a drawing part.

Implemented in OpenXLSX::XLDocument.

◆ emplaceXmlPart()

virtual XLXmlData * OpenXLSX::XLPackageServices::emplaceXmlPart ( const std::string & path,
const std::string & id,
XLContentType type )
pure virtual

Create and register a new managed XML part in the document's part list.

Implemented in OpenXLSX::XLDocument.

◆ findXmlPart() [1/2]

virtual const XLXmlData * OpenXLSX::XLPackageServices::findXmlPart ( std::string_view path,
bool doNotThrow = false ) const
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ findXmlPart() [2/2]

virtual XLXmlData * OpenXLSX::XLPackageServices::findXmlPart ( std::string_view path,
bool doNotThrow = false )
nodiscardpure virtual

Locate a managed XML part by package path (e.g. "xl/pivotCache/pivotCacheDefinition1.xml").

Parameters
doNotThrowWhen true, return nullptr if missing instead of throwing.

Implemented in OpenXLSX::XLDocument.

◆ workbookRelationships()

virtual XLRelationships & OpenXLSX::XLPackageServices::workbookRelationships ( )
nodiscardpure virtual

Implemented in OpenXLSX::XLDocument.

◆ xmlRelationships()

virtual XLRelationships OpenXLSX::XLPackageServices::xmlRelationships ( std::string_view xmlPath)
nodiscardpure virtual

Relationships for an arbitrary package XML part (…/_rels/name.xml.rels).

Implemented in OpenXLSX::XLDocument.


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