<commit_before>#pragma once
#include <functional>
#include <vector>
#include <memory>
#include <unordered_map>

#include "mutex_lock.hpp"
#include "queue.hpp"


namespace aim {

        constexpr std::size_t EVENTS_SIZE_STEP = 1000u;

        using EventArguments_t = std::function<void(void)>;

        enum class EventType : std::size_t {
                InputEvent,
                ControlEvent
        };

        /*! \brief Basic class for events aggregator.
         * Can collect only one type of events. Lives in separate thread.
         */
        struct IEventsAggregator {
                /*! \brief Main aggregator procedure.
                 */
                virtual void exec() = 0;
        };

        struct EventsDispenser {
                EventsDispenser()
                {
                }

                ~EventsDispenser() {

                }

                /*! \brief Register event aggregator.
                 * \param type Event type group.
                 * \param value Event aggregator.
                 */
                void registerAggregator(const EventType type, std::unique_ptr<IEventsAggregator> value) {
                        eventsAggregators[type] = std::move(value);
                }

                void finish() {
                        finised = !finised;
                }

                void operator()();

        private:
                bool finised = false;

                std::unordered_map<EventType, MutexLock<Queue_t<std::any>> eventsBus;
                std::unordered_map<EventType, std::unique_ptr<IEventsAggregator>> eventsAggregators;
                std::unordered_map<EventType, std::vector<int>> subscribers; // TODO
        };
}<commit_msg>Try to fix build<commit_after>#pragma once
#include <functional>
#include <vector>
#include <memory>
#include <unordered_map>

#include "mutex_lock.hpp"
#include "queue.hpp"


namespace aim {

        constexpr std::size_t EVENTS_SIZE_STEP = 1000u;

        using EventArguments_t = std::function<void(void)>;

        enum class EventType : std::size_t {
                InputEvent,
                ControlEvent
        };

        /*! \brief Basic class for events aggregator.
         * Can collect only one type of events. Lives in separate thread.
         */
        struct IEventsAggregator {
                /*! \brief Main aggregator procedure.
                 */
                virtual void exec() = 0;
        };

        struct EventsDispenser {
                EventsDispenser()
                {
                }

                ~EventsDispenser() {

                }

                /*! \brief Register event aggregator.
                 * \param type Event type group.
                 * \param value Event aggregator.
                 */
                void registerAggregator(const EventType type, std::unique_ptr<IEventsAggregator> value) {
                        eventsAggregators[type] = std::move(value);
                }

                void finish() {
                        finised = !finised;
                }

                void operator()();

        private:
                bool finised = false;

                //std::unordered_map<EventType, MutexLock<Queue_t<std::any>> eventsBus;
                //std::unordered_map<EventType, std::unique_ptr<IEventsAggregator>> eventsAggregators;
                //std::unordered_map<EventType, std::vector<int>> subscribers; // TODO
        };
}
{'fraction_non_alphanumeric': 0.09383145091225022, 'fraction_numerical': 0.0028960324355632784, 'mean_word_length': 1.492063492063492, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '1853092', 'n_tokens_mistral': 927, 'n_tokens_neox': 853, 'n_words': 205}