Changeset 62 for trunk/tests


Ignore:
Timestamp:
05/30/13 16:44:38 (12 years ago)
Author:
epyon
Message:
  • type -> etype - to reduce confusion for the compiler
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/lualib_test/lualib_test.cc

    r53 r62  
    33#include <nv/lua/lua_glm.hh>
    44#include <nv/logger.hh>
     5#include <nv/types.hh>
     6#include <nv/object.hh>
    57#include <string>
    68#include <iostream>
     9#include <functional>
     10
     11struct test_struct
     12{
     13        std::string f;
     14        int i;
     15};
     16
     17NV_REGISTER_NAME( test_struct )
    718
    819int main(int, char* [])
    920{
     21        nv::type_database db;
     22        nv::object::register_type( &db );
     23
     24        db.create_type<int>();
     25        db.create_type<std::string>();
     26        nv::type_field fields[] = {
     27                nv::type_field("f", &test_struct::f ),
     28                nv::type_field("i", &test_struct::i ),
     29        };
     30        db.create_type<test_struct>().fields( fields );
     31
     32
    1033        nv::logger log(nv::LOG_TRACE);
    1134        log.add_sink( new nv::log_file_sink("log.txt"), nv::LOG_TRACE );
    1235        log.add_sink( new nv::log_console_sink(), nv::LOG_TRACE );
    1336        nv::load_lua_library();
    14                
     37       
    1538        NV_LOG( nv::LOG_NOTICE, "Logging started" );
    1639
     
    3861        luaL_dofile(lua_state, "init.lua");
    3962
    40         while (true)
     63        for (;;)
    4164        {
    4265                std::string input;
Note: See TracChangeset for help on using the changeset viewer.