00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _VM_FUNCTYPE_H_
00018 #define _VM_FUNCTYPE_H_ 1
00019
00027 #include <vm/vmconfig.h>
00028 #include <lib/tl/tlstring.h>
00029
00030
00031 namespace VM
00032 {
00033
00044 struct _packed_ FuncType
00045 {
00046 enum ID
00047 {
00048 Unknown=0,
00049 Function,
00050 Method,
00051 VMethod,
00052 };
00053
00054 ID id : 8;
00055 uint8 exported;
00056
00058 inline FuncType() : id(Unknown),exported(0) {}
00060 inline FuncType(ID _id,uint8 _exported) : id(_id),exported(_exported) {}
00062 inline FuncType(const FuncType &vt) : id(vt.id),exported(vt.exported) {}
00064 inline ~FuncType() {}
00065
00067 inline FuncType &operator=(const FuncType &vt)
00068 { id=vt.id; exported=vt.exported; return(*this); }
00069
00071 inline bool operator==(const FuncType &ft) const
00072 { return(id==ft.id && exported==ft.exported); }
00074 inline bool operator!=(const FuncType &ft) const
00075 { return(id!=ft.id || exported!=ft.exported); }
00076
00078 TLString TypeString() const;
00079 };
00080
00081 }
00082
00083 #endif