Bochs/bochs-testing/plugin-test/test9-modclass/modules.h
Bryce Denney b55ebd6130 - eliminate duplicat symbols across modules
- modified: test9/module* test11/module* test12/module*
2002-10-17 05:53:50 +00:00

28 lines
781 B
C++

#ifdef _buildsym
// This section is included by each module to rename all of its symbols,
// in order to avoid duplicate symbols in different modules. From the
// libtool docs: "Although some platforms support having the same symbols
// defined more than once it is generally not portable."
#define module_init _buildsym(module_init)
#define operate _buildsym(operate)
extern "C" {
// the extern "C" prevents C++ name mangling
class ModuleGadget * module_init ();
int operate (int a, int b);
};
#endif
typedef class ModuleGadget* (*modload_func)(void);
class ModuleGadget {
int id;
const char *name;
const char *features;
public:
ModuleGadget(const char* name, const char* features);
virtual const char* getName ();
virtual const char* getFeatures ();
};