SHARE
TWEET

Untitled

a guest Nov 21st, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //simple event translation
  2. template <typename in, typename out>
  3. void translate(std::function<void(out*)> callback)
  4.  
  5. //direct translation
  6. template <typename in, typename out>
  7. void translate(std::function<void(in*, out*)> callback)
  8.  
  9. //conditional translation
  10. template <typename in, typename out>
  11. void translate(std::function<bool(in*, out*)> callback)
  12.  
  13. //one to many translation
  14. template<typename in, typename classType>
  15. void translate(bool(classType::*callback)(in*))
  16.  
  17. //Captures an incoming message and edits its data fields
  18. template<typename msg>
  19. void edit(std::function<void(msg*)> callback) { _interceptorBuffer->subscribeEditor<msg>(callback); }
  20.  
  21. template<typename Msg, typename classType>
  22. void edit(void(classType::*callback)(Msg*))
  23.  
  24. template<typename msg>
  25. void filter(std::function<bool(msg*)> filterFunction)
  26.  
  27. template<typename Msg, typename classType>
  28. void filter(bool(classType::*callback)(Msg*))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top