Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct registry {
- static std::map<const char*,Plugin*> plugins;
- registry(const char* name, Plugin* plugin) {
- plugins[name]=plugin;
- }
- };
- #define REGISTER(name) \
- registry name ## _register(#name, new name());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement