1 #ifndef REGEX_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 #define REGEX_H_62B23520_7C8E_11DE_8A39_0800200C9A66 4 #if defined(_MSC_VER) || \ 5 (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ 6 (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 13 #include "yaml-cpp/dll.h" 31 class YAML_CPP_API RegEx {
34 explicit RegEx(
char ch);
35 RegEx(
char a,
char z);
36 RegEx(
const std::string& str, REGEX_OP op = REGEX_SEQ);
39 friend YAML_CPP_API RegEx operator!(
const RegEx& ex);
40 friend YAML_CPP_API RegEx operator|(
const RegEx& ex1,
const RegEx& ex2);
41 friend YAML_CPP_API RegEx operator&(
const RegEx& ex1,
const RegEx& ex2);
42 friend YAML_CPP_API RegEx operator+(
const RegEx& ex1,
const RegEx& ex2);
44 bool Matches(
char ch)
const;
45 bool Matches(
const std::string& str)
const;
46 bool Matches(
const Stream& in)
const;
47 template <
typename Source>
48 bool Matches(
const Source& source)
const;
50 int Match(
const std::string& str)
const;
51 int Match(
const Stream& in)
const;
52 template <
typename Source>
53 int Match(
const Source& source)
const;
56 explicit RegEx(REGEX_OP op);
58 template <
typename Source>
59 bool IsValidSource(
const Source& source)
const;
60 template <
typename Source>
61 int MatchUnchecked(
const Source& source)
const;
63 template <
typename Source>
64 int MatchOpEmpty(
const Source& source)
const;
65 template <
typename Source>
66 int MatchOpMatch(
const Source& source)
const;
67 template <
typename Source>
68 int MatchOpRange(
const Source& source)
const;
69 template <
typename Source>
70 int MatchOpOr(
const Source& source)
const;
71 template <
typename Source>
72 int MatchOpAnd(
const Source& source)
const;
73 template <
typename Source>
74 int MatchOpNot(
const Source& source)
const;
75 template <
typename Source>
76 int MatchOpSeq(
const Source& source)
const;
82 std::vector<RegEx> m_params;
86 #include "regeximpl.h" 88 #endif // REGEX_H_62B23520_7C8E_11DE_8A39_0800200C9A66