From d52f685ee2774bdd900f1d6de5a8086aa0fc8f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 18 Feb 2019 18:18:07 +0200 Subject: [PATCH] MXS-2302: Rename hintfilter objects Renamed the objects to camelcase variants. --- .../modules/filter/hintfilter/hintfilter.cc | 20 ++++++++--------- .../modules/filter/hintfilter/hintparser.cc | 2 +- server/modules/filter/hintfilter/mysqlhint.hh | 22 +++++++++---------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/server/modules/filter/hintfilter/hintfilter.cc b/server/modules/filter/hintfilter/hintfilter.cc index 33bd62252..7c20d9c30 100644 --- a/server/modules/filter/hintfilter/hintfilter.cc +++ b/server/modules/filter/hintfilter/hintfilter.cc @@ -27,31 +27,31 @@ */ // static -HINT_INSTANCE* HINT_INSTANCE::create(const char* zName, MXS_CONFIG_PARAMETER* ppParams) +HintInstance* HintInstance::create(const char* zName, MXS_CONFIG_PARAMETER* ppParams) { - return new(std::nothrow) HINT_INSTANCE; + return new(std::nothrow) HintInstance; } -HINT_SESSION* HINT_INSTANCE::newSession(MXS_SESSION* pSession) +HintSession* HintInstance::newSession(MXS_SESSION* pSession) { - return new(std::nothrow) HINT_SESSION(pSession); + return new(std::nothrow) HintSession(pSession); } -void HINT_INSTANCE::diagnostics(DCB* pDcb) const +void HintInstance::diagnostics(DCB* pDcb) const { } -json_t* HINT_INSTANCE::diagnostics_json() const +json_t* HintInstance::diagnostics_json() const { return nullptr; } -uint64_t HINT_INSTANCE::getCapabilities() +uint64_t HintInstance::getCapabilities() { return RCAP_TYPE_CONTIGUOUS_INPUT; } -HINT_SESSION::HINT_SESSION(MXS_SESSION* session) +HintSession::HintSession(MXS_SESSION* session) : mxs::FilterSession(session) { } @@ -66,7 +66,7 @@ HINT_SESSION::HINT_SESSION(MXS_SESSION* session) * @param session The filter session * @param queue The query data */ -int HINT_SESSION::routeQuery(GWBUF* queue) +int HintSession::routeQuery(GWBUF* queue) { if (modutil_is_SQL(queue) && gwbuf_length(queue) > 5) { @@ -97,7 +97,7 @@ extern "C" "A hint parsing filter", "V1.0.0", RCAP_TYPE_CONTIGUOUS_INPUT, - &HINT_INSTANCE::s_object, + &HintInstance::s_object, NULL, /* Process init. */ NULL, /* Process finish. */ NULL, /* Thread init. */ diff --git a/server/modules/filter/hintfilter/hintparser.cc b/server/modules/filter/hintfilter/hintparser.cc index 94bbdcea8..93e90e8a3 100644 --- a/server/modules/filter/hintfilter/hintparser.cc +++ b/server/modules/filter/hintfilter/hintparser.cc @@ -412,7 +412,7 @@ HintParser::~HintParser() } } -void HINT_SESSION::process_hints(GWBUF* buffer) +void HintSession::process_hints(GWBUF* buffer) { mxs::Buffer buf(buffer); HINT* hint = m_parser.parse(std::next(buf.begin(), 5), buf.end()); diff --git a/server/modules/filter/hintfilter/mysqlhint.hh b/server/modules/filter/hintfilter/mysqlhint.hh index 035885c57..213f5e5fa 100644 --- a/server/modules/filter/hintfilter/mysqlhint.hh +++ b/server/modules/filter/hintfilter/mysqlhint.hh @@ -16,16 +16,16 @@ #include #include -class HINT_SESSION; +class HintSession; -class HINT_INSTANCE : public mxs::Filter +class HintInstance : public mxs::Filter { public: - static HINT_INSTANCE* create(const char* zName, MXS_CONFIG_PARAMETER* ppParams); - HINT_SESSION* newSession(MXS_SESSION* pSession); - void diagnostics(DCB* pDcb) const; - json_t* diagnostics_json() const; - uint64_t getCapabilities(); + static HintInstance* create(const char* zName, MXS_CONFIG_PARAMETER* ppParams); + HintSession* newSession(MXS_SESSION* pSession); + void diagnostics(DCB* pDcb) const; + json_t* diagnostics_json() const; + uint64_t getCapabilities(); }; enum TOKEN_VALUE @@ -79,13 +79,13 @@ private: HINT* parse_one(InputIter begin, InputIter end); }; -class HINT_SESSION : public mxs::FilterSession +class HintSession : public mxs::FilterSession { public: - HINT_SESSION(const HINT_SESSION&) = delete; - HINT_SESSION& operator=(const HINT_SESSION&) = delete; + HintSession(const HintSession&) = delete; + HintSession& operator=(const HintSession&) = delete; - HINT_SESSION(MXS_SESSION* session); + HintSession(MXS_SESSION* session); int routeQuery(GWBUF* queue); private: