<commit_before>#ifndef SINK_HPP
#define SINK_HPP
// Seer
#include "Pipe.hpp"
#include "BaseSink.hpp"
// std
#include <utility> //std::forward
#include <memory> //std::weak_ptr, std::make_shared
#include <type_traits> //std::is_base_of
namespace Seer {
	/// @brief Will contruct and register a custom sink to Seer
	/// @code
			// A custom sink has been made (FileSink), that will dump to file
			// This sink will auto register, and auto un-register when destructed
	///		auto file_sink = Sink<FileSink>("file.log");
	/// @endcode
	template<class CustomSink>
	class Sink
	{
		static_assert(std::is_base_of<BaseSink, CustomSink>::value, "CustomSink must derive from BaseSink");
		//static_assert(std::is_convertible<CustomSink, Seer::BaseSink>::value, "Seer::BaseSink inheritance must be public");
	public:
		template<class... Args>
		Sink(Args&&... args)
		{
			_sink = Pipe::instance().add_sink(
				std::make_shared<CustomSink>(std::forward<Args>(args)...)
			);
		}
		~Sink()
		{
			Pipe::instance().remove_sink(_sink);
		}<commit_msg>Added back public inheritance check<commit_after>#ifndef SINK_HPP
#define SINK_HPP
// Seer
#include "Pipe.hpp"
#include "BaseSink.hpp"
// std
#include <utility> //std::forward
#include <memory> //std::weak_ptr, std::make_shared
#include <type_traits> //std::is_base_of
namespace Seer {
	/// @brief Will contruct and register a custom sink to Seer
	/// @code
			// A custom sink has been made (FileSink), that will dump to file
			// This sink will auto register, and auto un-register when destructed
	///		auto file_sink = Sink<FileSink>("file.log");
	/// @endcode
	template<class CustomSink>
	class Sink
	{
		static_assert(std::is_base_of<BaseSink, CustomSink>::value, "CustomSink must derive from BaseSink");
		static_assert(std::is_convertible<CustomSink*, Seer::BaseSink*>::value, "Seer::BaseSink inheritance must be public");
	public:
		template<class... Args>
		Sink(Args&&... args)
		{
			_sink = Pipe::instance().add_sink(
				std::make_shared<CustomSink>(std::forward<Args>(args)...)
			);
		}
		~Sink()
		{
			Pipe::instance().remove_sink(_sink);
		}
		/// @brief Returns the created sink, this can be useful if you want access it while its active in the Pipe
{'fraction_non_alphanumeric': 0.1490711372904395, 'fraction_numerical': 0.0, 'mean_word_length': 4.346246973365617, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2307636', 'n_tokens_mistral': 793, 'n_tokens_neox': 769, 'n_words': 198}