Fawkes API
Fawkes Development Version
protobuf_to_bb.cpp
1
2
/***************************************************************************
3
* Protoboard plugin template
4
* - Templates that implement translation of incoming ProtoBuf messages
5
* to BlackBoard interfaces according to the appropriate template
6
* specializations
7
*
8
* Copyright 2019 Victor Mataré
9
****************************************************************************/
10
11
/* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL file in the doc directory.
22
*/
23
24
#include "protobuf_to_bb.h"
25
26
namespace
protoboard {
27
28
pb_convert::pb_convert
() : blackboard_(nullptr), logger_(nullptr)
29
{
30
}
31
32
pb_convert::~pb_convert
()
33
{
34
}
35
36
void
37
pb_convert::init
(
fawkes::BlackBoard
*blackboard,
fawkes::Logger
*logger,
const
std::string &)
38
{
39
blackboard_
= blackboard;
40
logger_
= logger;
41
}
42
43
void
44
pb_convert::handle
(std::shared_ptr<google::protobuf::Message> msg)
45
{
46
handle
(*msg);
47
}
48
49
void
50
pb_convert::handle
(
const
google::protobuf::Message &)
51
{
52
}
53
54
}
// namespace protoboard
protoboard::pb_convert::~pb_convert
virtual ~pb_convert()
Destructor. Does nothing since members aren't owned by this class.
Definition:
protobuf_to_bb.cpp:32
protoboard::pb_convert::blackboard_
fawkes::BlackBoard * blackboard_
Blackboard used by the main thread.
Definition:
protobuf_to_bb.h:83
fawkes::BlackBoard
The BlackBoard abstract class.
Definition:
blackboard.h:46
protoboard::pb_convert::pb_convert
pb_convert()
Empty-init constructor.
Definition:
protobuf_to_bb.cpp:28
protoboard::pb_convert::logger_
fawkes::Logger * logger_
Logger from the main thread.
Definition:
protobuf_to_bb.h:85
fawkes::Logger
Interface for logging.
Definition:
logger.h:42
protoboard::pb_convert::handle
virtual void handle(std::shared_ptr< google::protobuf::Message > msg)
Dereference msg and pass it on to handle it by reference.
Definition:
protobuf_to_bb.cpp:44
protoboard::pb_convert::init
virtual void init(fawkes::BlackBoard *blackboard, fawkes::Logger *logger, const std::string &="")
Deferred initialization.
Definition:
protobuf_to_bb.cpp:37
src
libs
protoboard
protobuf_to_bb.cpp
Generated by
1.8.20