6 #include <xplc/utils.h>
9 class MyMulti
: public IMulti
11 IMPLEMENT_IOBJECT(MyMulti
);
15 MyMulti(WvStringParm _s
)
17 { printf("creating '%s'\n", s
.cstr()); }
20 { printf("deleting '%s'\n", s
.cstr()); }
22 virtual const char *getString() { return s
.edit(); }
23 virtual void setString(const char *_s
) { s
= _s
; }
25 virtual int getInt() { return s
.num(); }
26 virtual void setInt(int i
) { s
= i
; }
28 virtual bool getBool() { return !!s
; }
29 virtual void setBool(bool b
) { s
= b
; }
31 // FIXME: this is a hack to make things slightly less ugly when
32 // typecasting, because C++ can't deal with lots of IObject-based parents.
34 { return (IString
*)this; }