Добавлена поддержка Lua функций

This commit is contained in:
Kernell 2015-11-29 18:47:49 +03:00
parent d8197802d8
commit 74237747c1
3 changed files with 264 additions and 254 deletions

View File

@ -151,6 +151,14 @@ CLuaArgument* CLuaArguments::PushUserData ( void* pUserData )
}
CLuaArgument* CLuaArguments::PushFunction( lua_CFunction iFunction )
{
CLuaArgument* pArgument = new CLuaArgument ( iFunction );
m_Arguments.push_back ( pArgument );
return pArgument;
}
CLuaArgument* CLuaArguments::PushArgument ( const CLuaArgument & argument )
{
CLuaArgument* pArgument = new CLuaArgument (argument); // create a copy

View File

@ -50,10 +50,12 @@ public:
CLuaArgument* PushNumber ( double dNumber );
CLuaArgument* PushString ( const char* szString );
CLuaArgument* PushUserData ( void* pUserData );
CLuaArgument* PushFunction ( lua_CFunction iFunction );
CLuaArgument* PushArgument ( const CLuaArgument& argument );
void DeleteArguments ( void );
inline vector < CLuaArgument* > GetArguments ( void ) { return m_Arguments; }
inline unsigned int Count ( void ) const { return static_cast < unsigned int > ( m_Arguments.size () ); };
inline vector < CLuaArgument* > ::const_iterator IterBegin ( void ) { return m_Arguments.begin (); };
inline vector < CLuaArgument* > ::const_iterator IterEnd ( void ) { return m_Arguments.end (); };