ed
examples
hello_world
hello_world_plugin.cpp
Go to the documentation of this file.
1
#include "
hello_world_plugin.h
"
2
3
#include <
ed/logging.h
>
4
5
#include <
iostream
>
6
7
// ----------------------------------------------------------------------------------------------------
8
9
HelloWorld::HelloWorld
()
10
{
11
}
12
13
// ----------------------------------------------------------------------------------------------------
14
15
HelloWorld::~HelloWorld
()
16
{
17
}
18
19
// ----------------------------------------------------------------------------------------------------
20
21
void
HelloWorld::initialize
(
ed::InitData
& init)
22
{
23
init.
config
.
value
(
"text"
,
text_
);
24
}
25
26
// ----------------------------------------------------------------------------------------------------
27
28
void
HelloWorld::process
(
const
ed::WorldModel
&
/*world*/
,
ed::UpdateRequest
&
/*req*/
)
29
{
30
std::cout
<<
text_
<<
std::endl
;
31
32
ed::log::info
(
text_
);
33
ed::log::warning
(
text_
);
34
ed::log::error
(
text_
);
35
}
36
37
ED_REGISTER_PLUGIN
(
HelloWorld
)
HelloWorld
Definition:
hello_world_plugin.h:6
ed::WorldModel
Definition:
world_model.h:21
ed::UpdateRequest
Definition:
update_request.h:24
hello_world_plugin.h
HelloWorld::process
void process(const ed::WorldModel &world, ed::UpdateRequest &req)
Definition:
hello_world_plugin.cpp:28
ED_REGISTER_PLUGIN
#define ED_REGISTER_PLUGIN(Derived)
Definition:
plugin.h:5
ed::InitData
Definition:
init_data.h:12
ed::InitData::config
tue::Configuration & config
Definition:
init_data.h:18
iostream
std::cout
ed::log::info
std::ostream & info()
Definition:
logging.cpp:30
ed::log::error
std::ostream & error()
Definition:
logging.cpp:74
ed::log::warning
std::ostream & warning()
Definition:
logging.cpp:52
HelloWorld::text_
std::string text_
Definition:
hello_world_plugin.h:21
HelloWorld::HelloWorld
HelloWorld()
Definition:
hello_world_plugin.cpp:9
tue::config::ReaderWriter::value
bool value(const std::string &name, T &value, RequiredOrOptional opt=REQUIRED)
std::endl
T endl(T... args)
logging.h
ed::Plugin::initialize
virtual void initialize()
Definition:
plugin.h:39
HelloWorld::~HelloWorld
virtual ~HelloWorld()
Definition:
hello_world_plugin.cpp:15
Generated on Mon Feb 24 2025 04:35:32 for ed by
1.8.17