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 23 of file fasttokenhandler.hxx.

Constructor & Destructor Documentation

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

Definition at line 38 of file fasttokenhandler.cxx.

References i, maTokenNames, and maTokenNamesUtf8.

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

Definition at line 60 of file fasttokenhandler.cxx.

Member Function Documentation

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 47 of file fasttokenhandler.hxx.

References 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 54 of file fasttokenhandler.hxx.

References getTokenPerfectHash().

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

const OUString& xmloff::token::TokenMap::getTokenName ( sal_Int32  nToken) const
inline
sal_Int32 xmloff::token::TokenMap::getTokenPerfectHash ( const char *  pToken,
sal_Int32  nLength 
)
staticprivate

Definition at line 64 of file fasttokenhandler.cxx.

References xmloff::token::XML_TOKEN_INVALID.

Referenced by getTokenFromUTF8().

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 30 of file fasttokenhandler.hxx.

References EMPTY_BYTE_SEQ, maTokenNamesUtf8, and SAL_WARN_IF.

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

Member Data Documentation

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

Definition at line 65 of file fasttokenhandler.hxx.

Referenced by getUtf8TokenName().

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

Definition at line 66 of file fasttokenhandler.hxx.

Referenced by getTokenName().

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

Definition at line 63 of file fasttokenhandler.hxx.

Referenced by getTokenName(), and TokenMap().

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

Definition at line 62 of file fasttokenhandler.hxx.

Referenced by getUtf8TokenName(), and TokenMap().


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