<commit_before>//
// Copyright (c) 2013 <NAME>
// See LICENSE for more information.
//

#ifndef MLK_CONTAINERS_MIXED_CONTAINER_H
#define MLK_CONTAINERS_MIXED_CONTAINER_H


#include "mixed_cnt_type.h"

#include <string>
#include <memory>
#include <vector>
#include <map>


namespace mlk
{
	namespace cnt
	{
		class mixed_container
		{
		public:
			std::map<std::string, std::shared_ptr<mixed_cnt_type_base>> m_vec;

		public:
			template<typename T>
			void add(const std::string& key, const mixed_cnt_type<T>& var)
			{
				auto ptr = std::make_shared<mixed_cnt_type<T>>(var);
				m_vec[key] = ptr;
			}

			template<typename T>
			T at(std::string key)
			{
				return std::static_pointer_cast<mixed_cnt_type<T>>(m_vec[key])->m_var;
			}<commit_msg>changed the input type of mixed_container::add<T><commit_after>//
// Copyright (c) 2013 <NAME>
// See LICENSE for more information.
//

#ifndef MLK_CONTAINERS_MIXED_CONTAINER_H
#define MLK_CONTAINERS_MIXED_CONTAINER_H


#include "mixed_cnt_type.h"

#include <string>
#include <memory>
#include <vector>
#include <map>


namespace mlk
{
	namespace cnt
	{
		class mixed_container
		{
		public:
			std::map<std::string, std::shared_ptr<mixed_cnt_type_base>> m_vec;

		public:
			template<typename T>
			void add(const std::string& key, const T& var)
			{
				m_vec[key] = std::make_shared<mixed_cnt_type<T>>(mixed_cnt_type<T>{var});
			}

			template<typename T>
			T at(std::string key)
			{
				return std::static_pointer_cast<mixed_cnt_type<T>>(m_vec[key])->m_var;
			}
{'fraction_non_alphanumeric': 0.13298222514812377, 'fraction_numerical': 0.005266622778143515, 'mean_word_length': 4.6716417910447765, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 34, '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': '5513033', 'n_tokens_mistral': 675, 'n_tokens_neox': 579, 'n_words': 114}