Cromon

Untitled

Jan 15th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Foo : public std::enable_shared_from_this<Foo>
  2. {
  3. public:
  4.     Foo(float a1, int a2) {
  5.         someProp = a2;
  6.     }
  7.  
  8.     ~Foo() {
  9.     }
  10.  
  11.     int modifyProp(int modifier) {
  12.         return someProp ^ modifier;
  13.     }
  14.  
  15.     void getObject(JS::JSObjectPtr obj) {
  16.         obj->call<void>(L"method1", shared_from_this());
  17.         double x = obj->getObject(L"upperLeft")->getNumber(L"x");
  18.     }
  19.  
  20.     int someProp;
  21. };
  22.  
  23. float Foo_unbound(std::shared_ptr<Foo> pThis, float f) {
  24.     return FLT_MAX;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment