ADTF  3.18.3
regularexpression_helper.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Classes

class  cStringPiece
 Class that represents string pieces. More...
 
class  cStringPiece::cStringPiecePrivate
 
struct  a_utils_enable_if< B, T >
 template for SFINAE selection of the right constructor More...
 
struct  a_utils_enable_if< true, T >
 
struct  a_utils_size_of_helper< T >
 template for handling sizeof(void) in SFINAE below (required for Visual Studio) More...
 
struct  a_utils_size_of_helper< tVoid >
 
class  cRegularExpressionArg
 Regular expression argument class. More...
 

Namespaces

 A_UTILS_NS
 ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
 

Macros

#define STRINGPIECE_BINARY_PREDICATE(cmp, auxcmp)
 
#define AEVREGEXP_DECLARE_INTEGER_PARSER(name)
 
#define REG_EXP_CONST_INTEGER(size, name)
 
#define REG_EXP_CONST_UNSIGNED_INTEGER(size, name)
 
#define REG_EXP_CONST_FLOAT(size, name)
 
#define A_UTILS_MAKE_INTEGER_PARSER_HELPER(size, parser, func, parser_name)
 This part of the parser, appropriate only for ints, deals with bases. More...
 
#define A_UTILS_MAKE_INTEGER_PARSER(size, parser)
 
#define A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER(size, parser, func, parser_name)
 
#define A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER(size, parser)
 

Typedefs

typedef tBool(* fnRegExpParser) (const tChar *str, tInt n, tVoid *dest)
 Type of regular expression parser function.
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file regularexpression_helper.h.

Macro Definition Documentation

◆ A_UTILS_MAKE_INTEGER_PARSER

#define A_UTILS_MAKE_INTEGER_PARSER (   size,
  parser 
)
Value:
A_UTILS_MAKE_INTEGER_PARSER_HELPER(size, parser, Hex, _hex) \
A_UTILS_MAKE_INTEGER_PARSER_HELPER(size, parser, Octal, _octal) \
A_UTILS_MAKE_INTEGER_PARSER_HELPER(size, parser, CRadix, _cradix)
#define A_UTILS_MAKE_INTEGER_PARSER_HELPER(size, parser, func, parser_name)
This part of the parser, appropriate only for ints, deals with bases.

Definition at line 597 of file regularexpression_helper.h.

◆ A_UTILS_MAKE_INTEGER_PARSER_HELPER

#define A_UTILS_MAKE_INTEGER_PARSER_HELPER (   size,
  parser,
  func,
  parser_name 
)
Value:
template<class T> \
inline cRegularExpressionArg func(T* pArg, \
typename a_utils_enable_if<std::numeric_limits<T>::is_integer, T>::type* = nullptr, \
typename a_utils_enable_if<std::numeric_limits<T>::is_signed, T>::type* = nullptr, \
typename a_utils_enable_if<a_utils_size_of_helper<T>::nSize == size, T>::type* = nullptr) \
{ \
return cRegularExpressionArg(pArg, cRegularExpressionArg::parse_tInt ## parser ## parser_name); \
} \

This part of the parser, appropriate only for ints, deals with bases.

Definition at line 587 of file regularexpression_helper.h.

◆ A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER

#define A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER (   size,
  parser 
)
Value:
A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER(size, parser, Hex, _hex) \
A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER(size, parser, Octal, _octal) \
A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER(size, parser, CRadix, _cradix)

Definition at line 612 of file regularexpression_helper.h.

◆ A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER

#define A_UTILS_MAKE_UNSIGNED_INTEGER_PARSER_HELPER (   size,
  parser,
  func,
  parser_name 
)
Value:
template<class T> \
inline cRegularExpressionArg func(T* pArg, \
typename a_utils_enable_if<std::numeric_limits<T>::is_integer, T>::type* = nullptr, \
typename a_utils_enable_if<!std::numeric_limits<T>::is_signed, T>::type* = nullptr, \
typename a_utils_enable_if<a_utils_size_of_helper<T>::nSize == size, T>::type* = nullptr) \
{ \
return cRegularExpressionArg(pArg, cRegularExpressionArg::parse_tUInt ## parser ## parser_name); \
} \

Definition at line 602 of file regularexpression_helper.h.

◆ AEVREGEXP_DECLARE_INTEGER_PARSER

#define AEVREGEXP_DECLARE_INTEGER_PARSER (   name)
Value:
private:\
static tBool parse_ ## name(const tChar* str, tInt n, tVoid* dest);\
static tBool parse_ ## name ## _radix(\
const tChar* str, tInt n, tVoid* dest, tInt radix);\
public:\
static tBool parse_ ## name ## _hex(const tChar* str, tInt n, tVoid* dest);\
static tBool parse_ ## name ## _octal(const tChar* str, tInt n, tVoid* dest);\
static tBool parse_ ## name ## _cradix(const tChar* str, tInt n, tVoid* dest)
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).

Definition at line 437 of file regularexpression_helper.h.

◆ REG_EXP_CONST_FLOAT

#define REG_EXP_CONST_FLOAT (   size,
  name 
)
Value:
template<class T> \
cRegularExpressionArg(T* pRef, fnRegExpParser parser = name, \
typename a_utils_enable_if<!std::numeric_limits<T>::is_integer, T>::type* = nullptr, \
typename a_utils_enable_if<a_utils_size_of_helper<T>::nSize == size, T>::type* = nullptr) \
: arg_(pRef), parser_(parser) {}
tBool(* fnRegExpParser)(const tChar *str, tInt n, tVoid *dest)
Type of regular expression parser function.

Definition at line 521 of file regularexpression_helper.h.

◆ REG_EXP_CONST_INTEGER

#define REG_EXP_CONST_INTEGER (   size,
  name 
)
Value:
template<class T> \
cRegularExpressionArg(T* pRef, fnRegExpParser parser = name, \
typename a_utils_enable_if<std::numeric_limits<T>::is_integer, T>::type* = nullptr, \
typename a_utils_enable_if<std::numeric_limits<T>::is_signed, T>::type* = nullptr, \
typename a_utils_enable_if<a_utils_size_of_helper<T>::nSize == size, T>::type* = nullptr) \
: arg_(pRef), parser_(parser) {}

Definition at line 505 of file regularexpression_helper.h.

◆ REG_EXP_CONST_UNSIGNED_INTEGER

#define REG_EXP_CONST_UNSIGNED_INTEGER (   size,
  name 
)
Value:
template<class T> \
cRegularExpressionArg(T* pRef, fnRegExpParser parser = name, \
typename a_utils_enable_if<std::numeric_limits<T>::is_integer, T>::type* = nullptr, \
typename a_utils_enable_if<!std::numeric_limits<T>::is_signed, T>::type* = nullptr, \
typename a_utils_enable_if<a_utils_size_of_helper<T>::nSize == size, T>::type* = nullptr) \
: arg_(pRef), parser_(parser) {}

Definition at line 513 of file regularexpression_helper.h.

◆ STRINGPIECE_BINARY_PREDICATE

#define STRINGPIECE_BINARY_PREDICATE (   cmp,
  auxcmp 
)
Value:
tBool operator cmp (const cStringPiece& x) const {\
tInt r = cMemoryBlock::MemCmp(ptr_, x.ptr_, length_ < x.length_ ? length_ : x.length_);\
return ((r auxcmp 0) || ((r == 0) && (length_ cmp x.length_)));\
}

Definition at line 268 of file regularexpression_helper.h.