Advertisement
Guest User

16424250/return-class-pointer-to-lua-with-luabind

a guest
May 8th, 2013
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. Block 1:
  2.     void AddValueToP(int aValue)
  3.     {
  4.         g_P->AddValue(aValue);
  5.     }
  6.  
  7.     module(L)
  8.     [
  9.         def("AddValueToP", &AddValueToP)
  10.     ]
  11.  
  12. Block 2:
  13.  
  14.     class P
  15.     {
  16.         public: AddValue(int);
  17.     }
  18.  
  19.     module(L)
  20.     [
  21.         class_<P>("P")
  22.         .def(constructor<>())
  23.         .def("AddValue", &P::AddValue)
  24.     ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement