API documentation¶
#include <textparser.h>
Type definitions¶
-
typedef char const *ccp¶
Pointer to a constant string.
Functions¶
Types¶
-
template<class T, size_t base>
struct Number¶ Integer number.
- Template Parameters
T – Integer type.
base – Integer base.
Class definitions¶
-
class TextParser¶
Line based text parser.
Public Functions
-
inline TextParser(ccpc delimiter, ccpc eol)¶
Constructor.
- Parameters
delimiter – [in] Field delimiter.
eol – [in] Line delimiter.
-
void parse(char &result, ccpc begin, ccpc end) const¶
Parse a field.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
void parse(double &result, ccpc begin, ccpc end) const¶
Parse a field.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
void parse(float &result, ccpc begin, ccpc end) const¶
Parse a field.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
template<size_t n>
void parse(char (&result)[n], ccpc begin, ccpc end) const¶ Parse a field.
- Template Parameters
n – String length.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
template<ccp truth>
void parse(Bool<truth> &result, ccpc begin, ccpc end) const¶ Parse a field.
- Template Parameters
truth – Truth value.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
template<class T, size_t base>
void parse(Number<T, base> &result, ccpc begin, ccpc end) const¶ Parse a field.
- Template Parameters
T – Integer type.
base – Integer base.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
template<class T, ccp *labels>
void parse(Category<T, labels> &result, ccpc begin, ccpc end) const¶ Parse a field.
- Template Parameters
T – Integer type.
labels – Labels.
- Parameters
result – [out] Result.
begin – [in] Pointer to C string.
end – [in] Pointer to end of C string.
-
inline TextParser(ccpc delimiter, ccpc eol)¶