<commit_before>﻿#ifndef _CW_EDIT_BOX_DELETATE_H_
#define _CW_EDIT_BOX_DELETATE_H_

#include "ui/UIEditBox/UIEditBox.h"

namespace cw {
    class EditBoxDelegate : public cocos2d::ui::EditBoxDelegate {
    public:
        EditBoxDelegate(const std::function<void (cocos2d::ui::EditBox *editBox)> &editBoxReturn)
            : _editBoxReturn(editBoxReturn) { }

        EditBoxDelegate(std::function<void (cocos2d::ui::EditBox *editBox)> &&editBoxReturn)
            : _editBoxReturn(editBoxReturn) { }

        virtual ~EditBoxDelegate() { CCLOG("%s", __FUNCTION__); }

    private:
        virtual void editBoxReturn(cocos2d::ui::EditBox *editBox) override {
            _editBoxReturn(editBox);
        }
        std::function<void (cocos2d::ui::EditBox *editBox)> _editBoxReturn;
    };
}

#endif<commit_msg>添加其他一些构造函数<commit_after>﻿#ifndef _CW_EDIT_BOX_DELETATE_H_
#define _CW_EDIT_BOX_DELETATE_H_

#include "ui/UIEditBox/UIEditBox.h"

namespace cw {
    class EditBoxDelegate : public cocos2d::ui::EditBoxDelegate {
    public:
        EditBoxDelegate(const std::function<void (cocos2d::ui::EditBox *editBox)> &editBoxReturn)
            : _editBoxReturn(editBoxReturn) { }

        EditBoxDelegate(std::function<void (cocos2d::ui::EditBox *editBox)> &&editBoxReturn)
            : _editBoxReturn(editBoxReturn) { }

        EditBoxDelegate(const EditBoxDelegate &other)
            : _editBoxReturn(other._editBoxReturn) { }

        EditBoxDelegate(EditBoxDelegate &&other)
            : _editBoxReturn(std::move(other._editBoxReturn)) { }

        EditBoxDelegate &operator=(const EditBoxDelegate &other) {
            _editBoxReturn = other._editBoxReturn;
            return *this;
        }

        EditBoxDelegate &operator=(EditBoxDelegate &&other) {
            _editBoxReturn = std::move(other._editBoxReturn);
            return *this;
        }

        virtual ~EditBoxDelegate() { CCLOG("%s", __FUNCTION__); }

    private:
        virtual void editBoxReturn(cocos2d::ui::EditBox *editBox) override {
            _editBoxReturn(editBox);
        }
        std::function<void (cocos2d::ui::EditBox *editBox)> _editBoxReturn;
    };
}

#endif
{'fraction_non_alphanumeric': 0.11672070402964335, 'fraction_numerical': 0.004631773969430292, 'mean_word_length': 3.4171779141104293, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4312705', 'n_tokens_mistral': 708, 'n_tokens_neox': 691, 'n_words': 101}