| 1 |
$#include "tclass.h" |
| 2 |
|
| 3 |
$Test::Tst_A* Test::Tst_A::last; |
| 4 |
$Test::Tst_B* Test::Tst_B::last; |
| 5 |
$Test::Tst_C* Test::Tst_C::last; |
| 6 |
|
| 7 |
|
| 8 |
$renaming ^Tst_ @ |
| 9 |
|
| 10 |
namespace Test { |
| 11 |
|
| 12 |
class Tst_Dummy; |
| 13 |
|
| 14 |
class Tst_A |
| 15 |
{ |
| 16 |
static Tst_A* last; |
| 17 |
Tst_A (); |
| 18 |
virtual char* a (); |
| 19 |
class Tst_AA |
| 20 |
{ |
| 21 |
Tst_AA () {} |
| 22 |
~Tst_AA () {} |
| 23 |
char* aa () { return "AA"; } |
| 24 |
}; |
| 25 |
class Tst_BB : public Tst_AA |
| 26 |
{ |
| 27 |
Tst_BB () {} |
| 28 |
~Tst_BB () {} |
| 29 |
Tst_AA* Base () { return this; } |
| 30 |
}; |
| 31 |
|
| 32 |
tolua_property int number; |
| 33 |
}; |
| 34 |
|
| 35 |
class Tst_E { |
| 36 |
public: |
| 37 |
typedef enum{ |
| 38 |
ONE, |
| 39 |
TWO, |
| 40 |
} Pete; |
| 41 |
Pete pete; |
| 42 |
|
| 43 |
float get_t<float>(); |
| 44 |
|
| 45 |
void get_pete(Pete p); |
| 46 |
|
| 47 |
Tst_E& operator+(const Tst_E& rvalue); |
| 48 |
|
| 49 |
void pars(int a=0xa, int b=GetNumber(GetNumber(1,2))); |
| 50 |
void get_pointer(void* a=NULL); |
| 51 |
|
| 52 |
void set_ptr(void* p_ptr) { |
| 53 |
printf("this is %p, ptr is %p\n", this, p_ptr); |
| 54 |
ptr = p_ptr; |
| 55 |
}; |
| 56 |
void* get_ptr() {return ptr;}; |
| 57 |
|
| 58 |
Tst_A a; |
| 59 |
Tst_E(int); |
| 60 |
//~Tst_E(); |
| 61 |
}; |
| 62 |
|
| 63 |
|
| 64 |
class Tst_B : public Tst_A |
| 65 |
{ |
| 66 |
static Tst_B* last; |
| 67 |
Tst_B (); |
| 68 |
virtual char* b (); |
| 69 |
static Tst_A* create(); |
| 70 |
static void* create_void() {return new Tst_B;}; |
| 71 |
}; |
| 72 |
|
| 73 |
class Tst_C@luaC : public Tst_B |
| 74 |
{ |
| 75 |
static Tst_C* last; |
| 76 |
Tst_C (int n); |
| 77 |
~Tst_C (); |
| 78 |
virtual char* c (); |
| 79 |
}; |
| 80 |
|
| 81 |
Tst_A::Tst_AA* Tst_create_aa (); |
| 82 |
bool Tst_is_aa (Tst_A::Tst_AA* obj); |
| 83 |
|
| 84 |
class Tst_Outside { |
| 85 |
|
| 86 |
|
| 87 |
tolua_outside void outside_func@outside(lua_State* ls); |
| 88 |
|
| 89 |
static tolua_outside void outside_func@outside_static(Tst_Outside* instance, lua_State* ls); |
| 90 |
|
| 91 |
Tst_Outside() {}; |
| 92 |
}; |
| 93 |
|
| 94 |
|
| 95 |
}; // end of namespace |
| 96 |
|
| 97 |
|