git-subtree-dir: libs/CommService git-subtree-split: 7ccc0fce88bbc5969df060058cf0fb57abe3bcf9
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef __LIBBC_BC_RECEIVEABLE_HPP__
|
|
#define __LIBBC_BC_RECEIVEABLE_HPP__
|
|
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
|
|
/**
|
|
* @file
|
|
* @brief main header file for the receiveable interface
|
|
* @author Dominik Meyer <dmeyer@hsu-hh.de>
|
|
* @date 2019-01-08
|
|
* @copyright 2019 no yet defined
|
|
*/
|
|
#include <BC/Message.hpp>
|
|
|
|
namespace BC {
|
|
/**
|
|
* @brief interface for a class which is able to receive messages via a battle-com service
|
|
*
|
|
*/
|
|
class receiveable
|
|
{
|
|
public:
|
|
/**
|
|
* @brief method called by the battle-com service after registering this class via the subscribe method
|
|
*
|
|
* Please make sure this method is finished as fast as possible. New messages can only be
|
|
* processes by the battle-com service after this method has finished!!!!
|
|
*
|
|
* @param m - pointer to the message received by the service, this class has to make
|
|
* sure that the message is deleted/freed after usage
|
|
*/
|
|
virtual void receive(BC::Message *m)=0;
|
|
};
|
|
}; // namespace BC
|
|
|
|
#endif
|