Changeset 511 for trunk/src/lua


Ignore:
Timestamp:
07/28/16 20:31:39 (9 years ago)
Author:
epyon
Message:
  • RTTI upgrades
File:
1 edited

Legend:

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

    r509 r511  
    750750}
    751751
     752void nv::lua::state::register_enum( const type_entry* type )
     753{
     754        NV_ASSERT_ALWAYS( type, "type not found!" );
     755        NV_ASSERT_ALWAYS( !type->enum_list.empty(), "type not enum!" );
     756        type_database* db = type->type_db;
     757        for ( auto e : type->enum_list )
     758        {
     759                lua_pushinteger( m_state, e.value );
     760                lua_setglobal( m_state, db->resolve_name( e.name ).data() );
     761        }
     762}
     763
    752764void nv::lua::state::register_rtti_type( thash64 tid, lua_rtti_push_function p, lua_rtti_read_function r )
    753765{
Note: See TracChangeset for help on using the changeset viewer.