Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. struct registry {
  2. static std::map<const char*,Plugin*> plugins;
  3. registry(const char* name, Plugin* plugin) {
  4. plugins[name]=plugin;
  5. }
  6. };
  7.  
  8. #define REGISTER(name) \
  9. registry name ## _register(#name, new name());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement