#include <wxlbind.h>
Public Member Functions | |
wxLuaBinding () | |
virtual | ~wxLuaBinding () |
virtual bool | RegisterBinding (const wxLuaState &wxlState) |
wxString | GetBindingName () const |
void | SetBindingName (const wxString &name) |
wxString | GetLuaNamespace () const |
void | SetLuaNamespace (const wxString &nameSpace) |
size_t | GetClassCount () const |
wxLuaBindClass * | GetClassArray () |
size_t | GetNumberCount () const |
wxLuaBindNumber * | GetNumberArray () |
size_t | GetStringCount () const |
wxLuaBindString * | GetStringArray () |
size_t | GetEventCount () const |
wxLuaBindEvent * | GetEventArray () |
size_t | GetObjectCount () const |
wxLuaBindObject * | GetObjectArray () |
size_t | GetFunctionCount () const |
wxLuaBindMethod * | GetFunctionArray () |
bool | HaswxLuaType (int wxl_type) const |
const wxLuaBindEvent * | GetBindEvent (wxEventType eventType) const |
wxString | GetEventTypeName (wxEventType eventType) const |
const wxLuaBindClass * | GetBindClass (int wxl_type) const |
const wxLuaBindClass * | GetBindClass (const char *className) const |
const wxLuaBindClass * | GetBindClass (const wxLuaBindMethod *wxlMethod) const |
const wxLuaBindClass * | GetBindClass (const wxLuaBindCFunc *wxlCFunc) const |
Static Public Member Functions | |
static bool | InstallClassMetatable (lua_State *L, const wxLuaBindClass *wxlClass) |
static bool | InstallClass (lua_State *L, const wxLuaBindClass *wxlClass) |
static wxLuaBinding * | GetLuaBinding (const wxString &bindingName) |
static const wxLuaBindClass * | FindBindClass (int wxl_type) |
static const wxLuaBindClass * | FindBindClass (const char *className) |
static const wxLuaBindClass * | FindBindClass (const wxLuaBindMethod *wxlMethod) |
static const wxLuaBindClass * | FindBindClass (const wxLuaBindCFunc *wxlCFunc) |
static const wxLuaBindEvent * | FindBindEvent (wxEventType eventType) |
static wxLuaBinding * | FindMethodBinding (const wxLuaBindMethod *wxlMethod) |
static wxLuaBindMethod * | GetClassMethod (const wxLuaBindClass *wxlClass, const char *methodName, int method_type, bool search_baseclasses) |
static wxLuaBindingList * | GetBindingList () |
static void | InitAllBindings (bool force_update=false) |
Protected Member Functions | |
void | InitBinding () |
virtual void | DoRegisterBinding (const wxLuaState &wxlState) const |
Protected Attributes | |
size_t | m_classCount |
wxLuaBindClass * | m_classArray |
size_t | m_numberCount |
wxLuaBindNumber * | m_numberArray |
size_t | m_stringCount |
wxLuaBindString * | m_stringArray |
size_t | m_eventCount |
wxLuaBindEvent * | m_eventArray |
size_t | m_objectCount |
wxLuaBindObject * | m_objectArray |
size_t | m_functionCount |
wxLuaBindMethod * | m_functionArray |
wxString | m_bindingName |
wxString | m_nameSpace |
int | m_first_wxluatype |
int | m_last_wxluatype |
Static Protected Attributes | |
static wxLuaBindingList | sm_bindingList |
static bool | sm_bindingList_initialized = false |
static int | sm_wxluatype_max = 12 +1 |
Definition at line 525 of file wxlbind.h.
wxLuaBinding::wxLuaBinding | ( | ) |
Definition at line 961 of file wxlbind.cpp.
void wxLuaBinding::DoRegisterBinding | ( | const wxLuaState & | wxlState | ) | const [protected, virtual] |
Definition at line 1089 of file wxlbind.cpp.
References wxLuaBindEvent::eventType, wxLuaState::GetLuaState(), InstallClass(), InstallClassMetatable(), m_classArray, m_classCount, m_eventArray, m_eventCount, m_functionArray, m_functionCount, m_numberArray, m_numberCount, m_objectArray, m_objectCount, m_stringArray, m_stringCount, wxLuaBindEvent::name, wxLuaBindObject::name, wxLuaBindString::name, wxLuaBindNumber::name, wxLuaBindMethod::name, wxLuaBindObject::objPtr, wxLuaState::Ok(), wxLuaBindObject::pObjPtr, wxLuaBindString::value, wxLuaBindNumber::value, wx2lua(), wxluaT_pushuserdatatype(), and wxLuaBindObject::wxluatype.
Referenced by RegisterBinding().
const wxLuaBindClass * wxLuaBinding::FindBindClass | ( | const wxLuaBindCFunc * | wxlCFunc | ) | [static] |
Definition at line 1492 of file wxlbind.cpp.
References GetBindClass(), and sm_bindingList.
const wxLuaBindClass * wxLuaBinding::FindBindClass | ( | const wxLuaBindMethod * | wxlMethod | ) | [static] |
Definition at line 1473 of file wxlbind.cpp.
References GetBindClass(), and sm_bindingList.
const wxLuaBindClass * wxLuaBinding::FindBindClass | ( | const char * | className | ) | [static] |
Definition at line 1435 of file wxlbind.cpp.
References GetBindClass(), and sm_bindingList.
const wxLuaBindClass * wxLuaBinding::FindBindClass | ( | int | wxl_type | ) | [static] |
Definition at line 1454 of file wxlbind.cpp.
References GetBindClass(), and sm_bindingList.
Referenced by wxLuaState::GetBindClass(), InitAllBindings(), wxlua_argerrormsg(), and wxlua_getBindMethodArgsMsg().
const wxLuaBindEvent * wxLuaBinding::FindBindEvent | ( | wxEventType | eventType | ) | [static] |
Definition at line 1511 of file wxlbind.cpp.
References GetBindEvent(), and sm_bindingList.
Referenced by wxLuaState::GetBindEvent().
wxLuaBinding * wxLuaBinding::FindMethodBinding | ( | const wxLuaBindMethod * | wxlMethod | ) | [static] |
Definition at line 1530 of file wxlbind.cpp.
References GetFunctionArray(), GetFunctionCount(), and sm_bindingList.
Referenced by wxlua_argerrormsg().
const wxLuaBindClass * wxLuaBinding::GetBindClass | ( | const wxLuaBindCFunc * | wxlCFunc | ) | const |
Definition at line 1387 of file wxlbind.cpp.
References m_classArray, m_classCount, wxLuaBindMethod::wxluacfuncs, wxLuaBindMethod::wxluacfuncs_n, wxLuaBindClass::wxluamethods, and wxLuaBindClass::wxluamethods_n.
const wxLuaBindClass * wxLuaBinding::GetBindClass | ( | const wxLuaBindMethod * | wxlMethod | ) | const |
Definition at line 1367 of file wxlbind.cpp.
References m_classArray, m_classCount, wxLuaBindClass::wxluamethods, and wxLuaBindClass::wxluamethods_n.
const wxLuaBindClass * wxLuaBinding::GetBindClass | ( | const char * | className | ) | const |
Definition at line 1352 of file wxlbind.cpp.
References m_classArray, m_classCount, and wxLuaBindClassArrayCompareFn().
const wxLuaBindClass * wxLuaBinding::GetBindClass | ( | int | wxl_type | ) | const |
Definition at line 1336 of file wxlbind.cpp.
References m_classArray, m_classCount, and wxLuaBindClassArrayCompareBywxLuaType().
Referenced by FindBindClass(), wxluabind_wxLuaBindCFunc__index(), wxluabind_wxLuaBinding__index(), and wxluabind_wxLuaBindMethod__index().
const wxLuaBindEvent * wxLuaBinding::GetBindEvent | ( | wxEventType | eventType | ) | const |
Definition at line 1317 of file wxlbind.cpp.
References m_eventArray, m_eventCount, and wxLuaBindEventArrayCompareFn().
Referenced by FindBindEvent(), and GetEventTypeName().
static wxLuaBindingList* wxLuaBinding::GetBindingList | ( | ) | [static] |
Definition at line 639 of file wxlbind.h.
Referenced by wxLuaState::RegisterBindings(), wxLua_function_GetBindings(), wxLuaBinding_wxlua_init(), and wxLuaBinding_wxluasocket_init().
wxString wxLuaBinding::GetBindingName | ( | ) | const |
Definition at line 547 of file wxlbind.h.
Referenced by wxLuaDebugData::EnumerateTable(), GetLuaBinding(), and wxluabind_wxLuaBinding__index().
wxLuaBindClass* wxLuaBinding::GetClassArray | ( | ) |
Definition at line 555 of file wxlbind.h.
Referenced by InitAllBindings(), and wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetClassCount | ( | ) | const |
Definition at line 554 of file wxlbind.h.
Referenced by InitAllBindings(), and wxluabind_wxLuaBinding__index().
wxLuaBindMethod * wxLuaBinding::GetClassMethod | ( | const wxLuaBindClass * | wxlClass, | |
const char * | methodName, | |||
int | method_type, | |||
bool | search_baseclasses | |||
) | [static] |
Definition at line 1556 of file wxlbind.cpp.
References wxLuaBindClass::baseBindClasses, wxLuaBindClass::baseclassNames, wxLuaBindMethod::name, WXLUA_HASBIT, wxLuaBindMethodArrayCompareFnGet(), wxLuaBindClass::wxluamethods, and wxLuaBindClass::wxluamethods_n.
Referenced by wxlua_wxLuaBindClass__index(), wxlua_wxLuaBindClass__newindex(), wxlua_wxLuaBindMethod_table__index(), wxlua_wxLuaBindMethod_table__newindex(), and wxLuaBinding_RecurseBaseMethods().
wxLuaBindEvent* wxLuaBinding::GetEventArray | ( | ) |
Definition at line 564 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetEventCount | ( | ) | const |
Definition at line 563 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
wxString wxLuaBinding::GetEventTypeName | ( | wxEventType | eventType | ) | const |
Definition at line 1330 of file wxlbind.cpp.
References GetBindEvent(), lua2wx(), and wxLuaBindEvent::name.
wxLuaBindMethod* wxLuaBinding::GetFunctionArray | ( | ) |
Definition at line 570 of file wxlbind.h.
Referenced by FindMethodBinding(), and wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetFunctionCount | ( | ) | const |
Definition at line 569 of file wxlbind.h.
Referenced by FindMethodBinding(), and wxluabind_wxLuaBinding__index().
wxLuaBinding * wxLuaBinding::GetLuaBinding | ( | const wxString & | bindingName | ) | [static] |
Definition at line 1418 of file wxlbind.cpp.
References GetBindingName(), and sm_bindingList.
wxString wxLuaBinding::GetLuaNamespace | ( | ) | const |
Definition at line 551 of file wxlbind.h.
Referenced by wxLuaDebugData::EnumerateTable(), RegisterBinding(), and wxluabind_wxLuaBinding__index().
wxLuaBindNumber* wxLuaBinding::GetNumberArray | ( | ) |
Definition at line 558 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetNumberCount | ( | ) | const |
Definition at line 557 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
wxLuaBindObject* wxLuaBinding::GetObjectArray | ( | ) |
Definition at line 567 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetObjectCount | ( | ) | const |
Definition at line 566 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
wxLuaBindString* wxLuaBinding::GetStringArray | ( | ) |
Definition at line 561 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
size_t wxLuaBinding::GetStringCount | ( | ) | const |
Definition at line 560 of file wxlbind.h.
Referenced by wxluabind_wxLuaBinding__index().
void wxLuaBinding::InitAllBindings | ( | bool | force_update = false |
) | [static] |
Definition at line 1642 of file wxlbind.cpp.
References wxLuaBindClass::baseBindClasses, wxLuaBindClass::baseclassNames, FindBindClass(), GetClassArray(), GetClassCount(), InitBinding(), sm_bindingList, sm_bindingList_initialized, wxLuaBinding_RecurseBaseMethods(), wxLuaBindClass::wxluamethods, and wxLuaBindClass::wxluamethods_n.
Referenced by wxLuaState::RegisterBinding(), and wxLuaState::RegisterBindings().
void wxLuaBinding::InitBinding | ( | ) | [protected] |
Definition at line 973 of file wxlbind.cpp.
References wxLuaBindClass::enums, wxLuaBindClass::enums_n, m_classArray, m_classCount, m_eventArray, m_eventCount, m_first_wxluatype, m_last_wxluatype, m_numberArray, m_numberCount, m_objectArray, m_objectCount, m_stringArray, m_stringCount, sm_wxluatype_max, WXLUA_TUNKNOWN, wxLuaBindClassArrayCompareFn(), wxLuaBindEventArrayCompareFn(), wxLuaBindMethodArrayCompareFnInit(), wxLuaBindNumberArrayCompareFn(), wxLuaBindObjectArrayCompareFn(), wxLuaBindStringArrayCompareFn(), wxLuaBindClass::wxluamethods, wxLuaBindClass::wxluamethods_n, and wxLuaBindClass::wxluatype.
Referenced by InitAllBindings().
bool wxLuaBinding::InstallClass | ( | lua_State * | L, | |
const wxLuaBindClass * | wxlClass | |||
) | [static] |
Definition at line 1208 of file wxlbind.cpp.
References wxLuaBindClass::enums, wxLuaBindClass::enums_n, wxLuaBindCFunc::lua_cfunc, wxLuaBindMethod::method_type, wxLuaBindMethod::name, wxLuaBindNumber::name, wxLuaBindClass::name, wxLuaBindNumber::value, wxlua_callOverloadedFunction(), WXLUA_HASBIT, wxlua_wxLuaBindMethod_table__call(), wxlua_wxLuaBindMethod_table__index(), wxlua_wxLuaBindMethod_table__newindex(), wxLuaBindMethod::wxluacfuncs, wxLuaBindMethod::wxluacfuncs_n, WXLUAMETHOD_CFUNCTION, WXLUAMETHOD_CONSTRUCTOR, WXLUAMETHOD_METHOD, WXLUAMETHOD_STATIC, wxLuaBindClass::wxluamethods, and wxLuaBindClass::wxluamethods_n.
Referenced by DoRegisterBinding().
bool wxLuaBinding::InstallClassMetatable | ( | lua_State * | L, | |
const wxLuaBindClass * | wxlClass | |||
) | [static] |
Definition at line 1158 of file wxlbind.cpp.
References wxLuaBindClass::name, wxlua_lreg_classes_key, wxlua_metatable_wxluabindclass_key, wxlua_wxLuaBindClass__gc(), wxlua_wxLuaBindClass__index(), wxlua_wxLuaBindClass__newindex(), wxlua_wxLuaBindClass__tostring(), wxluaT_getmetatable(), and wxluaT_newmetatable().
Referenced by wxLuaState::Create(), and DoRegisterBinding().
bool wxLuaBinding::RegisterBinding | ( | const wxLuaState & | wxlState | ) | [virtual] |
Reimplemented in wxLuaBinding_wxlua.
Definition at line 1017 of file wxlbind.cpp.
References DoRegisterBinding(), GetLuaNamespace(), wxLuaState::GetLuaState(), m_nameSpace, wxLuaState::Ok(), wx2lua(), wxlua_lreg_refs_key, wxlua_lreg_wxluabindings_key, and wxluaR_ref().
Referenced by wxLuaState::RegisterBinding(), and wxLuaState::RegisterBindings().
void wxLuaBinding::SetBindingName | ( | const wxString & | name | ) |
void wxLuaBinding::SetLuaNamespace | ( | const wxString & | nameSpace | ) |
wxString wxLuaBinding::m_bindingName [protected] |
wxLuaBindClass* wxLuaBinding::m_classArray [protected] |
Definition at line 659 of file wxlbind.h.
Referenced by DoRegisterBinding(), GetBindClass(), and InitBinding().
size_t wxLuaBinding::m_classCount [protected] |
Definition at line 658 of file wxlbind.h.
Referenced by DoRegisterBinding(), GetBindClass(), and InitBinding().
wxLuaBindEvent* wxLuaBinding::m_eventArray [protected] |
Definition at line 665 of file wxlbind.h.
Referenced by DoRegisterBinding(), GetBindEvent(), and InitBinding().
size_t wxLuaBinding::m_eventCount [protected] |
Definition at line 664 of file wxlbind.h.
Referenced by DoRegisterBinding(), GetBindEvent(), and InitBinding().
int wxLuaBinding::m_first_wxluatype [protected] |
Definition at line 673 of file wxlbind.h.
Referenced by InitBinding().
wxLuaBindMethod* wxLuaBinding::m_functionArray [protected] |
Definition at line 669 of file wxlbind.h.
Referenced by DoRegisterBinding().
size_t wxLuaBinding::m_functionCount [protected] |
Definition at line 668 of file wxlbind.h.
Referenced by DoRegisterBinding().
int wxLuaBinding::m_last_wxluatype [protected] |
Definition at line 674 of file wxlbind.h.
Referenced by InitBinding().
wxString wxLuaBinding::m_nameSpace [protected] |
Definition at line 672 of file wxlbind.h.
Referenced by RegisterBinding().
wxLuaBindNumber* wxLuaBinding::m_numberArray [protected] |
Definition at line 661 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
size_t wxLuaBinding::m_numberCount [protected] |
Definition at line 660 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
wxLuaBindObject* wxLuaBinding::m_objectArray [protected] |
Definition at line 667 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
size_t wxLuaBinding::m_objectCount [protected] |
Definition at line 666 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
wxLuaBindString* wxLuaBinding::m_stringArray [protected] |
Definition at line 663 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
size_t wxLuaBinding::m_stringCount [protected] |
Definition at line 662 of file wxlbind.h.
Referenced by DoRegisterBinding(), and InitBinding().
wxLuaBindingList wxLuaBinding::sm_bindingList [static, protected] |
Definition at line 676 of file wxlbind.h.
Referenced by FindBindClass(), FindBindEvent(), FindMethodBinding(), GetLuaBinding(), and InitAllBindings().
bool wxLuaBinding::sm_bindingList_initialized = false [static, protected] |
Definition at line 677 of file wxlbind.h.
Referenced by InitAllBindings().
int wxLuaBinding::sm_wxluatype_max = 12 +1 [static, protected] |
Definition at line 678 of file wxlbind.h.
Referenced by InitBinding().