Ignore:
Timestamp:
01/25/17 20:20:45 (8 years ago)
Author:
epyon
Message:
  • lua::stack_proxy RTTI read support
  • missing RTTI declarations
  • new lua::table_guard syntax
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua_proxy.cc

    r539 r540  
    99#include "nv/lua/lua_raw.hh"
    1010#include "nv/lua/lua_state.hh"
     11#include "nv/lua/lua_types.hh"
    1112
    1213using namespace nv;
     
    5859}
    5960
     61bool nv::lua::stack_proxy::is_valid() const
     62{
     63        return !( lua_isnil( *m_state, m_index ) );
     64}
     65
     66bool nv::lua::stack_proxy::read( const type_entry* entry, void* object ) const
     67{
     68        NV_ASSERT_ALWAYS( m_state->get_type_data()->get_type_database() == entry->type_db, "Type database mismatch between Lua and entry!" );
     69        if ( lua_type( *m_state, m_index ) != LUA_TTABLE ) return false;
     70        return nv::lua::read_rtti_type( m_state, entry, object, m_index );
     71}
     72
    6073bool nv::lua::stack_proxy::is_table() const
    6174{
Note: See TracChangeset for help on using the changeset viewer.