MXS-2302: Rename hintfilter objects

Renamed the objects to camelcase variants.
This commit is contained in:
Markus Mäkelä 2019-02-18 18:18:07 +02:00
parent e5299e1eab
commit d52f685ee2
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
3 changed files with 22 additions and 22 deletions

View File

@ -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. */

View File

@ -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());

View File

@ -16,16 +16,16 @@
#include <maxscale/hint.h>
#include <maxscale/filter.hh>
class HINT_SESSION;
class HintSession;
class HINT_INSTANCE : public mxs::Filter<HINT_INSTANCE, HINT_SESSION>
class HintInstance : public mxs::Filter<HintInstance, HintSession>
{
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: