… | |
… | |
60 | |
60 | |
61 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
61 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
62 | |
62 | |
63 | void cfperl_init (); |
63 | void cfperl_init (); |
64 | void cfperl_main (); |
64 | void cfperl_main (); |
|
|
65 | void cfperl_emergency_save (); |
65 | |
66 | |
66 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | |
68 | |
68 | // virtual server time, excluding time jumps and lag |
69 | // virtual server time, excluding time jumps and lag |
69 | extern double runtime; |
70 | extern double runtime; |
… | |
… | |
140 | int ACC (RW, flags); |
141 | int ACC (RW, flags); |
141 | |
142 | |
142 | MTH void refcnt_inc () const { ++refcnt; } |
143 | MTH void refcnt_inc () const { ++refcnt; } |
143 | MTH void refcnt_dec () const { --refcnt; } |
144 | MTH void refcnt_dec () const { --refcnt; } |
144 | |
145 | |
|
|
146 | MTH int refcnt_cnt () const; |
145 | // check wether the object has died and destroy |
147 | // check wether the object has died and destroy |
146 | MTH void refcnt_chk () { if (refcnt <= 0) do_check (); } |
148 | MTH void refcnt_chk () { if (refcnt <= 0) do_check (); } |
147 | |
149 | |
148 | // destroy the object unless it was already destroyed |
150 | // destroy the object unless it was already destroyed |
149 | // this politely asks everybody interested the reduce |
151 | // this politely asks everybody interested the reduce |
… | |
… | |
180 | virtual ~attachable (); |
182 | virtual ~attachable (); |
181 | |
183 | |
182 | attachable &operator =(const attachable &src); |
184 | attachable &operator =(const attachable &src); |
183 | |
185 | |
184 | bool invoke (event_type event, ...); |
186 | bool invoke (event_type event, ...); |
185 | void instantiate (); |
187 | MTH void instantiate (); |
186 | void reattach (); |
188 | void reattach (); |
187 | |
189 | |
188 | protected: |
190 | protected: |
189 | // do the real refcount checking work |
191 | // do the real refcount checking work |
190 | void do_check (); |
192 | void do_check (); |