summaryrefslogtreecommitdiff
path: root/include/regexpr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/regexpr.h')
-rw-r--r--include/regexpr.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/regexpr.h b/include/regexpr.h
index fde1501c1..aecf38f5f 100644
--- a/include/regexpr.h
+++ b/include/regexpr.h
@@ -9,37 +9,36 @@
* Based on the original code of Services by Andy Church.
*/
-#ifndef REGEXPR_H
-#define REGEXPR_H
+#pragma once
#include "services.h"
#include "anope.h"
#include "service.h"
-class RegexException : public CoreException
+class CoreExport RegexException final
+ : public CoreException
{
- public:
+public:
RegexException(const Anope::string &reason = "") : CoreException(reason) { }
- virtual ~RegexException() throw() { }
+ virtual ~RegexException() noexcept = default;
};
class CoreExport Regex
{
Anope::string expression;
- protected:
+protected:
Regex(const Anope::string &expr) : expression(expr) { }
- public:
- virtual ~Regex() { }
+public:
+ virtual ~Regex() = default;
const Anope::string &GetExpression() { return expression; }
virtual bool Matches(const Anope::string &str) = 0;
};
-class CoreExport RegexProvider : public Service
+class CoreExport RegexProvider
+ : public Service
{
- public:
+public:
RegexProvider(Module *o, const Anope::string &n) : Service(o, "Regex", n) { }
virtual Regex *Compile(const Anope::string &) = 0;
};
-
-#endif // REGEXPR_H