From 8813420838836cf75947161b81c47b596212ad3f Mon Sep 17 00:00:00 2001 From: Joseph Langley Date: Sun, 14 Aug 2016 19:17:51 -0400 Subject: [PATCH 1/3] Add YAML_CPP_API decorators to RegEx class and friend operators. --- src/regex_yaml.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/regex_yaml.h b/src/regex_yaml.h index 3fa7327..2491c16 100644 --- a/src/regex_yaml.h +++ b/src/regex_yaml.h @@ -10,6 +10,8 @@ #include #include +#include "yaml-cpp\dll.h" + namespace YAML { class Stream; @@ -26,7 +28,7 @@ enum REGEX_OP { // simplified regular expressions // . Only straightforward matches (no repeated characters) // . Only matches from start of string -class RegEx { +class YAML_CPP_API RegEx { public: RegEx(); RegEx(char ch); @@ -34,10 +36,10 @@ class RegEx { RegEx(const std::string& str, REGEX_OP op = REGEX_SEQ); ~RegEx() {} - friend RegEx operator!(const RegEx& ex); - friend RegEx operator||(const RegEx& ex1, const RegEx& ex2); - friend 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& ex); + friend YAML_CPP_API RegEx operator||(const RegEx& ex1, const RegEx& ex2); + friend YAML_CPP_API 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(const std::string& str) const; From ec9833149963b48287b5b4d53fde8a4082e6e414 Mon Sep 17 00:00:00 2001 From: Joseph Langley Date: Sun, 14 Aug 2016 20:46:31 -0400 Subject: [PATCH 2/3] Fix path separator error in regex_yaml.h --- src/regex_yaml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex_yaml.h b/src/regex_yaml.h index 2491c16..8f28b85 100644 --- a/src/regex_yaml.h +++ b/src/regex_yaml.h @@ -10,7 +10,7 @@ #include #include -#include "yaml-cpp\dll.h" +#include "yaml-cpp/dll.h" namespace YAML { class Stream; From e68b1e6702c29c43d08825334a77f100dd2be532 Mon Sep 17 00:00:00 2001 From: Joseph Langley Date: Sun, 14 Aug 2016 19:17:51 -0400 Subject: [PATCH 3/3] Add YAML_CPP_API decorators to RegEx class and friend operators. --- src/regex_yaml.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/regex_yaml.h b/src/regex_yaml.h index 3fa7327..8f28b85 100644 --- a/src/regex_yaml.h +++ b/src/regex_yaml.h @@ -10,6 +10,8 @@ #include #include +#include "yaml-cpp/dll.h" + namespace YAML { class Stream; @@ -26,7 +28,7 @@ enum REGEX_OP { // simplified regular expressions // . Only straightforward matches (no repeated characters) // . Only matches from start of string -class RegEx { +class YAML_CPP_API RegEx { public: RegEx(); RegEx(char ch); @@ -34,10 +36,10 @@ class RegEx { RegEx(const std::string& str, REGEX_OP op = REGEX_SEQ); ~RegEx() {} - friend RegEx operator!(const RegEx& ex); - friend RegEx operator||(const RegEx& ex1, const RegEx& ex2); - friend 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& ex); + friend YAML_CPP_API RegEx operator||(const RegEx& ex1, const RegEx& ex2); + friend YAML_CPP_API 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(const std::string& str) const;