FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
oop_istypeof.c
Go to the documentation of this file.
1
/* is operator */
2
3
#include "
fb.h
"
4
5
FBCALL
int
fb_IsTypeOf
(
FB_OBJECT
*obj,
FB_RTTI
*typeRTTI )
6
{
7
if
( obj ==
NULL
)
8
return
FB_FALSE
;
9
10
FB_RTTI
*objRTTI = ((
FB_BASEVT
*)(((
unsigned
char
*)obj->
pVT
) -
sizeof
(
FB_BASEVT
)))->pRTTI;
11
while
( objRTTI !=
NULL
)
12
{
13
/* note: can't compare just the address because object or type could be declared in a DLL */
14
if
( strcmp( objRTTI->
id
, typeRTTI->
id
) == 0 )
15
return
FB_TRUE
;
16
17
objRTTI = objRTTI->
pRTTIBase
;
18
}
19
20
return
FB_FALSE
;
21
}
rtlib
oop_istypeof.c
Generated on Thu Jan 23 2014 19:40:12 for FreeBASIC by
1.8.4