4 #include <xplc/delete.h>
6 #include <xplc/uuidops.h>
13 /// a pointer to any interface of this object
16 /// the iid of the above interface
19 /// a pointer to this object's IObject interface, if any
22 /// a string representing this item (only if all above objects are NULL)
25 AnyType(void *_raw
, const UUID
&_iid
, IObject
*_obj
= NULL
)
26 : iid(_iid
), obj(_obj
)
27 { raw
= _raw
; if (_obj
) _obj
->addRef(); }
29 AnyType(WvStringParm _str
)
30 : iid(UUID_null
), obj(0), str(_str
)
34 : iid(UUID_null
), obj(0)
38 { /* automatic via xplc_ptr */ }
40 bool switchto(const UUID
&niid
)
42 if (iid
== niid
) return true; // already done!
43 if (iid
== UUID_null
) return true; // anybody can do that...
44 if (!obj
) return false;
46 IObject
*n
= obj
->getInterface(niid
);
59 if (switchto(XPLC_IID
<T
>::get()))