Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 13, 2011, 11:58:07 PM (13 years ago)
Author:
landauf
Message:

Exported orxout() and the output levels to lua, replaces logMessage() and cout().
Note that OutputDefinitions.h is now included in the tolua section of core, even though the file is in util. But I guess that's ok.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/LuaState.cc

    r8806 r8840  
    3636}
    3737#include <loki/ScopeGuard.h>
    38 #include <boost/preprocessor/stringize.hpp>
    3938
    4039#include "util/Output.h"
     
    237236    }
    238237
    239     void LuaState::luaLog(unsigned int level, const std::string& message)
    240     {
    241 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: use correct level, inspect lua support (and remove boost include)")
    242         orxout(debug_output, context::lua) << "luaLog (level: " << level << "): " << message << endl;
     238    void LuaState::luaOutput(OutputLevel level, const std::string& context, const std::string& message)
     239    {
     240        orxout(level, registerContext(context)) << message << endl;
     241    }
     242
     243    void LuaState::luaOutput(OutputLevel level, const std::string& message)
     244    {
     245        orxout(level, context::lua) << message << endl;
     246    }
     247
     248    void LuaState::luaOutput(const std::string& message)
     249    {
     250        orxout(debug_output, context::lua) << message << endl;
    243251    }
    244252
Note: See TracChangeset for help on using the changeset viewer.