mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
This change replaces all include guards in the `src/` and `include/` directories by `#pragma once`.
37 lines
724 B
C++
37 lines
724 B
C++
#pragma once
|
|
|
|
#include <xrpl/beast/insight/Collector.h>
|
|
#include <xrpl/beast/insight/Group.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace beast {
|
|
namespace insight {
|
|
|
|
/** A container for managing a set of metric groups. */
|
|
class Groups
|
|
{
|
|
public:
|
|
virtual ~Groups() = 0;
|
|
|
|
/** Find or create a new collector with a given name. */
|
|
/** @{ */
|
|
virtual Group::ptr const&
|
|
get(std::string const& name) = 0;
|
|
|
|
Group::ptr const&
|
|
operator[](std::string const& name)
|
|
{
|
|
return get(name);
|
|
}
|
|
/** @} */
|
|
};
|
|
|
|
/** Create a group container that uses the specified collector. */
|
|
std::unique_ptr<Groups>
|
|
make_Groups(Collector::ptr const& collector);
|
|
|
|
} // namespace insight
|
|
} // namespace beast
|