LibreOffice Module xmloff (master) 1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
xmloff::token::TokenMap Class Reference

#include <fasttokenhandler.hxx>

Public Member Functions

 TokenMap ()
 
 ~TokenMap ()
 
css::uno::Sequence< sal_Int8 > const & getUtf8TokenName (sal_Int32 nToken) const
 Returns the UTF-8 name of the passed token identifier as byte sequence. More...
 
const OUString & getTokenName (sal_Int32 nToken) const
 

Static Public Member Functions

static sal_Int32 getTokenFromUtf8 (const css::uno::Sequence< sal_Int8 > &rUtf8Name)
 Returns the token identifier for the passed UTF-8 token name. More...
 
static sal_Int32 getTokenFromUTF8 (const char *pToken, sal_Int32 nLength)
 Returns the token identifier for a UTF-8 string. More...
 

Static Private Member Functions

static sal_Int32 getTokenPerfectHash (const char *pToken, sal_Int32 nLength)
 

Private Attributes

std::vector< css::uno::Sequence< sal_Int8 > > maTokenNamesUtf8
 
std::vector< OUString > maTokenNames
 

Static Private Attributes

static const css::uno::Sequence< sal_Int8EMPTY_BYTE_SEQ
 
static const OUString EMPTY_STRING
 

Detailed Description

Definition at line 21 of file fasttokenhandler.hxx.

Constructor & Destructor Documentation

◆ TokenMap()

xmloff::token::TokenMap::TokenMap ( )
explicit

Definition at line 44 of file fasttokenhandler.cxx.

References i, maTokenNames, and maTokenNamesUtf8.

◆ ~TokenMap()

xmloff::token::TokenMap::~TokenMap ( )

Definition at line 66 of file fasttokenhandler.cxx.

Member Function Documentation

◆ getTokenFromUTF8()

static sal_Int32 xmloff::token::TokenMap::getTokenFromUTF8 ( const char *  pToken,
sal_Int32  nLength 
)
inlinestatic

Returns the token identifier for a UTF-8 string.

Definition at line 52 of file fasttokenhandler.hxx.

References getTokenPerfectHash(), and nLength.

Referenced by xmloff::token::FastTokenHandler::getTokenDirect(), and getTokenFromUtf8().

◆ getTokenFromUtf8()

static sal_Int32 xmloff::token::TokenMap::getTokenFromUtf8 ( const css::uno::Sequence< sal_Int8 > &  rUtf8Name)
inlinestatic

Returns the token identifier for the passed UTF-8 token name.

Definition at line 45 of file fasttokenhandler.hxx.

References getTokenFromUTF8().

◆ getTokenName()

const OUString & xmloff::token::TokenMap::getTokenName ( sal_Int32  nToken) const
inline

◆ getTokenPerfectHash()

sal_Int32 xmloff::token::TokenMap::getTokenPerfectHash ( const char *  pToken,
sal_Int32  nLength 
)
staticprivate

Definition at line 70 of file fasttokenhandler.cxx.

References nLength, and xmloff::token::XML_TOKEN_INVALID.

Referenced by getTokenFromUTF8().

◆ getUtf8TokenName()

css::uno::Sequence< sal_Int8 > const & xmloff::token::TokenMap::getUtf8TokenName ( sal_Int32  nToken) const
inline

Returns the UTF-8 name of the passed token identifier as byte sequence.

Definition at line 28 of file fasttokenhandler.hxx.

References EMPTY_BYTE_SEQ, maTokenNamesUtf8, nToken, and SAL_WARN_IF.

Referenced by xmloff::token::FastTokenHandler::getUTF8Identifier().

Member Data Documentation

◆ EMPTY_BYTE_SEQ

const css::uno::Sequence< sal_Int8 > xmloff::token::TokenMap::EMPTY_BYTE_SEQ
staticprivate

Definition at line 63 of file fasttokenhandler.hxx.

Referenced by getUtf8TokenName().

◆ EMPTY_STRING

const OUString xmloff::token::TokenMap::EMPTY_STRING
staticprivate

Definition at line 64 of file fasttokenhandler.hxx.

Referenced by getTokenName().

◆ maTokenNames

std::vector< OUString > xmloff::token::TokenMap::maTokenNames
private

Definition at line 61 of file fasttokenhandler.hxx.

Referenced by getTokenName(), and TokenMap().

◆ maTokenNamesUtf8

std::vector< css::uno::Sequence< sal_Int8 > > xmloff::token::TokenMap::maTokenNamesUtf8
private

Definition at line 60 of file fasttokenhandler.hxx.

Referenced by getUtf8TokenName(), and TokenMap().


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