SHARE
TWEET

Untitled

quantumech Apr 23rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <emscripten/bind.h>
  2. #include <iostream>
  3.  
  4. using namespace emscripten;
  5.  
  6. // Enum being registered to JS
  7. enum Piece
  8. {
  9.     X,
  10.     O,
  11.     NaN
  12. };
  13.  
  14. // Register JS enum
  15. EMSCRIPTEN_BINDINGS(Module)
  16. {
  17.     enum_<Piece>("Piece")
  18.         .value("X", Piece::X)
  19.         .value("O", Piece::O);
  20. }
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
 
Top