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 zfbool (
void)
const {
72 inline operator ZFObject * (void)
const {
75 template<
typename T_ZFObject>
76 inline operator T_ZFObject * (void)
const {
77 return zfcast(T_ZFObject *, _ZFP_obj);
81 static const ZFClass *ClassData(
void);
94 template<
typename T_ZFObject>
95 inline T_ZFObject
to(
void)
const {
96 return zfcast(T_ZFObject, _ZFP_obj);
108template<
typename T_ZFObjectBase>
116 template<
typename T_ZFObject>
121 zfany::operator = (obj);
125 zfany::operator = ((
zfany const &)obj);
128 template<
typename T_ZFObject>
130 zfany::operator = (obj);
135 template<
typename T_ZFObject>
136 inline zfbool operator == (
ZF_IN T_ZFObject
const &obj)
const {
137 return this->
toObject() == _ZFP_zfanyCast(obj);
139 template<
typename T_ZFObject>
140 inline zfbool operator != (
ZF_IN T_ZFObject
const &obj)
const {
141 return this->
toObject() != _ZFP_zfanyCast(obj);
145 inline T_ZFObjectBase *operator -> (
void)
const {
155 static const ZFClass *ClassData(
void) {
156 return T_ZFObjectBase::ClassData();
164template<
typename T_ZFObject>
166 return e.toObject() == _ZFP_zfanyCast(obj);
168template<
typename T_ZFObject>
170 return e.toObject() != _ZFP_zfanyCast(obj);
174template<
typename T_ZFObject,
typename T_ZFObjectBase>
176 return e.toObject() == _ZFP_zfanyCast(obj);
178template<
typename T_ZFObject,
typename T_ZFObjectBase>
180 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:565
#define ZFCORE_POD_DECLARE_TEMPLATE_NO_COMPARER(T_Type, Type)
explicitly declare as POD
Definition ZFCoreUtilTemplate.h:568
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
ZFObject's class info.
Definition ZFClass.h:66
base class of all objects
Definition ZFObjectCore.h:205
util method to cast ZFObject types freely
Definition zfany.h:35
T_ZFObject to(void) const
cast by zfcast
Definition zfany.h:95
ZFObject * toObject(void) const
get the holded object
Definition zfany.h:88
see zfany
Definition zfany.h:109
#define zfcast(T_To, obj)
safely cast ZFObject types, return null if not desired type
Definition zfcast.h:28