LUMIERA.clone/tests/plugin/example_plugin.cpp
Christian Thaeter f428295a33 plugin in C++
2007-08-20 03:22:56 +02:00

61 lines
1.2 KiB
C++

#include <iostream>
#include "hello_interface.h"
class example_plugin
{
public:
static int myopen(void)
{
std::cout << "opened" << std::endl;
return 0;
}
static int myclose(void)
{
std::cout << "closed" << std::endl;
return 0;
}
};
class example_plugin_de
: public example_plugin
{
public:
static void hello(void)
{
std::cout << "Hallo Welt!" << std::endl;
}
static void bye(const char* m)
{
std::cout << "Tschuess " << m << std::endl;
}
};
class example_plugin_en
: public example_plugin
{
public:
static void hello(void)
{
std::cout << "Hello World!" << std::endl;
}
static void bye(const char* m)
{
std::cout << "Bye " << m << std::endl;
}
};
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, example_plugin_de::myopen, example_plugin_de::myclose,
example_plugin_de::hello,
example_plugin_de::bye
);
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, english, example_plugin_en::myopen, example_plugin_en::myclose,
example_plugin_en::hello,
example_plugin_en::bye
);