blob: de8b1b6cdbc3f4c44a2ccaf8366bd60389ce7206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include "TestMod4.hpp"
#include "Common.hpp"
#include "UserData.hpp"
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
Derived::Derived( )
{
}
Derived::~Derived( )
{
}
void Derived::hello( )
{
Common::instance( ).print( "hello world from module" );
}
static void initModule( void *user_data )
{
UserData *data = (UserData *)user_data;
ostringstream ss;
ss << "Module 4 initModule called with user data: "
<< data->version << " " << data->text;
Common::instance( ).print( ss.str( ) );
}
static void destroyModule( )
{
Common::instance( ).print( "Module 4 destroyModule called" );
}
REGISTER_MODULE( "testmod4", &initModule, &destroyModule, Base, Derived )
|