ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/cfperl.h
(Generate patch)

Comparing deliantra/server/include/cfperl.h (file contents):
Revision 1.23 by root, Mon Sep 4 13:55:54 2006 UTC vs.
Revision 1.26 by root, Sat Sep 16 22:24:12 2006 UTC

52#define ARG_INT(v) DT_INT , static_cast<int> (v) 52#define ARG_INT(v) DT_INT , static_cast<int> (v)
53#define ARG_INT64(v) DT_INT64 , static_cast<sint64> (v) 53#define ARG_INT64(v) DT_INT64 , static_cast<sint64> (v)
54#define ARG_DOUBLE(v) DT_DOUBLE, static_cast<double> (v) 54#define ARG_DOUBLE(v) DT_DOUBLE, static_cast<double> (v)
55#define ARG_STRING(v) DT_STRING, static_cast<const char *> (v) 55#define ARG_STRING(v) DT_STRING, static_cast<const char *> (v)
56#define ARG_DATA(s,l) DT_DATA , static_cast<const void *> (s), (l) 56#define ARG_DATA(s,l) DT_DATA , static_cast<const void *> (s), (l)
57#define ARG_OBJECT(o) DT_OBJECT, (void *)static_cast<struct object *> (o) 57#define ARG_OBJECT(o) DT_OBJECT, (void *)static_cast<object *> (o)
58#define ARG_MAP(o) DT_MAP , (void *)static_cast<struct mapstruct *> (o) 58#define ARG_MAP(o) DT_MAP , (void *)static_cast<maptile *> (o)
59#define ARG_PLAYER(o) DT_PLAYER, (void *)static_cast<struct pl *> (o) 59#define ARG_PLAYER(o) DT_PLAYER, (void *)static_cast<player *> (o)
60#define ARG_ARCH(o) DT_ARCH , (void *)static_cast<struct archetype *> (o) 60#define ARG_ARCH(o) DT_ARCH , (void *)static_cast<archetype *> (o)
61#define ARG_PARTY(o) DT_PARTY , (void *)static_cast<struct party *> (o) 61#define ARG_PARTY(o) DT_PARTY , (void *)static_cast<party *> (o)
62#define ARG_REGION(o) DT_REGION, (void *)static_cast<struct region *> (o) 62#define ARG_REGION(o) DT_REGION, (void *)static_cast<region *> (o)
63 63
64// the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension 64// the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension
65 65
66// all these return true when the normal event processing should be skipped (if any) 66// all these return true when the normal event processing should be skipped (if any)
67#define INVOKE_(event, ...) cfperl_invoke (event, ## __VA_ARGS__, DT_END) 67#define INVOKE_(event, ...) cfperl_invoke (event, ## __VA_ARGS__, DT_END)
99 attachable_base () 99 attachable_base ()
100 { 100 {
101 attachable_clear (); 101 attachable_clear ();
102 } 102 }
103 103
104 ~attachable_base ()
105 {
106 clear ();
107 }
108
104 attachable_base (const attachable_base &src) 109 attachable_base (const attachable_base &src)
105 : self (0), cb (0), attach (src.attach) 110 : self (0), cb (0), attach (src.attach)
106 { 111 {
112 }
113
114 attachable_base &operator = (const attachable_base &src)
115 {
116 clear ();
117 attach = src.attach;
118 return *this;
107 } 119 }
108}; 120};
109 121
110// objects attachable from perl (or any other extension) should include or 122// objects attachable from perl (or any other extension) should include or
111// derive using the curiously recurring template pattern, to avoid 123// derive using the curiously recurring template pattern, to avoid

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines