Files
rippled/include/xrpl/beast/insight/Hook.h
Bart 1d42c4f6de refactor: Remove unnecessary copyright notices already covered by LICENSE.md (#5929)
Per XLS-0095, we are taking steps to rename ripple(d) to xrpl(d).

This change specifically removes all copyright notices referencing Ripple, XRPLF, and certain affiliated contributors upon mutual agreement, so the notice in the LICENSE.md file applies throughout. Copyright notices referencing external contributions remain as-is. Duplicate verbiage is also removed.
2025-11-04 08:33:42 +00:00

45 lines
882 B
C++

#ifndef BEAST_INSIGHT_HOOK_H_INCLUDED
#define BEAST_INSIGHT_HOOK_H_INCLUDED
#include <xrpl/beast/insight/HookImpl.h>
#include <memory>
namespace beast {
namespace insight {
/** A reference to a handler for performing polled collection. */
class Hook final
{
public:
/** Create a null hook.
A null hook has no associated handler.
*/
Hook()
{
}
/** Create a hook referencing the specified implementation.
Normally this won't be called directly. Instead, call the appropriate
factory function in the Collector interface.
@see Collector.
*/
explicit Hook(std::shared_ptr<HookImpl> const& impl) : m_impl(impl)
{
}
std::shared_ptr<HookImpl> const&
impl() const
{
return m_impl;
}
private:
std::shared_ptr<HookImpl> m_impl;
};
} // namespace insight
} // namespace beast
#endif