mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-11-22 10:12:20 +00:00
Добавлена поддержка Lua функций
This commit is contained in:
parent
d8197802d8
commit
74237747c1
@ -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* CLuaArguments::PushArgument ( const CLuaArgument & argument )
|
||||||
{
|
{
|
||||||
CLuaArgument* pArgument = new CLuaArgument (argument); // create a copy
|
CLuaArgument* pArgument = new CLuaArgument (argument); // create a copy
|
||||||
|
@ -50,10 +50,12 @@ public:
|
|||||||
CLuaArgument* PushNumber ( double dNumber );
|
CLuaArgument* PushNumber ( double dNumber );
|
||||||
CLuaArgument* PushString ( const char* szString );
|
CLuaArgument* PushString ( const char* szString );
|
||||||
CLuaArgument* PushUserData ( void* pUserData );
|
CLuaArgument* PushUserData ( void* pUserData );
|
||||||
|
CLuaArgument* PushFunction ( lua_CFunction iFunction );
|
||||||
CLuaArgument* PushArgument ( const CLuaArgument& argument );
|
CLuaArgument* PushArgument ( const CLuaArgument& argument );
|
||||||
|
|
||||||
void DeleteArguments ( void );
|
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 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 IterBegin ( void ) { return m_Arguments.begin (); };
|
||||||
inline vector < CLuaArgument* > ::const_iterator IterEnd ( void ) { return m_Arguments.end (); };
|
inline vector < CLuaArgument* > ::const_iterator IterEnd ( void ) { return m_Arguments.end (); };
|
||||||
|
Loading…
Reference in New Issue
Block a user