<commit_before><commit_msg>Add the LeapEvent header that contains the mentioned event system that I forgot to commit because of stupidity<commit_after>#ifndef LEAP_EVENT
#define LEAP_EVENT

#include <string>
#include <AnnEngine.hpp>

using namespace Annwvyn;
enum LeapEventType
{
	HAND_CLOSED
};

class LeapEvent
{
public:
	LeapEvent()
	{
	}

};

///Closing your hand
class LeapCloseEvent : public LeapEvent
{
public:
	LeapCloseEvent() : LeapEvent()
	{}
	bool close;
	std::string hand;
};

class LeapEventListener
{
public:
	LeapEventListener()
	{
	}
	
	bool notifyEvent(LeapEvent* event, LeapEventType eventType)
	{
		switch(eventType)
		{
		case HAND_CLOSED:
			return closeEvent(static_cast<LeapCloseEvent*>(event));			
		}

		return false;
	}

	virtual bool closeEvent(LeapCloseEvent* e) = 0;
};

class LeapLoggerListener : public LeapEventListener
{
public:
	LeapLoggerListener() : LeapEventListener()
	{

	}

	bool closeEvent(LeapCloseEvent* e)
	{
		logStream << e->hand << " hand: close -> " << e->close;
		log();
		return true;
	}

	void clearStream()
	{
		logStream.str("");
	}

	void log()
	{
		AnnEngine::log(logStream.str());
		clearStream();
	}
	std::stringstream logStream;

};

#endif
{'fraction_non_alphanumeric': 0.12093411175979983, 'fraction_numerical': 0.0008340283569641367, 'mean_word_length': 4.504587155963303, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 9, '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': '5659332', 'n_tokens_mistral': 450, 'n_tokens_neox': 427, 'n_words': 98}