MRPT  2.0.1
List of all members | Public Member Functions
mrpt::config::simpleini::SI_ConvertA< SI_CHAR > Class Template Reference

Detailed Description

template<class SI_CHAR>
class mrpt::config::simpleini::SI_ConvertA< SI_CHAR >

Null conversion class for MBCS/UTF-8 to char (or equivalent).

Definition at line 1990 of file SimpleIni.h.

#include <simpleini/SimpleIni.h>

Inheritance diagram for mrpt::config::simpleini::SI_ConvertA< SI_CHAR >:

Public Member Functions

 SI_ConvertA ()
 
 SI_ConvertA (const SI_ConvertA &rhs)
 
SI_ConvertAoperator= (const SI_ConvertA &rhs)
 
virtual size_t SizeFromStore (const char *a_pInputData, size_t a_uInputDataLen)
 Calculate the number of SI_CHAR required for converting the input from the storage format. More...
 
virtual bool ConvertFromStore (const char *a_pInputData, size_t a_uInputDataLen, SI_CHAR *a_pOutputData, size_t a_uOutputDataSize)
 Convert the input string from the storage format to SI_CHAR. More...
 
size_t SizeToStore (const SI_CHAR *a_pInputData)
 Calculate the number of char required by the storage format of this data. More...
 
bool ConvertToStore (const SI_CHAR *a_pInputData, char *a_pOutputData, size_t a_uOutputDataSize)
 Convert the input string to the storage format of this data. More...
 

Constructor & Destructor Documentation

◆ SI_ConvertA() [1/2]

template<class SI_CHAR>
mrpt::config::simpleini::SI_ConvertA< SI_CHAR >::SI_ConvertA ( )
inline

Definition at line 1993 of file SimpleIni.h.

◆ SI_ConvertA() [2/2]

template<class SI_CHAR>
mrpt::config::simpleini::SI_ConvertA< SI_CHAR >::SI_ConvertA ( const SI_ConvertA< SI_CHAR > &  rhs)
inline

Definition at line 1995 of file SimpleIni.h.

Member Function Documentation

◆ ConvertFromStore()

template<class SI_CHAR>
virtual bool mrpt::config::simpleini::SI_ConvertA< SI_CHAR >::ConvertFromStore ( const char *  a_pInputData,
size_t  a_uInputDataLen,
SI_CHAR *  a_pOutputData,
size_t  a_uOutputDataSize 
)
inlinevirtual

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 nullptr byte if nullptr 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.

Reimplemented in mrpt::config::simpleini::MRPT_IniFileParser.

Definition at line 2036 of file SimpleIni.h.

◆ ConvertToStore()

template<class SI_CHAR>
bool mrpt::config::simpleini::SI_ConvertA< 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_pInputDatanullptr terminated source string to convert. All of the data will be converted including the terminating nullptr 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 nullptr character was successfully converted.

Definition at line 2079 of file SimpleIni.h.

◆ operator=()

template<class SI_CHAR>
SI_ConvertA& mrpt::config::simpleini::SI_ConvertA< SI_CHAR >::operator= ( const SI_ConvertA< SI_CHAR > &  rhs)
inline

Definition at line 1996 of file SimpleIni.h.

Referenced by mrpt::config::simpleini::MRPT_IniFileParser::MRPT_IniFileParser(), mrpt::config::simpleini::MRPT_IniFileParser::operator=(), and mrpt::config::simpleini::SI_ConvertA< char >::SI_ConvertA().

Here is the caller graph for this function:

◆ SizeFromStore()

template<class SI_CHAR>
virtual size_t mrpt::config::simpleini::SI_ConvertA< SI_CHAR >::SizeFromStore ( const char *  a_pInputData,
size_t  a_uInputDataLen 
)
inlinevirtual

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 nullptr byte if nullptr terminated string is required.
Returns
Number of SI_CHAR required by the string when converted. If there are embedded nullptr bytes in the input data, only the string up and not including the nullptr byte will be converted.
-1 cast to size_t on a conversion error.

Reimplemented in mrpt::config::simpleini::MRPT_IniFileParser.

Definition at line 2012 of file SimpleIni.h.

◆ SizeToStore()

template<class SI_CHAR>
size_t mrpt::config::simpleini::SI_ConvertA< 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_pInputDatanullptr 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 nullptr character.
-1 cast to size_t on a conversion error.

Definition at line 2060 of file SimpleIni.h.




Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020