Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SI_ConvertW< SI_CHAR > Class Template Reference

#include <SimpleIni.h>

Public Member Functions

bool ConvertFromStore (const char *a_pInputData, size_t a_uInputDataLen, SI_CHAR *a_pOutputData, size_t a_uOutputDataSize)
 
bool ConvertToStore (const SI_CHAR *a_pInputData, char *a_pOutputData, size_t a_uOutputDataSize)
 
SI_ConvertWoperator= (const SI_ConvertW &rhs)
 
 SI_ConvertW (bool a_bStoreIsUtf8)
 
 SI_ConvertW (const SI_ConvertW &rhs)
 
size_t SizeFromStore (const char *a_pInputData, size_t a_uInputDataLen)
 
size_t SizeToStore (const SI_CHAR *a_pInputData)
 

Protected Member Functions

 SI_ConvertW ()
 

Private Attributes

bool m_bStoreIsUtf8
 

Detailed Description

template<class SI_CHAR>
class SI_ConvertW< SI_CHAR >

Converts UTF-8 to a wchar_t (or equivalent) using the Unicode reference library functions. This can be used on all platforms.

Definition at line 2800 of file SimpleIni.h.

Constructor & Destructor Documentation

◆ SI_ConvertW() [1/3]

template<class SI_CHAR >
SI_ConvertW< SI_CHAR >::SI_ConvertW ( )
inlineprotected

Definition at line 2803 of file SimpleIni.h.

◆ SI_ConvertW() [2/3]

template<class SI_CHAR >
SI_ConvertW< SI_CHAR >::SI_ConvertW ( bool  a_bStoreIsUtf8)
inline

Definition at line 2805 of file SimpleIni.h.

◆ SI_ConvertW() [3/3]

template<class SI_CHAR >
SI_ConvertW< SI_CHAR >::SI_ConvertW ( const SI_ConvertW< SI_CHAR > &  rhs)
inline

Definition at line 2808 of file SimpleIni.h.

Member Function Documentation

◆ ConvertFromStore()

template<class SI_CHAR >
bool SI_ConvertW< SI_CHAR >::ConvertFromStore ( const char *  a_pInputData,
size_t  a_uInputDataLen,
SI_CHAR *  a_pOutputData,
size_t  a_uOutputDataSize 
)
inline

Convert the input string from the storage format to SI_CHAR. The storage format is always UTF-8 or MBCS.

Parameters
a_pInputDataData in storage format to be converted to SI_CHAR.
a_uInputDataLenLength of storage format data in bytes. This must be the actual length of the data, including NULL byte if NULL terminated string is required.
a_pOutputDataPointer to the output buffer to received the converted data.
a_uOutputDataSizeSize of the output buffer in SI_CHAR.
Returns
true if all of the input data was successfully converted.

Definition at line 2857 of file SimpleIni.h.

◆ ConvertToStore()

template<class SI_CHAR >
bool SI_ConvertW< SI_CHAR >::ConvertToStore ( const SI_CHAR *  a_pInputData,
char *  a_pOutputData,
size_t  a_uOutputDataSize 
)
inline

Convert the input string to the storage format of this data. The storage format is always UTF-8 or MBCS.

Parameters
a_pInputDataNULL terminated source string to convert. All of the data will be converted including the terminating NULL character.
a_pOutputDataPointer to the buffer to receive the converted string.
a_uOutputDataSizeSize of the output buffer in char.
Returns
true if all of the input data, including the terminating NULL character was successfully converted.

Definition at line 2937 of file SimpleIni.h.

◆ operator=()

template<class SI_CHAR >
SI_ConvertW& SI_ConvertW< SI_CHAR >::operator= ( const SI_ConvertW< SI_CHAR > &  rhs)
inline

Definition at line 2809 of file SimpleIni.h.

◆ SizeFromStore()

template<class SI_CHAR >
size_t SI_ConvertW< SI_CHAR >::SizeFromStore ( const char *  a_pInputData,
size_t  a_uInputDataLen 
)
inline

Calculate the number of SI_CHAR required for converting the input from the storage format. The storage format is always UTF-8 or MBCS.

Parameters
a_pInputDataData in storage format to be converted to SI_CHAR.
a_uInputDataLenLength of storage format data in bytes. This must be the actual length of the data, including NULL byte if NULL terminated string is required.
Returns
Number of SI_CHAR required by the string when converted. If there are embedded NULL bytes in the input data, only the string up and not including the NULL byte will be converted.
-1 cast to size_t on a conversion error.

Definition at line 2827 of file SimpleIni.h.

◆ SizeToStore()

template<class SI_CHAR >
size_t SI_ConvertW< SI_CHAR >::SizeToStore ( const SI_CHAR *  a_pInputData)
inline

Calculate the number of char required by the storage format of this data. The storage format is always UTF-8 or MBCS.

Parameters
a_pInputDataNULL terminated string to calculate the number of bytes required to be converted to storage format.
Returns
Number of bytes required by the string when converted to storage format. This size always includes space for the terminating NULL character.
-1 cast to size_t on a conversion error.

Definition at line 2904 of file SimpleIni.h.

Member Data Documentation

◆ m_bStoreIsUtf8

template<class SI_CHAR >
bool SI_ConvertW< SI_CHAR >::m_bStoreIsUtf8
private

Definition at line 2801 of file SimpleIni.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:26