00001 #ifndef DYNOBJ_SQBINDINGS_H
00002 #define DYNOBJ_SQBINDINGS_H
00003
00004
00005
00006 #include "DoBaseI.h"
00007 #include "DynStr.h"
00008 #include "iface/DoWindow.h"
00009 #include "iface/PathFileI.h"
00010
00011 DECLARE_INSTANCE_TYPEINFO(VObj)
00012 DECLARE_INSTANCE_TYPEINFO(DynI)
00013
00014 DECLARE_INSTANCE_TYPEINFO(DoRunTimeI)
00015 DECLARE_INSTANCE_TYPEINFO(PathI)
00016 DECLARE_INSTANCE_TYPEINFO(PathFileI)
00017 DECLARE_INSTANCE_TYPEINFO(NamedRefI)
00018 DECLARE_INSTANCE_TYPEINFO(BaseWindowI)
00019 DECLARE_INSTANCE_TYPEINFO(DynStr)
00020
00021 namespace SqPlus {
00022
00023 const char *GenGetTypeName( SQVM* v, DynI *pdi );
00024
00025
00026
00027
00028 void* GenGet( void *pv, const SQChar *type, SQVM* v, int ix );
00029 bool GenMatch( void *pv, const SQChar *type, SQVM* v, int ix );
00030
00031 void GenPush(SQVM* v, DynI* value);
00032 void GenPush(SQVM* v, VObj* value);
00033
00034 struct InstanceBinder;
00035 InstanceBinder *CreateInstanceBinder( VObj* pvo );
00036 InstanceBinder *CreateInstanceBinder( DynI* pdi );
00037
00038 }
00039
00040
00041
00042
00043
00044 #include "DoBase.hpp"
00045
00046 template <class T, int N>
00047 struct VObjTestImpl {
00048 typedef T type;
00049 };
00050
00051 template <class T>
00052 struct VObjTestImpl<T,1> {
00053 typedef VObj type;
00054 };
00055
00056 template <class T>
00057 struct VObjTester {
00058 typedef typename VObjTestImpl< T,IsVObj<T>::v+DoIsTypeA<T,DynI>::v>::type type;
00059
00060 };
00061
00062
00063 #undef SQPLUS_GEN_CAST
00064
00065
00066 #define SQPLUS_GEN_CAST(TYPE,value) ((typename VObjTester<TYPE>::type*)(value))
00067
00068
00069
00070 #endif // DYNOBJ_SQBINDINGS_H
00071