<commit_before>/*
 * Part of tivars_lib_cpp
 * (C) 2015 Adrien 'Adriweb' Bertrand
 * https://github.com/adriweb/tivars_lib_cpp
 * License: MIT
 */

#include "ITIVarTypeHandler.h"
#include "TH_0x00.h"
#include "TH_0x03.h"
#include "TH_0x04.h"
#include "TH_0x05.h"
#include "TH_0x06.h"

#ifndef TIVARS_LIB_CPP_TYPEHANDLERFUNCGETTER_H
#define TIVARS_LIB_CPP_TYPEHANDLERFUNCGETTER_H

namespace tivars
{

    class TypeHandlerFuncGetter
    {

    public:

        static decltype(&ITIVarTypeHandler::makeStringFromData) getStringFromDataFunc(int type)
        {
            auto func = &ITIVarTypeHandler::makeStringFromData;
            switch (type)
            {
                case 0x00:
                    func = &TH_0x00::makeStringFromData;
                    break;

                case 0x03:
                    func = &TH_0x03::makeStringFromData; // We could actually directly use TH_0x05 here, but that might be confusing.
                    break;

                case 0x04:
                    func = &TH_0x04::makeStringFromData; // Same comment as 0x03 here.
                    break;

                case 0x05:
                case 0x06:
                    func = &TH_0x05::makeStringFromData;
                    break;

                default:
                    break;
            }
            return func;
        }

        static decltype(&ITIVarTypeHandler::makeDataFromString) getDataFromStringFunc(int type)
        {
            auto func = &ITIVarTypeHandler::makeDataFromString;
            switch (type)
            {
                case 0x00:
                    func = &TH_0x00::makeDataFromString;
                    break;

                case 0x03:
                    func = &TH_0x03::makeDataFromString; // We could actually directly use TH_0x05 here, but that might be confusing.
                    break;

                case 0x04:
                    func = &TH_0x04::makeDataFromString; // Same comment as 0x03 here.
                    break;

                case 0x05:
                case 0x06:
                    func = &TH_0x05::makeDataFromString;<commit_msg>Add TH_0x01 to the handlers<commit_after>/*
 * Part of tivars_lib_cpp
 * (C) 2015 Adrien 'Adriweb' Bertrand
 * https://github.com/adriweb/tivars_lib_cpp
 * License: MIT
 */

#include "ITIVarTypeHandler.h"
#include "TH_0x00.h"
#include "TH_0x01.h"
#include "TH_0x03.h"
#include "TH_0x04.h"
#include "TH_0x05.h"
#include "TH_0x06.h"

#ifndef TIVARS_LIB_CPP_TYPEHANDLERFUNCGETTER_H
#define TIVARS_LIB_CPP_TYPEHANDLERFUNCGETTER_H

namespace tivars
{

    class TypeHandlerFuncGetter
    {

    public:

        static decltype(&ITIVarTypeHandler::makeStringFromData) getStringFromDataFunc(int type)
        {
            auto func = &ITIVarTypeHandler::makeStringFromData;
            switch (type)
            {
                case 0x00:
                    func = &TH_0x00::makeStringFromData;
                    break;

                case 0x01:
                    func = &TH_0x01::makeStringFromData;
                    break;

                case 0x03:
                    func = &TH_0x03::makeStringFromData; // We could actually directly use TH_0x05 here, but that might be confusing.
                    break;

                case 0x04:
                    func = &TH_0x04::makeStringFromData; // Same comment as 0x03 here.
                    break;

                case 0x05:
                case 0x06:
                    func = &TH_0x05::makeStringFromData;
                    break;

                default:
                    break;
            }
            return func;
        }

        static decltype(&ITIVarTypeHandler::makeDataFromString) getDataFromStringFunc(int type)
        {
            auto func = &ITIVarTypeHandler::makeDataFromString;
            switch (type)
            {
                case 0x00:
                    func = &TH_0x00::makeDataFromString;
                    break;

                case 0x01:
                    func = &TH_0x01::makeDataFromString;
                    break;

                case 0x03:
                    func = &TH_0x03::makeDataFromString; // We could actually directly use TH_0x05 here, but that might be confusing.
                    break;

                case 0x04:
                    func = &TH_0x04::makeDataFromString; // Same comment as 0x03 here.
                    break;

                case 0x05:
                case 0x06:
                    func = &TH_0x05::makeDataFromString;
{'fraction_non_alphanumeric': 0.07465007776049767, 'fraction_numerical': 0.04176849588980227, 'mean_word_length': 1.465498357064622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5923969', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1276, 'n_words': 279}