LibreOffice Module sax (master) 1
|
#include <fastattribs.hxx>
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< UnknownAttribute > | maUnknownAttributes |
FastTokenHandlerBase * | mpTokenHandler |
Definition at line 75 of file fastattribs.hxx.
sax_fastparser::FastAttributeList::FastAttributeList | ( | sax_fastparser::FastTokenHandlerBase * | pTokenHandler | ) |
Definition at line 58 of file fastattribs.cxx.
References maAttributeValues, mnChunkLength, and mpChunk.
Referenced by createClone().
sax_fastparser::FastAttributeList::FastAttributeList | ( | const css::uno::Reference< css::xml::sax::XFastAttributeList > & | xAttrList | ) |
Definition at line 67 of file fastattribs.cxx.
References sax_fastparser::castToFastAttributeList(), maAttributeTokens, maAttributeValues, maUnknownAttributes, mnChunkLength, mpChunk, and mpTokenHandler.
|
overridevirtual |
Definition at line 84 of file fastattribs.cxx.
References mpChunk.
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().
void sax_fastparser::FastAttributeList::add | ( | const FastAttributeList & | rOther | ) |
Definition at line 154 of file fastattribs.cxx.
References add(), addUnknown(), getAsViewByIndex(), i, maAttributeTokens, and maUnknownAttributes.
|
inline |
void sax_fastparser::FastAttributeList::add | ( | sal_Int32 | nToken, |
std::string_view | value | ||
) |
Definition at line 97 of file fastattribs.cxx.
References maAttributeTokens, maAttributeValues, mnChunkLength, mpChunk, nToken, p, SAL_MAX_INT32, and value.
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().
|
inline |
Definition at line 95 of file fastattribs.hxx.
References nToken.
void sax_fastparser::FastAttributeList::addNS | ( | sal_Int32 | nNamespaceToken, |
sal_Int32 | nToken, | ||
std::string_view | sValue | ||
) |
Definition at line 125 of file fastattribs.cxx.
void sax_fastparser::FastAttributeList::addNS | ( | sal_Int32 | nNamespaceToken, |
sal_Int32 | nToken, | ||
std::u16string_view | sValue | ||
) |
Definition at line 131 of file fastattribs.cxx.
void sax_fastparser::FastAttributeList::addUnknown | ( | const OString & | rName, |
const OString & | value | ||
) |
Definition at line 143 of file fastattribs.cxx.
References maUnknownAttributes, and value.
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().
|
inline |
Definition at line 107 of file fastattribs.hxx.
References i.
Referenced by sax_fastparser::FastAttributeList::FastAttributeIter::getLength(), sax_fastparser::FastAttributeList::FastAttributeIter::isEmpty(), and sax_fastparser::FastSaxSerializer::writeFastAttributeList().
|
inline |
Definition at line 224 of file fastattribs.hxx.
void sax_fastparser::FastAttributeList::clear | ( | ) |
Definition at line 89 of file fastattribs.cxx.
References maAttributeTokens, maAttributeValues, and maUnknownAttributes.
|
override |
Definition at line 79 of file fastattribs.cxx.
References FastAttributeList().
|
inline |
Definition at line 225 of file fastattribs.hxx.
Referenced by 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.
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().
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.
|
inline |
Definition at line 114 of file fastattribs.hxx.
References o3tl::toInt32().
Referenced by getAsInteger(), and sax_fastparser::FastAttributeList::FastAttributeIter::toInt32().
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.
|
inline |
Definition at line 118 of file fastattribs.hxx.
Referenced by add(), getAsDouble(), getAsView(), getOptionalValueToken(), getValueToken(), sax_fastparser::FastAttributeList::FastAttributeIter::toDouble(), and sax_fastparser::FastAttributeList::FastAttributeIter::toView().
|
inline |
Definition at line 139 of file fastattribs.hxx.
References i.
|
overridevirtual |
Definition at line 261 of file fastattribs.cxx.
References aSeq, getValueByIndex(), i, maAttributeTokens, and n.
|
inline |
Definition at line 105 of file fastattribs.hxx.
Referenced by sax_fastparser::FastSaxSerializer::writeFastAttributeList().
|
inline |
Definition at line 106 of file fastattribs.hxx.
References nIndex.
Referenced by sax_fastparser::FastAttributeList::FastAttributeIter::isString(), sax_fastparser::FastAttributeList::FastAttributeIter::toBoolean(), sax_fastparser::FastAttributeList::FastAttributeIter::toCString(), and sax_fastparser::FastSaxSerializer::writeFastAttributeList().
|
overridevirtual |
Definition at line 242 of file fastattribs.cxx.
References getValueByIndex(), i, maAttributeTokens, and n.
|
override |
Definition at line 183 of file fastattribs.cxx.
References Default, getAsViewByIndex(), sax_fastparser::FastTokenHandlerBase::getTokenFromChars(), i, maAttributeTokens, mpTokenHandler, and n.
|
overridevirtual |
Definition at line 250 of file fastattribs.cxx.
References aSeq, Attribute, and maUnknownAttributes.
|
overridevirtual |
Definition at line 233 of file fastattribs.cxx.
References Any, getValueByIndex(), i, maAttributeTokens, and n.
|
inline |
Definition at line 122 of file fastattribs.hxx.
Referenced by getFastAttributes(), getOptionalValue(), getValue(), and sax_fastparser::FastAttributeList::FastAttributeIter::toString().
|
override |
Definition at line 172 of file fastattribs.cxx.
References Any, getAsViewByIndex(), sax_fastparser::FastTokenHandlerBase::getTokenFromChars(), i, maAttributeTokens, mpTokenHandler, and n.
|
overridevirtual |
Definition at line 163 of file fastattribs.cxx.
References i, and maAttributeTokens.
|
inline |
Definition at line 83 of file fastattribs.hxx.
|
inline |
Definition at line 108 of file fastattribs.hxx.
|
private |
Definition at line 235 of file fastattribs.hxx.
Referenced by add(), clear(), FastAttributeList(), find(), getAsDouble(), getAsInteger(), getAsView(), getFastAttributes(), sax_fastparser::FastAttributeList::FastAttributeIter::getLength(), getOptionalValue(), getOptionalValueToken(), sax_fastparser::FastAttributeList::FastAttributeIter::getToken(), getValue(), getValueToken(), hasAttribute(), sax_fastparser::FastAttributeList::FastAttributeIter::isEmpty(), sax_fastparser::FastAttributeList::FastAttributeIter::isString(), sax_fastparser::FastAttributeList::FastAttributeIter::toBoolean(), sax_fastparser::FastAttributeList::FastAttributeIter::toCString(), sax_fastparser::FastAttributeList::FastAttributeIter::toDouble(), sax_fastparser::FastAttributeList::FastAttributeIter::toInt32(), sax_fastparser::FastAttributeList::FastAttributeIter::toString(), and sax_fastparser::FastAttributeList::FastAttributeIter::toView().
|
private |
Definition at line 234 of file fastattribs.hxx.
Referenced by add(), clear(), and FastAttributeList().
|
private |
Definition at line 236 of file fastattribs.hxx.
Referenced by add(), addUnknown(), clear(), FastAttributeList(), and getUnknownAttributes().
|
private |
size of allocated memory for mpChunk
Definition at line 230 of file fastattribs.hxx.
Referenced by add(), and FastAttributeList().
|
private |
buffer to store all attribute values - null terminated strings
Definition at line 229 of file fastattribs.hxx.
Referenced by add(), FastAttributeList(), and ~FastAttributeList().
|
private |
Definition at line 237 of file fastattribs.hxx.
Referenced by FastAttributeList(), getOptionalValueToken(), and getValueToken().