<commit_before>/*
 * Copyright (c) 2014, webvariants GmbH, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 *
 * @author: <NAME> (<EMAIL>), <NAME> (<EMAIL>)
 */


#ifndef __SUSI_CPPENGINE_SAMPLECONTROLLER__
#define __SUSI_CPPENGINE_SAMPLECONTROLLER__

#include "engine/BaseController.h"

namespace Susi {
namespace Cpp {

class SampleController : public Susi::Cpp::BaseController {
public:
	virtual void start() override {
		Susi::Events::Consumer c = [this](Susi::Events::SharedEventPtr event){
			sampleConsumerFunction(event);
		};
		Susi::Events::Processor p = [this](Susi::Events::EventPtr event){
			sampleProcessorFunction(std::move(event));
		};
		subscribe("samplecontroller::test1", c , 3);
		subscribe("samplecontroller::test2", p , 3);
	}

	void sampleConsumerFunction(Susi::Events::SharedEventPtr event){
		log("Funktioniert!");
	}

	void sampleProcessorFunction(Susi::Events::EventPtr event){
		event->payload = "processed!";
	}
};

}
}<commit_msg>[gcc4.7] fixed sample controller;<commit_after>/*
 * Copyright (c) 2014, webvariants GmbH, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 *
 * @author: <NAME> (<EMAIL>), <NAME> (<EMAIL>)
 */


#ifndef __SUSI_CPPENGINE_SAMPLECONTROLLER__
#define __SUSI_CPPENGINE_SAMPLECONTROLLER__

#include "engine/BaseController.h"

namespace Susi {
namespace Cpp {

class SampleController : public Susi::Cpp::BaseController {
public:
	virtual void start() override {
		Susi::Events::Consumer c = [this](Susi::Events::SharedEventPtr event){
			sampleConsumerFunction(event);
		};
		Susi::Events::Processor p = [this](Susi::Events::EventPtr event){
			sampleProcessorFunction(std::move(event));
		};
		subscribe("samplecontroller::test1", c);
		subscribe("samplecontroller::test2", p);
	}

	void sampleConsumerFunction(Susi::Events::SharedEventPtr event){
		log("Funktioniert!");
	}

	void sampleProcessorFunction(Susi::Events::EventPtr event){
		event->payload = "processed!";
	}
};

}
}
{'fraction_non_alphanumeric': 0.14335664335664336, 'fraction_numerical': 0.006993006993006993, 'mean_word_length': 5.673469387755102, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '5930588', 'n_tokens_mistral': 799, 'n_tokens_neox': 732, 'n_words': 165}