LibreOffice Module oox (master) 1
Static Public Member Functions | List of all members
oox::ByteOrderConverter Class Reference

Provides platform independent functions to convert from or to little-endian byte order, e.g. More...

#include <helper.hxx>

Static Public Member Functions

template<typename Type >
static void convertLittleEndian (Type &)
 
template<typename Type >
static void convertLittleEndianArray (Type *, size_t)
 
template<typename Type >
static void writeLittleEndian (void *pDstBuffer, Type nValue)
 Writes a value to memory, while converting it to little-endian. More...
 

Detailed Description

Provides platform independent functions to convert from or to little-endian byte order, e.g.

for reading data from or writing data to memory or a binary stream.

On big-endian platforms, the byte order in the passed values is swapped, this can be used for converting big-endian to and from little-endian data.

On little-endian platforms, the conversion functions are implemented empty, thus compilers should completely optimize away the function call.

Definition at line 191 of file helper.hxx.

Member Function Documentation

◆ convertLittleEndian()

template<typename Type >
static void oox::ByteOrderConverter::convertLittleEndian ( Type )
inlinestatic

◆ convertLittleEndianArray()

template<typename Type >
static void oox::ByteOrderConverter::convertLittleEndianArray ( Type ,
size_t   
)
inlinestatic

◆ writeLittleEndian()

template<typename Type >
void oox::ByteOrderConverter::writeLittleEndian ( void *  pDstBuffer,
Type  nValue 
)
inlinestatic

Writes a value to memory, while converting it to little-endian.

Parameters
pDstBufferThe memory buffer to write the value to.
nValueThe value to be written to memory in little-endian.

Definition at line 239 of file helper.hxx.

References convertLittleEndian(), and nValue.

Referenced by oox::crypto::Standard2007Engine::calculateEncryptionKey(), oox::crypto::AgileEngine::decrypt(), oox::crypto::AgileEngine::encrypt(), and oox::crypto::AgileEngine::readEncryptionInfo().


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