00001 #ifndef ocjump_h 00002 #define ocjump_h 00003 00004 union Inst; 00005 class OcJumpImpl; 00006 struct Symlist; 00007 struct Object; 00008 union Objectdata; 00009 00010 class ObjectContext { 00011 public: 00012 ObjectContext(Object*); 00013 virtual ~ObjectContext(); 00014 void restore(); 00015 private: 00016 Object* a1; 00017 Objectdata* a2; 00018 int* a3; 00019 int a4; 00020 Symlist* a5; 00021 boolean restored_; 00022 }; 00023 00024 class OcJump { 00025 public: 00026 OcJump(); 00027 virtual ~OcJump(); 00028 boolean execute(Inst* p); 00029 boolean execute(const char*, Object* ob = nil); 00030 void* fpycall(void*(*)(void*, void*), void*, void*); 00031 static void save_context(ObjectContext*); 00032 static void restore_context(ObjectContext*); 00033 private: 00034 OcJumpImpl* impl_; 00035 }; 00036 00037 #endif