mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Add YAML_CPP_API decorator to RegEx class and friend operators. (#407)
This commit is contained in:

committed by
Jesse Beder

parent
f0b15cd6a0
commit
519d33fea3
@@ -10,6 +10,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "yaml-cpp/dll.h"
|
||||||
|
|
||||||
namespace YAML {
|
namespace YAML {
|
||||||
class Stream;
|
class Stream;
|
||||||
|
|
||||||
@@ -26,7 +28,7 @@ enum REGEX_OP {
|
|||||||
// simplified regular expressions
|
// simplified regular expressions
|
||||||
// . Only straightforward matches (no repeated characters)
|
// . Only straightforward matches (no repeated characters)
|
||||||
// . Only matches from start of string
|
// . Only matches from start of string
|
||||||
class RegEx {
|
class YAML_CPP_API RegEx {
|
||||||
public:
|
public:
|
||||||
RegEx();
|
RegEx();
|
||||||
RegEx(char ch);
|
RegEx(char ch);
|
||||||
@@ -34,10 +36,10 @@ class RegEx {
|
|||||||
RegEx(const std::string& str, REGEX_OP op = REGEX_SEQ);
|
RegEx(const std::string& str, REGEX_OP op = REGEX_SEQ);
|
||||||
~RegEx() {}
|
~RegEx() {}
|
||||||
|
|
||||||
friend RegEx operator!(const RegEx& ex);
|
friend YAML_CPP_API RegEx operator!(const RegEx& ex);
|
||||||
friend RegEx operator||(const RegEx& ex1, const RegEx& ex2);
|
friend YAML_CPP_API RegEx operator||(const RegEx& ex1, const RegEx& ex2);
|
||||||
friend RegEx operator&&(const RegEx& ex1, const RegEx& ex2);
|
friend YAML_CPP_API RegEx operator&&(const RegEx& ex1, const RegEx& ex2);
|
||||||
friend RegEx operator+(const RegEx& ex1, const RegEx& ex2);
|
friend YAML_CPP_API RegEx operator+(const RegEx& ex1, const RegEx& ex2);
|
||||||
|
|
||||||
bool Matches(char ch) const;
|
bool Matches(char ch) const;
|
||||||
bool Matches(const std::string& str) const;
|
bool Matches(const std::string& str) const;
|
||||||
|
Reference in New Issue
Block a user