Changeset 3333

Show
Ignore:
Timestamp:
01/30/10 13:25:17 (7 months ago)
Author:
trichards
Message:

Added ScriptLoginTest? script and LoginTest? class.

Location:
tests/trunk/ScriptLoginTest
Files:
3 added
2 modified

Legend:

Unmodified
Added
Removed
  • tests/trunk/ScriptLoginTest

    • Property svn:ignore
      •  

        old new  
        11CMakeLists.txt 
        22config.xml 
         3loginTest.bat 
  • tests/trunk/ScriptLoginTest/main.cpp

    r3315 r3333  
    11#include <Zen/Enterprise/AppServer/I_Container.hpp> 
     2#include <Zen/Enterprise/AppServer/I_ApplicationServer.hpp> 
     3 
     4#include <Zen/Core/Scripting.hpp> 
     5 
     6#include "LoginTest.hpp" 
    27 
    38int main(int _argc, const char* _argv[]) 
     
    611 
    712    container.init(_argc, _argv); 
    8     return container.run(); 
     13 
     14    Zen::Scripting::script_module module(container.getApplicationServer().getDefaultScriptEngine(), "LoginTest"); 
     15 
     16    module.addType<LoginTest>("LoginTest", "Login Test") 
     17        .addMethod("run", &LoginTest::run) 
     18        .addMethod("quit", &LoginTest::quit) 
     19        .addMethod("getTickEvent",&LoginTest::getTickEvent) 
     20        .createGlobalObject("loginTest", new LoginTest(&module)); 
     21    ; 
     22 
     23    // Run the container.  This should invoke the script and when the script 
     24    // returns, we should shutdown the app server and exit. 
     25    int rc = container.run(); 
     26 
     27    // TODO Shutdown the app server. 
     28 
     29    return rc; 
    930}