diff --git a/src/ripple/beast/insight/Base.h b/src/ripple/beast/insight/Base.h deleted file mode 100644 index f12dce93bc..0000000000 --- a/src/ripple/beast/insight/Base.h +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_INSIGHT_BASE_H_INCLUDED -#define BEAST_INSIGHT_BASE_H_INCLUDED - -#include - -namespace beast { -namespace insight { - -/** Base for all metrics and hooks. */ -class Base -{ -public: - virtual ~Base () = 0; - Base() = default; - Base(Base const&) = default; - Base& operator=(Base const&) = default; -}; - -} -} - -#endif diff --git a/src/ripple/beast/insight/BaseImpl.h b/src/ripple/beast/insight/BaseImpl.h deleted file mode 100644 index 4deb3a46be..0000000000 --- a/src/ripple/beast/insight/BaseImpl.h +++ /dev/null @@ -1,43 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_INSIGHT_BASEIMPL_H_INCLUDED -#define BEAST_INSIGHT_BASEIMPL_H_INCLUDED - -#include -#include -#include -#include - -namespace beast { -namespace insight { - -/** Base for all metrics and hook implementations. */ -class BaseImpl -{ -public: - using ptr = std::shared_ptr ; - - virtual ~BaseImpl () = 0; -}; - -} -} - -#endif diff --git a/src/ripple/beast/insight/Counter.h b/src/ripple/beast/insight/Counter.h index aec4bf9cf0..8661a00306 100644 --- a/src/ripple/beast/insight/Counter.h +++ b/src/ripple/beast/insight/Counter.h @@ -20,7 +20,6 @@ #ifndef BEAST_INSIGHT_COUNTER_H_INCLUDED #define BEAST_INSIGHT_COUNTER_H_INCLUDED -#include #include #include @@ -36,7 +35,7 @@ namespace insight { This is a lightweight reference wrapper which is cheap to copy and assign. When the last reference goes away, the metric is no longer collected. */ -class Counter : public Base +class Counter final { public: using value_type = CounterImpl::value_type; @@ -108,13 +107,6 @@ public: increment (-1); return *this; } - /** @} */ - - std::shared_ptr const& - impl () const - { - return m_impl; - } private: std::shared_ptr m_impl; diff --git a/src/ripple/beast/insight/CounterImpl.h b/src/ripple/beast/insight/CounterImpl.h index f30e3a35ce..383032fdad 100644 --- a/src/ripple/beast/insight/CounterImpl.h +++ b/src/ripple/beast/insight/CounterImpl.h @@ -20,7 +20,8 @@ #ifndef BEAST_INSIGHT_COUNTERIMPL_H_INCLUDED #define BEAST_INSIGHT_COUNTERIMPL_H_INCLUDED -#include +#include +#include namespace beast { namespace insight { @@ -29,7 +30,6 @@ class Counter; class CounterImpl : public std::enable_shared_from_this - , public BaseImpl { public: using value_type = std::int64_t; diff --git a/src/ripple/beast/insight/Event.h b/src/ripple/beast/insight/Event.h index 58af68c9d3..c8cebd9514 100644 --- a/src/ripple/beast/insight/Event.h +++ b/src/ripple/beast/insight/Event.h @@ -20,7 +20,6 @@ #ifndef BEAST_INSIGHT_EVENT_H_INCLUDED #define BEAST_INSIGHT_EVENT_H_INCLUDED -#include #include #include @@ -40,7 +39,7 @@ namespace insight { This is a lightweight reference wrapper which is cheap to copy and assign. When the last reference goes away, the metric is no longer collected. */ -class Event : public Base +class Event final { public: using value_type = EventImpl::value_type; diff --git a/src/ripple/beast/insight/EventImpl.h b/src/ripple/beast/insight/EventImpl.h index cd2cc1d04c..307615ba4d 100644 --- a/src/ripple/beast/insight/EventImpl.h +++ b/src/ripple/beast/insight/EventImpl.h @@ -20,7 +20,8 @@ #ifndef BEAST_INSIGHT_EVENTIMPL_H_INCLUDED #define BEAST_INSIGHT_EVENTIMPL_H_INCLUDED -#include +#include +#include namespace beast { namespace insight { @@ -29,7 +30,6 @@ class Event; class EventImpl : public std::enable_shared_from_this - , public BaseImpl { public: using value_type = std::chrono::milliseconds; diff --git a/src/ripple/beast/insight/Gauge.h b/src/ripple/beast/insight/Gauge.h index 39c8a6a988..d77c932e28 100644 --- a/src/ripple/beast/insight/Gauge.h +++ b/src/ripple/beast/insight/Gauge.h @@ -20,7 +20,6 @@ #ifndef BEAST_INSIGHT_GAUGE_H_INCLUDED #define BEAST_INSIGHT_GAUGE_H_INCLUDED -#include #include #include @@ -37,7 +36,7 @@ namespace insight { This is a lightweight reference wrapper which is cheap to copy and assign. When the last reference goes away, the metric is no longer collected. */ -class Gauge : public Base +class Gauge final { public: using value_type = GaugeImpl::value_type; diff --git a/src/ripple/beast/insight/GaugeImpl.h b/src/ripple/beast/insight/GaugeImpl.h index b82bfbfa4e..07af0c9b54 100644 --- a/src/ripple/beast/insight/GaugeImpl.h +++ b/src/ripple/beast/insight/GaugeImpl.h @@ -20,7 +20,8 @@ #ifndef BEAST_INSIGHT_GAUGEIMPL_H_INCLUDED #define BEAST_INSIGHT_GAUGEIMPL_H_INCLUDED -#include +#include +#include namespace beast { namespace insight { @@ -29,7 +30,6 @@ class Gauge; class GaugeImpl : public std::enable_shared_from_this - , public BaseImpl { public: using value_type = std::uint64_t; diff --git a/src/ripple/beast/insight/Hook.h b/src/ripple/beast/insight/Hook.h index 62fab6724f..55c4ebe37f 100644 --- a/src/ripple/beast/insight/Hook.h +++ b/src/ripple/beast/insight/Hook.h @@ -20,7 +20,6 @@ #ifndef BEAST_INSIGHT_HOOK_H_INCLUDED #define BEAST_INSIGHT_HOOK_H_INCLUDED -#include #include #include @@ -29,7 +28,7 @@ namespace beast { namespace insight { /** A reference to a handler for performing polled collection. */ -class Hook : public Base +class Hook final { public: /** Create a null hook. diff --git a/src/ripple/beast/insight/HookImpl.h b/src/ripple/beast/insight/HookImpl.h index 9df1fc529d..d3c021d823 100644 --- a/src/ripple/beast/insight/HookImpl.h +++ b/src/ripple/beast/insight/HookImpl.h @@ -20,14 +20,14 @@ #ifndef BEAST_INSIGHT_HOOKIMPL_H_INCLUDED #define BEAST_INSIGHT_HOOKIMPL_H_INCLUDED -#include +#include +#include namespace beast { namespace insight { class HookImpl : public std::enable_shared_from_this - , public BaseImpl { public: using HandlerType = std::function ; diff --git a/src/ripple/beast/insight/Meter.h b/src/ripple/beast/insight/Meter.h index bb861c725d..bdd6591605 100644 --- a/src/ripple/beast/insight/Meter.h +++ b/src/ripple/beast/insight/Meter.h @@ -22,7 +22,6 @@ #include -#include #include namespace beast { @@ -35,7 +34,7 @@ namespace insight { This is a lightweight reference wrapper which is cheap to copy and assign. When the last reference goes away, the metric is no longer collected. */ -class Meter : public Base +class Meter final { public: using value_type = MeterImpl::value_type; diff --git a/src/ripple/beast/insight/MeterImpl.h b/src/ripple/beast/insight/MeterImpl.h index 19f80e133a..b8812fb238 100644 --- a/src/ripple/beast/insight/MeterImpl.h +++ b/src/ripple/beast/insight/MeterImpl.h @@ -20,7 +20,8 @@ #ifndef BEAST_INSIGHT_METERIMPL_H_INCLUDED #define BEAST_INSIGHT_METERIMPL_H_INCLUDED -#include +#include +#include namespace beast { namespace insight { @@ -29,7 +30,6 @@ class Meter; class MeterImpl : public std::enable_shared_from_this - , public BaseImpl { public: using value_type = std::uint64_t; diff --git a/src/ripple/beast/insight/impl/Groups.cpp b/src/ripple/beast/insight/impl/Groups.cpp index 5ea733b333..0edca6d67e 100644 --- a/src/ripple/beast/insight/impl/Groups.cpp +++ b/src/ripple/beast/insight/impl/Groups.cpp @@ -33,7 +33,6 @@ class GroupImp , public Group { public: - using Items = std::vector >; std::string const m_name; Collector::ptr m_collector; diff --git a/src/ripple/beast/insight/impl/Metric.cpp b/src/ripple/beast/insight/impl/Metric.cpp index 878d12c3e2..60ae1a7e7c 100644 --- a/src/ripple/beast/insight/impl/Metric.cpp +++ b/src/ripple/beast/insight/impl/Metric.cpp @@ -17,8 +17,6 @@ */ //============================================================================== -#include -#include #include #include #include @@ -27,10 +25,6 @@ namespace beast { namespace insight { -Base::~Base() = default; - -BaseImpl::~BaseImpl() = default; - CounterImpl::~CounterImpl() = default; EventImpl::~EventImpl() = default;