<commit_before>#include <basedefs.h>
#include "../userinfo.h"
#include <string>
#include <sstream>

namespace anp
{
namespace firc
{
	struct UserInfoImpl
	{
		UserInfoImpl(const std::string &name, const std::string &user,
												const std::string &host):
		m_name(name),
		m_user(user),
		m_host(host),
		m_userStringIsDirty(true)
		{
		}
		
		void updateUserString() const
		{
			if ( m_userStringIsDirty )
			{
				std::stringstream ss;
				ss << m_name << '!' << m_user << '@' << m_host;
				m_userString = ss.str();
				m_userStringIsDirty = false;
			}
		}
	
		void invalidateUserString() const
		{
			m_userStringIsDirty = true;
		}

		std::string m_name;
		std::string m_user;
		std::string m_host;
		mutable std::string m_userString;
		mutable bool32 m_userStringIsDirty;
	};

	UserInfo::UserInfo(const std::string &name, const std::string &user,
											const std::string &host):
	m_impl(new UserInfoImpl(name, user, host))
	{
		m_impl->updateUserString();
	}
	
	const std::string &UserInfo::name() const<commit_msg>Implemented missing UserInfo destructor.<commit_after>#include <basedefs.h>
#include "../userinfo.h"
#include <string>
#include <sstream>

namespace anp
{
namespace firc
{
	struct UserInfoImpl
	{
		UserInfoImpl(const std::string &name, const std::string &user,
												const std::string &host):
		m_name(name),
		m_user(user),
		m_host(host),
		m_userStringIsDirty(true)
		{
		}
		
		void updateUserString() const
		{
			if ( m_userStringIsDirty )
			{
				std::stringstream ss;
				ss << m_name << '!' << m_user << '@' << m_host;
				m_userString = ss.str();
				m_userStringIsDirty = false;
			}
		}
	
		void invalidateUserString() const
		{
			m_userStringIsDirty = true;
		}

		std::string m_name;
		std::string m_user;
		std::string m_host;
		mutable std::string m_userString;
		mutable bool32 m_userStringIsDirty;
	};

	UserInfo::UserInfo(const std::string &name, const std::string &user,
											const std::string &host):
	m_impl(new UserInfoImpl(name, user, host))
	{
		m_impl->updateUserString();
	}

	UserInfo::~UserInfo()
	{
		delete m_impl;
	}
	
	const std::string &UserInfo::name() const
{'fraction_non_alphanumeric': 0.1369158878504673, 'fraction_numerical': 0.001869158878504673, 'mean_word_length': 3.779017857142857, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 11, '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': '2869319', 'n_tokens_mistral': 920, 'n_tokens_neox': 786, 'n_words': 159}