LibreOffice Module sax (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sax_fastparser::FastSerializerHelper Class Reference

#include <fshelper.hxx>

Public Member Functions

 FastSerializerHelper (const css::uno::Reference< css::io::XOutputStream > &xOutputStream, bool bWriteHeader)
 
 ~FastSerializerHelper ()
 
void startDocument ()
 
void endDocument ()
 
template<typename... Args>
void startElement (sal_Int32 elementTokenId, sal_Int32 attribute, const char *value, Args &&... args)
 Start an element. After the first argument there can be a number of (attribute, value) pairs. More...
 
template<typename... Args>
void startElement (sal_Int32 elementTokenId, sal_Int32 attribute, const std::optional< OString > &value, Args &&... args)
 
template<typename... Args>
void startElement (sal_Int32 elementTokenId, sal_Int32 attribute, const std::optional< OUString > &value, Args &&... args)
 
void startElement (sal_Int32 elementTokenId)
 
template<typename... Args>
void startElementNS (sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, Args &&... args)
 Start an element. After the first two arguments there can be a number of (attribute, value) pairs. More...
 
template<typename... Args>
void singleElement (sal_Int32 elementTokenId, sal_Int32 attribute, const char *value, Args &&... args)
 Create a single element. After the first argument there can be a number of (attribute, value) pairs. More...
 
template<typename... Args>
void singleElement (sal_Int32 elementTokenId, sal_Int32 attribute, const std::optional< OString > &value, Args &&... args)
 
template<typename... Args>
void singleElement (sal_Int32 elementTokenId, sal_Int32 attribute, const std::optional< OUString > &value, Args &&... args)
 
void singleElement (sal_Int32 elementTokenId)
 
template<typename... Args>
void singleElementNS (sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, Args &&... args)
 Create a single element. After the first two arguments there can be a number of (attribute, value) pairs. More...
 
void endElement (sal_Int32 elementTokenId)
 
void endElementNS (sal_Int32 namespaceTokenId, sal_Int32 elementTokenId)
 
void singleElement (sal_Int32 elementTokenId, const rtl::Reference< FastAttributeList > &xAttrList)
 
void startElement (sal_Int32 elementTokenId, const rtl::Reference< FastAttributeList > &xAttrList)
 
FastSerializerHelperwrite (const char *value)
 
FastSerializerHelperwrite (const OString &value)
 
FastSerializerHelperwrite (std::u16string_view value)
 
FastSerializerHelperwrite (sal_Int32 value)
 
FastSerializerHelperwrite (sal_Int64 value)
 
FastSerializerHelperwrite (double value)
 
FastSerializerHelperwriteEscaped (const char *value)
 
FastSerializerHelperwriteEscaped (std::u16string_view value)
 
FastSerializerHelperwriteId (sal_Int32 tokenId)
 
css::uno::Reference< css::io::XOutputStream > const & getOutputStream () const
 
void mark (sal_Int32 nTag, const css::uno::Sequence< sal_Int32 > &rOrder=css::uno::Sequence< sal_Int32 >())
 
void mergeTopMarks (sal_Int32 nTag, MergeMarks eMergeType=MergeMarks::APPEND)
 
void setAllowXEscape (bool bSet)
 

Static Public Member Functions

static rtl::Reference< FastAttributeListcreateAttrList ()
 

Private Member Functions

void pushAttributeValue (sal_Int32 attribute, const char *value)
 
void pushAttributeValue (sal_Int32 attribute, const OString &value)
 

Private Attributes

std::unique_ptr< FastSaxSerializermpSerializer
 

Detailed Description

Definition at line 45 of file fshelper.hxx.

Constructor & Destructor Documentation

◆ FastSerializerHelper()

sax_fastparser::FastSerializerHelper::FastSerializerHelper ( const css::uno::Reference< css::io::XOutputStream > &  xOutputStream,
bool  bWriteHeader 
)

Definition at line 29 of file fshelper.cxx.

References startDocument().

◆ ~FastSerializerHelper()

sax_fastparser::FastSerializerHelper::~FastSerializerHelper ( )

Definition at line 47 of file fshelper.cxx.

References endDocument(), and mpSerializer.

Member Function Documentation

◆ createAttrList()

rtl::Reference< FastAttributeList > sax_fastparser::FastSerializerHelper::createAttrList ( )
static

Definition at line 162 of file fshelper.cxx.

◆ endDocument()

void sax_fastparser::FastSerializerHelper::endDocument ( )

Definition at line 41 of file fshelper.cxx.

References mpSerializer.

Referenced by ~FastSerializerHelper().

◆ endElement()

void sax_fastparser::FastSerializerHelper::endElement ( sal_Int32  elementTokenId)

Definition at line 73 of file fshelper.cxx.

References mpSerializer.

◆ endElementNS()

void sax_fastparser::FastSerializerHelper::endElementNS ( sal_Int32  namespaceTokenId,
sal_Int32  elementTokenId 
)
inline

Definition at line 125 of file fshelper.hxx.

References FSNS().

◆ getOutputStream()

css::uno::Reference< css::io::XOutputStream > const & sax_fastparser::FastSerializerHelper::getOutputStream ( ) const

Definition at line 145 of file fshelper.cxx.

References mpSerializer.

◆ mark()

void sax_fastparser::FastSerializerHelper::mark ( sal_Int32  nTag,
const css::uno::Sequence< sal_Int32 > &  rOrder = css::uno::Sequence< sal_Int32 >() 
)

Definition at line 150 of file fshelper.cxx.

References mpSerializer.

◆ mergeTopMarks()

void sax_fastparser::FastSerializerHelper::mergeTopMarks ( sal_Int32  nTag,
MergeMarks  eMergeType = MergeMarks::APPEND 
)

Definition at line 156 of file fshelper.cxx.

References mpSerializer.

◆ pushAttributeValue() [1/2]

void sax_fastparser::FastSerializerHelper::pushAttributeValue ( sal_Int32  attribute,
const char *  value 
)
private

Definition at line 60 of file fshelper.cxx.

References attribute, mpSerializer, and value.

◆ pushAttributeValue() [2/2]

void sax_fastparser::FastSerializerHelper::pushAttributeValue ( sal_Int32  attribute,
const OString &  value 
)
private

Definition at line 64 of file fshelper.cxx.

References attribute, mpSerializer, and value.

◆ setAllowXEscape()

void sax_fastparser::FastSerializerHelper::setAllowXEscape ( bool  bSet)

Definition at line 167 of file fshelper.cxx.

References mpSerializer.

◆ singleElement() [1/5]

void sax_fastparser::FastSerializerHelper::singleElement ( sal_Int32  elementTokenId)

Definition at line 68 of file fshelper.cxx.

References mpSerializer.

◆ singleElement() [2/5]

void sax_fastparser::FastSerializerHelper::singleElement ( sal_Int32  elementTokenId,
const rtl::Reference< FastAttributeList > &  xAttrList 
)

Definition at line 84 of file fshelper.cxx.

References mpSerializer.

◆ singleElement() [3/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::singleElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const char *  value,
Args &&...  args 
)
inline

Create a single element. After the first argument there can be a number of (attribute, value) pairs.

Definition at line 92 of file fshelper.hxx.

References args, attribute, and value.

◆ singleElement() [4/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::singleElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const std::optional< OString > &  value,
Args &&...  args 
)
inline

Definition at line 99 of file fshelper.hxx.

References args, attribute, and value.

◆ singleElement() [5/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::singleElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const std::optional< OUString > &  value,
Args &&...  args 
)
inline

Definition at line 107 of file fshelper.hxx.

References args, attribute, and value.

◆ singleElementNS()

template<typename... Args>
void sax_fastparser::FastSerializerHelper::singleElementNS ( sal_Int32  namespaceTokenId,
sal_Int32  elementTokenId,
Args &&...  args 
)
inline

Create a single element. After the first two arguments there can be a number of (attribute, value) pairs.

Definition at line 119 of file fshelper.hxx.

References args, and FSNS().

◆ startDocument()

void sax_fastparser::FastSerializerHelper::startDocument ( )

Definition at line 36 of file fshelper.cxx.

References mpSerializer.

Referenced by FastSerializerHelper().

◆ startElement() [1/5]

void sax_fastparser::FastSerializerHelper::startElement ( sal_Int32  elementTokenId)

Definition at line 56 of file fshelper.cxx.

References mpSerializer.

◆ startElement() [2/5]

void sax_fastparser::FastSerializerHelper::startElement ( sal_Int32  elementTokenId,
const rtl::Reference< FastAttributeList > &  xAttrList 
)

Definition at line 78 of file fshelper.cxx.

References mpSerializer.

◆ startElement() [3/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::startElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const char *  value,
Args &&...  args 
)
inline

Start an element. After the first argument there can be a number of (attribute, value) pairs.

Definition at line 58 of file fshelper.hxx.

References args, attribute, and value.

◆ startElement() [4/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::startElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const std::optional< OString > &  value,
Args &&...  args 
)
inline

Definition at line 65 of file fshelper.hxx.

References args, attribute, and value.

◆ startElement() [5/5]

template<typename... Args>
void sax_fastparser::FastSerializerHelper::startElement ( sal_Int32  elementTokenId,
sal_Int32  attribute,
const std::optional< OUString > &  value,
Args &&...  args 
)
inline

Definition at line 73 of file fshelper.hxx.

References args, attribute, and value.

◆ startElementNS()

template<typename... Args>
void sax_fastparser::FastSerializerHelper::startElementNS ( sal_Int32  namespaceTokenId,
sal_Int32  elementTokenId,
Args &&...  args 
)
inline

Start an element. After the first two arguments there can be a number of (attribute, value) pairs.

Definition at line 85 of file fshelper.hxx.

References args, and FSNS().

◆ write() [1/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( const char *  value)

Definition at line 90 of file fshelper.cxx.

References mpSerializer, and value.

◆ write() [2/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( const OString &  value)

Definition at line 96 of file fshelper.cxx.

References mpSerializer, and value.

◆ write() [3/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( double  value)

Definition at line 120 of file fshelper.cxx.

References mpSerializer, and value.

◆ write() [4/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( sal_Int32  value)

Definition at line 108 of file fshelper.cxx.

References mpSerializer, and value.

◆ write() [5/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( sal_Int64  value)

Definition at line 114 of file fshelper.cxx.

References mpSerializer, and value.

◆ write() [6/6]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::write ( std::u16string_view  value)

Definition at line 102 of file fshelper.cxx.

References mpSerializer, and value.

◆ writeEscaped() [1/2]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::writeEscaped ( const char *  value)

Definition at line 126 of file fshelper.cxx.

References mpSerializer, and value.

◆ writeEscaped() [2/2]

FastSerializerHelper * sax_fastparser::FastSerializerHelper::writeEscaped ( std::u16string_view  value)

Definition at line 132 of file fshelper.cxx.

References mpSerializer, and value.

◆ writeId()

FastSerializerHelper * sax_fastparser::FastSerializerHelper::writeId ( sal_Int32  tokenId)

Definition at line 139 of file fshelper.cxx.

References mpSerializer.

Member Data Documentation

◆ mpSerializer

std::unique_ptr<FastSaxSerializer> sax_fastparser::FastSerializerHelper::mpSerializer
private

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