<commit_before>#include <boost/thread/mutex.hpp>

#include "gt/model/common.hpp"

namespace GT {
namespace Model {
    
////////////////////////////////////////////////////////////////////////////////

boost::mutex gameFactoryMutex;

////////////////////////////////////////////////////////////////////////////////

class PlainData : public virtual Root {
    PlayersPtr players;

    boost::container::map<int, NumbersPtr> params;

public:
    NumberPtr getValue(
        PositionsPtr  positions, 
        IdentifierPtr playerName
    ) {
        // TODO: retrive value from map
        return NullFactory::getInstance().createNumber();
    }

    NumbersPtr getValues(
        PositionsPtr positions
    ) {
        // TODO: retrive values from map
        return NullFactory::getInstance().createNumbers();
    }

    PlainData& setValues(
        PositionsPtr positions,
        NumbersPtr   numbers
    ) {
        // TODO: calculate position and use it to put it into map
        return *this;
    }

    Message toString() {
        // TODO: print data as table: | positions | values |
        return *NullFactory::getInstance().createMessage();
    }

private:
    int calculatePosition(
        PositionsPtr positions
    ) {
        // TODO: positions -> int
        return 0;
    }
<commit_msg>* Several more "drafts" added to GameFactory/PlainData model.<commit_after>#include <boost/thread/mutex.hpp>

#include "gt/model/common.hpp"

namespace GT {
namespace Model {
    
////////////////////////////////////////////////////////////////////////////////

boost::mutex gameFactoryMutex;

////////////////////////////////////////////////////////////////////////////////

class PlainData : public virtual Root {
    PlayersPtr players;

    boost::container::vector<Identifier> playerNames;

    boost::container::map<int, NumbersPtr> params;

public:
    NumberPtr getValue(
        PositionsPtr  positions, 
        IdentifierPtr playerName
    ) {
        // TODO: retrive value from map
        return NullFactory::getInstance().createNumber();
    }

    NumbersPtr getValues(
        int positionInMap
    ) {
        if (!params.count(positionInMap))
            // TODO: create ExceptionFactory and define exceptions
            // (rename standard ones)
            throw std::invalid_argument("No params under such condition");
        return params[positionInMap];
    }

    NumbersPtr getValues(
        PositionsPtr positions
    ) {
        return getValues(
            calculatePosition(positions)
        );
    }

    PlainData& setValues(int positionInMap, NumbersPtr numbers) {
        params.insert(
            std::make_pair(
                positionInMap,
                numbers
            )
        );
        return *this;
    }

    PlainData& setValues(
        PositionsPtr positions,
        NumbersPtr   numbers
    ) {
        return setValues(
            calculatePosition(positions),
            numbers
        );
    }

    Message toString() {
        // TODO: print data as table: | positions | values |
        return *NullFactory::getInstance().createMessage();
    }

private:
    int calculatePosition(
        PositionsPtr positions
    ) {
        // TODO: positions -> int
        // throw std::runtime_exception if positions do not match players
        return 0;
    }

    bool checkPlayer(
        IdentifierPtr playerName
    ) {
        // TODO:
        return true;
    }

    bool checkPositions(
        PositionsPtr positions
    ) {
        // TODO:
        return true;
    }

{'fraction_non_alphanumeric': 0.1694867456288776, 'fraction_numerical': 0.0005640157924421884, 'mean_word_length': 1.5758896151053015, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '4600323', 'n_tokens_mistral': 873, 'n_tokens_neox': 844, 'n_words': 222}