41 template<
typename T_ZFObject>
42 zfany(
ZF_IN T_ZFObject
const &obj) : _ZFP_obj(_ZFP_zfanyCast(obj)) {}
46 _ZFP_obj = obj._ZFP_obj;
49 template<
typename T_ZFObject>
50 inline zfany &operator = (
ZF_IN T_ZFObject
const &obj) {
51 _ZFP_obj = _ZFP_zfanyCast(obj);
56 template<
typename T_ZFObject>
57 inline zfbool operator == (
ZF_IN T_ZFObject
const &obj)
const {
58 return this->
toObject() == _ZFP_zfanyCast(obj);
60 template<
typename T_ZFObject>
61 inline zfbool operator != (
ZF_IN T_ZFObject
const &obj)
const {
62 return this->
toObject() != _ZFP_zfanyCast(obj);
66 inline ZFObject *operator -> (
void)
const {
69 inline operator ZFObject * (void)
const {
72 template<
typename T_ZFObject>
73 inline operator T_ZFObject * (void)
const {
74 return zfcast(T_ZFObject *, _ZFP_obj);
78 static const ZFClass *ClassData(
void);
91 template<
typename T_ZFObject>
92 inline T_ZFObject
to(
void)
const {
93 return zfcast(T_ZFObject, _ZFP_obj);
105template<
typename T_ZFObjectBase>
113 template<
typename T_ZFObject>
118 zfany::operator = (obj);
122 zfany::operator = ((
zfany const &)obj);
125 template<
typename T_ZFObject>
127 zfany::operator = (obj);
132 template<
typename T_ZFObject>
133 inline zfbool operator == (
ZF_IN T_ZFObject
const &obj)
const {
134 return this->
toObject() == _ZFP_zfanyCast(obj);
136 template<
typename T_ZFObject>
137 inline zfbool operator != (
ZF_IN T_ZFObject
const &obj)
const {
138 return this->
toObject() != _ZFP_zfanyCast(obj);
142 inline T_ZFObjectBase *operator -> (
void)
const {
152 static const ZFClass *ClassData(
void) {
153 return T_ZFObjectBase::ClassData();
161template<
typename T_ZFObject>
163 return e.toObject() == _ZFP_zfanyCast(obj);
165template<
typename T_ZFObject>
167 return e.toObject() != _ZFP_zfanyCast(obj);
171template<
typename T_ZFObject,
typename T_ZFObjectBase>
173 return e.toObject() == _ZFP_zfanyCast(obj);
175template<
typename T_ZFObject,
typename T_ZFObjectBase>
177 return e.toObject() != _ZFP_zfanyCast(obj);
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define zfclassPOD
shows the class is a POD type
Definition ZFCoreTypeDef_ClassType.h:35
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
#define ZFCORE_POD_DECLARE_NO_COMPARER(Type)
explicitly declare as POD
Definition ZFCoreUtilTemplate.h:563
#define ZFCORE_POD_DECLARE_TEMPLATE_NO_COMPARER(T_Type, Type)
explicitly declare as POD
Definition ZFCoreUtilTemplate.h:566
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition ZFObjectCast.h:28
ZFObject's class info.
Definition ZFClass.h:67
base class of all objects
Definition ZFObjectCore.h:209
util method to cast ZFObject types freely
Definition zfany.h:35
T_ZFObject to(void) const
cast by zfcast
Definition zfany.h:92
ZFObject * toObject(void) const
get the holded object
Definition zfany.h:85
see zfany
Definition zfany.h:106