LibreOffice Module sax (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
sax_fastparser::FastAttributeList Class Referencefinal

#include <fastattribs.hxx>

Inheritance diagram for sax_fastparser::FastAttributeList:
[legend]
Collaboration diagram for sax_fastparser::FastAttributeList:
[legend]

Classes

class  FastAttributeIter
 Use for fast iteration and conversion of attributes. More...
 

Public Member Functions

 FastAttributeList (FastTokenHandlerBase *pTokenHandler)
 
 FastAttributeList (const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
 
virtual ~FastAttributeList () override
 
void clear ()
 
void reserve (sal_Int32 nNumTokens)
 
void add (const FastAttributeList &)
 
void add (const css::uno::Reference< css::xml::sax::XFastAttributeList > &)
 
void add (sal_Int32 nToken, std::string_view value)
 
void add (sal_Int32 nToken, std::u16string_view sValue)
 
template<typename C , typename T1 , typename T2 >
void add (sal_Int32 nToken, rtl::StringConcat< C, T1, T2 > &&value)
 
template<typename Val , typename... Rest, std::enable_if_t<(sizeof...(Rest) > 0), int > = 0>
void add (sal_Int32 nToken, Val &&val, Rest &&... rest)
 
void addNS (sal_Int32 nNamespaceToken, sal_Int32 nToken, std::string_view sValue)
 
void addNS (sal_Int32 nNamespaceToken, sal_Int32 nToken, std::u16string_view sValue)
 
void addUnknown (const OUString &rNamespaceURL, const OString &rQName, const OString &value)
 
void addUnknown (const OString &rName, const OString &value)
 
const std::vector< sal_Int32 > & getFastAttributeTokens () const
 
const char * getFastAttributeValue (size_t nIndex) const
 
sal_Int32 AttributeValueLength (size_t i) const
 
size_t size () const
 
bool getAsInteger (sal_Int32 nToken, sal_Int32 &rInt) const
 
bool getAsDouble (sal_Int32 nToken, double &rDouble) const
 
bool getAsView (sal_Int32 nToken, std::string_view &rPos) const
 
sal_Int32 getAsIntegerByIndex (sal_Int32 nTokenIndex) const
 
std::string_view getAsViewByIndex (sal_Int32 nTokenIndex) const
 
OUString getValueByIndex (sal_Int32 nTokenIndex) const
 
virtual sal_Bool SAL_CALL hasAttribute (::sal_Int32 Token) override
 
virtual ::sal_Int32 SAL_CALL getValueToken (::sal_Int32 Token) override
 
virtual ::sal_Int32 SAL_CALL getOptionalValueToken (::sal_Int32 Token, ::sal_Int32 Default) override
 
virtual OUString SAL_CALL getValue (::sal_Int32 Token) override
 
virtual OUString SAL_CALL getOptionalValue (::sal_Int32 Token) override
 
virtual css::uno::Sequence< css::xml::Attribute > SAL_CALL getUnknownAttributes () override
 
virtual css::uno::Sequence< css::xml::FastAttribute > SAL_CALL getFastAttributes () override
 
virtual ::css::uno::Reference< ::css::util::XCloneable > SAL_CALL createClone () override
 
sal_Int32 getAttributeIndex (::sal_Int32 Token)
 
FastAttributeIter begin () const
 
FastAttributeIter end () const
 
FastAttributeIter find (sal_Int32 nToken) const
 

Private Attributes

char * mpChunk
 buffer to store all attribute values - null terminated strings More...
 
sal_Int32 mnChunkLength
 size of allocated memory for mpChunk More...
 
std::vector< sal_Int32 > maAttributeValues
 
std::vector< sal_Int32 > maAttributeTokens
 
std::vector< UnknownAttributemaUnknownAttributes
 
FastTokenHandlerBasempTokenHandler
 

Detailed Description

Definition at line 75 of file fastattribs.hxx.

Constructor & Destructor Documentation

◆ FastAttributeList() [1/2]

sax_fastparser::FastAttributeList::FastAttributeList ( sax_fastparser::FastTokenHandlerBase pTokenHandler)

Definition at line 58 of file fastattribs.cxx.

References maAttributeValues, mnChunkLength, and mpChunk.

Referenced by createClone().

◆ FastAttributeList() [2/2]

sax_fastparser::FastAttributeList::FastAttributeList ( const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList)

◆ ~FastAttributeList()

sax_fastparser::FastAttributeList::~FastAttributeList ( )
overridevirtual

Definition at line 84 of file fastattribs.cxx.

References mpChunk.

Member Function Documentation

◆ add() [1/6]

void sax_fastparser::FastAttributeList::add ( const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList)

Definition at line 148 of file fastattribs.cxx.

References add(), and sax_fastparser::castToFastAttributeList().

◆ add() [2/6]

void sax_fastparser::FastAttributeList::add ( const FastAttributeList rOther)

Definition at line 154 of file fastattribs.cxx.

References add(), addUnknown(), getAsViewByIndex(), i, maAttributeTokens, and maUnknownAttributes.

Referenced by add(), and addNS().

◆ add() [3/6]

template<typename C , typename T1 , typename T2 >
void sax_fastparser::FastAttributeList::add ( sal_Int32  nToken,
rtl::StringConcat< C, T1, T2 > &&  value 
)
inline

Definition at line 93 of file fastattribs.hxx.

References add(), nToken, and value.

Referenced by add().

◆ add() [4/6]

void sax_fastparser::FastAttributeList::add ( sal_Int32  nToken,
std::string_view  value 
)

◆ add() [5/6]

void sax_fastparser::FastAttributeList::add ( sal_Int32  nToken,
std::u16string_view  sValue 
)

Definition at line 120 of file fastattribs.cxx.

References add(), nToken, and OUStringToOString().

◆ add() [6/6]

template<typename Val , typename... Rest, std::enable_if_t<(sizeof...(Rest) > 0), int > = 0>
void sax_fastparser::FastAttributeList::add ( sal_Int32  nToken,
Val &&  val,
Rest &&...  rest 
)
inline

Definition at line 95 of file fastattribs.hxx.

References nToken.

◆ addNS() [1/2]

void sax_fastparser::FastAttributeList::addNS ( sal_Int32  nNamespaceToken,
sal_Int32  nToken,
std::string_view  sValue 
)

Definition at line 125 of file fastattribs.cxx.

References add(), and nToken.

◆ addNS() [2/2]

void sax_fastparser::FastAttributeList::addNS ( sal_Int32  nNamespaceToken,
sal_Int32  nToken,
std::u16string_view  sValue 
)

Definition at line 131 of file fastattribs.cxx.

References add(), and nToken.

◆ addUnknown() [1/2]

void sax_fastparser::FastAttributeList::addUnknown ( const OString &  rName,
const OString &  value 
)

Definition at line 143 of file fastattribs.cxx.

References maUnknownAttributes, and value.

◆ addUnknown() [2/2]

void sax_fastparser::FastAttributeList::addUnknown ( const OUString &  rNamespaceURL,
const OString &  rQName,
const OString &  value 
)

Definition at line 138 of file fastattribs.cxx.

References maUnknownAttributes, and value.

Referenced by add().

◆ AttributeValueLength()

sal_Int32 sax_fastparser::FastAttributeList::AttributeValueLength ( size_t  i) const
inline

◆ begin()

FastAttributeIter sax_fastparser::FastAttributeList::begin ( ) const
inline

Definition at line 224 of file fastattribs.hxx.

◆ clear()

void sax_fastparser::FastAttributeList::clear ( )

Definition at line 89 of file fastattribs.cxx.

References maAttributeTokens, maAttributeValues, and maUnknownAttributes.

◆ createClone()

css::uno::Reference<::css::util::XCloneable > sax_fastparser::FastAttributeList::createClone ( )
override

Definition at line 79 of file fastattribs.cxx.

References FastAttributeList().

◆ end()

FastAttributeIter sax_fastparser::FastAttributeList::end ( ) const
inline

Definition at line 225 of file fastattribs.hxx.

Referenced by find().

◆ find()

FastAttributeList::FastAttributeIter sax_fastparser::FastAttributeList::find ( sal_Int32  nToken) const

Definition at line 274 of file fastattribs.cxx.

References end(), i, maAttributeTokens, n, and nToken.

◆ getAsDouble()

bool sax_fastparser::FastAttributeList::getAsDouble ( sal_Int32  nToken,
double &  rDouble 
) const

Definition at line 207 of file fastattribs.cxx.

References getAsViewByIndex(), i, maAttributeTokens, n, nToken, and o3tl::toDouble().

◆ getAsInteger()

bool sax_fastparser::FastAttributeList::getAsInteger ( sal_Int32  nToken,
sal_Int32 &  rInt 
) const

Definition at line 195 of file fastattribs.cxx.

References getAsIntegerByIndex(), i, maAttributeTokens, n, and nToken.

◆ getAsIntegerByIndex()

sal_Int32 sax_fastparser::FastAttributeList::getAsIntegerByIndex ( sal_Int32  nTokenIndex) const
inline

◆ getAsView()

bool sax_fastparser::FastAttributeList::getAsView ( sal_Int32  nToken,
std::string_view &  rPos 
) const

Definition at line 219 of file fastattribs.cxx.

References getAsViewByIndex(), i, maAttributeTokens, n, and nToken.

◆ getAsViewByIndex()

std::string_view sax_fastparser::FastAttributeList::getAsViewByIndex ( sal_Int32  nTokenIndex) const
inline

◆ getAttributeIndex()

sal_Int32 sax_fastparser::FastAttributeList::getAttributeIndex ( ::sal_Int32  Token)
inline

Definition at line 139 of file fastattribs.hxx.

References i.

◆ getFastAttributes()

Sequence< FastAttribute > sax_fastparser::FastAttributeList::getFastAttributes ( )
overridevirtual

Definition at line 261 of file fastattribs.cxx.

References aSeq, getValueByIndex(), i, maAttributeTokens, and n.

◆ getFastAttributeTokens()

const std::vector< sal_Int32 > & sax_fastparser::FastAttributeList::getFastAttributeTokens ( ) const
inline

◆ getFastAttributeValue()

const char * sax_fastparser::FastAttributeList::getFastAttributeValue ( size_t  nIndex) const
inline

◆ getOptionalValue()

OUString sax_fastparser::FastAttributeList::getOptionalValue ( ::sal_Int32  Token)
overridevirtual

Definition at line 242 of file fastattribs.cxx.

References getValueByIndex(), i, maAttributeTokens, and n.

◆ getOptionalValueToken()

sal_Int32 sax_fastparser::FastAttributeList::getOptionalValueToken ( ::sal_Int32  Token,
::sal_Int32  Default 
)
override

◆ getUnknownAttributes()

Sequence< Attribute > sax_fastparser::FastAttributeList::getUnknownAttributes ( )
overridevirtual

Definition at line 250 of file fastattribs.cxx.

References aSeq, Attribute, and maUnknownAttributes.

◆ getValue()

OUString sax_fastparser::FastAttributeList::getValue ( ::sal_Int32  Token)
overridevirtual

Definition at line 233 of file fastattribs.cxx.

References Any, getValueByIndex(), i, maAttributeTokens, and n.

◆ getValueByIndex()

OUString sax_fastparser::FastAttributeList::getValueByIndex ( sal_Int32  nTokenIndex) const
inline

◆ getValueToken()

sal_Int32 sax_fastparser::FastAttributeList::getValueToken ( ::sal_Int32  Token)
override

◆ hasAttribute()

sal_Bool sax_fastparser::FastAttributeList::hasAttribute ( ::sal_Int32  Token)
overridevirtual

Definition at line 163 of file fastattribs.cxx.

References i, and maAttributeTokens.

◆ reserve()

void sax_fastparser::FastAttributeList::reserve ( sal_Int32  nNumTokens)
inline

Definition at line 83 of file fastattribs.hxx.

◆ size()

size_t sax_fastparser::FastAttributeList::size ( ) const
inline

Definition at line 108 of file fastattribs.hxx.

Member Data Documentation

◆ maAttributeTokens

std::vector< sal_Int32 > sax_fastparser::FastAttributeList::maAttributeTokens
private

◆ maAttributeValues

std::vector< sal_Int32 > sax_fastparser::FastAttributeList::maAttributeValues
private

Definition at line 234 of file fastattribs.hxx.

Referenced by add(), clear(), and FastAttributeList().

◆ maUnknownAttributes

std::vector< UnknownAttribute > sax_fastparser::FastAttributeList::maUnknownAttributes
private

Definition at line 236 of file fastattribs.hxx.

Referenced by add(), addUnknown(), clear(), FastAttributeList(), and getUnknownAttributes().

◆ mnChunkLength

sal_Int32 sax_fastparser::FastAttributeList::mnChunkLength
private

size of allocated memory for mpChunk

Definition at line 230 of file fastattribs.hxx.

Referenced by add(), and FastAttributeList().

◆ mpChunk

char* sax_fastparser::FastAttributeList::mpChunk
private

buffer to store all attribute values - null terminated strings

Definition at line 229 of file fastattribs.hxx.

Referenced by add(), FastAttributeList(), and ~FastAttributeList().

◆ mpTokenHandler

FastTokenHandlerBase* sax_fastparser::FastAttributeList::mpTokenHandler
private

Definition at line 237 of file fastattribs.hxx.

Referenced by FastAttributeList(), getOptionalValueToken(), and getValueToken().


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