MRPT custom INI file parser to allow minimal file preprocessing:
Definition at line 2061 of file SimpleIni.h.
#include <utils/simpleini/SimpleIni.h>
Classes | |
struct | ParseContext |
Public Member Functions | |
MRPT_IniFileParser () | |
MRPT_IniFileParser (const MRPT_IniFileParser &rhs) | |
MRPT_IniFileParser & | operator= (const MRPT_IniFileParser &rhs) |
virtual size_t | SizeFromStore (const char *a_pInputData, size_t a_uInputDataLen) MRPT_OVERRIDE |
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, char *a_pOutputData, size_t a_uOutputDataSize) MRPT_OVERRIDE |
Convert the input string from the storage format to SI_CHAR. More... | |
size_t | SizeToStore (const char *a_pInputData) |
Calculate the number of char required by the storage format of this data. More... | |
bool | ConvertToStore (const char *a_pInputData, char *a_pOutputData, size_t a_uOutputDataSize) |
Convert the input string to the storage format of this data. More... | |
Private Member Functions | |
std::string | parse_process_var_eval (const ParseContext &pc, std::string expr) |
void | parse_process_var_define (ParseContext &pc, const std::string &var_name, const std::string &var_value) |
size_t | do_parse (const char *in_str, const size_t in_len, char *out_str) |
Shared code for the two virtual methods. More... | |
|
inline |
Definition at line 2063 of file SimpleIni.h.
|
inline |
Definition at line 2066 of file SimpleIni.h.
References mrpt::utils::simpleini::SI_ConvertA< SI_CHAR >::operator=().
|
inlinevirtual |
Convert the input string from the storage format to SI_CHAR.
The storage format is always UTF-8 or MBCS.
a_pInputData | Data in storage format to be converted to SI_CHAR. |
a_uInputDataLen | Length 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_pOutputData | Pointer to the output buffer to received the converted data. |
a_uOutputDataSize | Size of the output buffer in SI_CHAR. |
Reimplemented from mrpt::utils::simpleini::SI_ConvertA< char >.
Definition at line 2080 of file SimpleIni.h.
References do_parse().
|
inlineinherited |
Convert the input string to the storage format of this data.
The storage format is always UTF-8 or MBCS.
a_pInputData | NULL terminated source string to convert. All of the data will be converted including the terminating NULL character. |
a_pOutputData | Pointer to the buffer to receive the converted string. |
a_uOutputDataSize | Size of the output buffer in char. |
Definition at line 2041 of file SimpleIni.h.
References mrpt::system::os::memcpy().
|
inlineprivate |
Shared code for the two virtual methods.
If out_str==NULL, just count output bytes
Definition at line 2134 of file SimpleIni.h.
References mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::defined_vars, mrpt::mrpt::format(), mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::line_count, parse_process_var_define(), and parse_process_var_eval().
Referenced by ConvertFromStore(), and SizeFromStore().
|
inline |
Definition at line 2067 of file SimpleIni.h.
References mrpt::utils::simpleini::SI_ConvertA< SI_CHAR >::operator=().
|
inlineprivate |
Definition at line 2123 of file SimpleIni.h.
References mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::defined_vars, mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::defined_vars_values, and parse_process_var_eval().
Referenced by do_parse().
|
inlineprivate |
Definition at line 2099 of file SimpleIni.h.
References mrpt::math::CRuntimeCompiledExpression::compile(), mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::defined_vars_values, mrpt::math::CRuntimeCompiledExpression::eval(), mrpt::mrpt::format(), mrpt::utils::simpleini::MRPT_IniFileParser::ParseContext::line_count, and mrpt::system::trim().
Referenced by do_parse(), and parse_process_var_define().
|
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.
a_pInputData | Data in storage format to be converted to SI_CHAR. |
a_uInputDataLen | Length of storage format data in bytes. This must be the actual length of the data, including NULL byte if NULL terminated string is required. |
Reimplemented from mrpt::utils::simpleini::SI_ConvertA< char >.
Definition at line 2072 of file SimpleIni.h.
References do_parse(), and SI_ASSERT.
|
inlineinherited |
Calculate the number of char required by the storage format of this data.
The storage format is always UTF-8 or MBCS.
a_pInputData | NULL terminated string to calculate the number of bytes required to be converted to storage format. |
Definition at line 2021 of file SimpleIni.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.5 Git: e06b63dbf Fri Dec 1 14:41:11 2017 +0100 at lun oct 28 01:31:35 CET 2019 |