Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 4, 2011, 2:47:44 AM (13 years ago)
Author:
rgrieder
Message:

Merged unity_build branch back to trunk.

Features:

  • Implemented fully automatic build units to speed up compilation if requested
  • Added DOUT macro for quick debug output
  • Activated text colouring in the POSIX IOConsole
  • DeclareToluaInterface is not necessary anymore

Improvements:

  • Output levels now change appropriately when switch back and forth from dev mode
  • Log level for the file output is now also correct during startup
  • Removed some header file dependencies in core and tools to speed up compilation

no more file for command line options

  • Improved util::tribool by adapting some concepts from boost::tribool

Regressions:

  • It is not possible anymore to specify command line arguments in an extra file because we've got config values for that purpose.
Location:
code/trunk
Files:
1 deleted
37 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/CMakeLists.txt

    r8351 r8729  
    1919
    2020SET_SOURCE_FILES(CORE_SRC_FILES
     21
     22#BUILD_UNIT CoreStableBuildUnit.cc
     23  ClassTreeMask.cc
    2124  CommandLineParser.cc
    2225  ConfigValueContainer.cc
    23   Core.cc
    2426  DynLib.cc
    2527  DynLibManager.cc
     
    2830  GameMode.cc
    2931  GameState.cc
    30   GraphicsManager.cc
    31   GUIManager.cc
     32  Identifier.cc
    3233  Language.cc
     34  Loader.cc
    3335  LuaState.cc
     36  MetaObjectList.cc
     37  Namespace.cc
     38  NamespaceNode.cc
    3439  ObjectListBase.cc
    3540  OrxonoxClass.cc
    36   Resource.cc
    37 
    38   # hierarchy
    39   Identifier.cc
    40   MetaObjectList.cc
    41 
    42   # level
    43   BaseObject.cc
    44   ClassTreeMask.cc
    45   Loader.cc
    46   Namespace.cc
    47   NamespaceNode.cc
    4841  Template.cc
    49   XMLPort.cc
    50 
    51 COMPILATION_BEGIN ListenerCompilation.cc
    5242  ViewportEventListener.cc
    5343  WindowEventListener.cc
    5444  XMLNameListener.cc
    55 COMPILATION_END
     45  XMLPort.cc
     46#END_BUILD_UNIT
    5647
    57 COMPILATION_BEGIN FilesystemCompilation.cc
     48  BaseObject.cc
     49  Core.cc
     50
     51BUILD_UNIT OgreBuildUnit.cc
     52  GraphicsManager.cc
     53  GUIManager.cc
     54  Resource.cc
     55END_BUILD_UNIT
     56
     57BUILD_UNIT FilesystemBuildUnit.cc
    5858  command/ArgumentCompletionFunctions.cc
    5959  ConfigFileManager.cc
    6060  PathConfig.cc
    61 COMPILATION_END
     61END_BUILD_UNIT
    6262
    63   # multithreading
    64   ThreadPool.cc
    65 COMPILATION_BEGIN ThreadCompilation.cc
     63BUILD_UNIT ThreadBuildUnit.cc
    6664  command/TclThreadManager.cc
    6765  Thread.cc
    68 COMPILATION_END
     66  ThreadPool.cc
     67END_BUILD_UNIT
    6968)
    7069
  • code/trunk/src/libraries/core/CommandLineParser.cc

    r7401 r8729  
    4141namespace orxonox
    4242{
    43     SetCommandLineOnlyArgument(optionsFile, "start.ini").shortcut("o");
    44 
    4543    /**
    4644    @brief
     
    5048        so that you can have simple command line switches.
    5149    */
    52     void CommandLineArgument::parse(const std::string& value, bool bParsingFile)
    53     {
    54         if (bParsingFile && this->bCommandLineOnly_)
    55             ThrowException(Argument, "Command line argument '" + getName() + "' is not allowed in files.");
     50    void CommandLineArgument::parse(const std::string& value)
     51    {
    5652        if (value_.getType() == MT_Type::Bool)
    5753        {
     
    116112    }
    117113
    118     /**
    119     @brief
    120         Reads the command line parses the values of each argument.
    121         It is then stored in the corresponding CommandLineArgument.
     114    /** Parses the command line string for arguments and stores these.
    122115    @note
    123116        The reason that you have to provide the string to be parsed as
    124         space separted list is because of argc and argv. If you only have
     117        space separated list is because of argc and argv. If you only have
    125118        a whole string, simply use getAllStrings() of SubString.
    126     @param arguments
    127         Vector of space separated strings.
    128     @param bParsingFile
    129         Parsing a file or the command line itself
    130     */
    131     void CommandLineParser::_parse(const std::vector<std::string>& arguments, bool bParsingFile)
    132     {
     119    @param cmdLine
     120        Command line string WITHOUT the execution path.
     121    */
     122    void CommandLineParser::_parse(const std::string& cmdLine)
     123    {
     124        std::vector<std::string> arguments;
     125        SubString tokens(cmdLine, " ", " ", false, '\\', true, '"', true, '\0', '\0', false);
     126        for (unsigned i = 0; i < tokens.size(); ++i)
     127            arguments.push_back(tokens[i]);
     128
    133129        try
    134130        {
     
    177173                            if (!name.empty())
    178174                            {
    179                                 checkFullArgument(name, value, bParsingFile);
     175                                checkFullArgument(name, value);
    180176                                name.clear();
    181177                                assert(shortcut.empty());
     
    183179                            else if (!shortcut.empty())
    184180                            {
    185                                 checkShortcut(shortcut, value, bParsingFile);
     181                                checkShortcut(shortcut, value);
    186182                                shortcut.clear();
    187183                                assert(name.empty());
     
    222218            if (!name.empty())
    223219            {
    224                 checkFullArgument(name, value, bParsingFile);
     220                checkFullArgument(name, value);
    225221                assert(shortcut.empty());
    226222            }
    227223            else if (!shortcut.empty())
    228224            {
    229                 checkShortcut(shortcut, value, bParsingFile);
     225                checkShortcut(shortcut, value);
    230226                assert(name.empty());
    231227            }
     
    233229        catch (const ArgumentException& ex)
    234230        {
    235             COUT(0) << "Could not parse command line (including additional files): " << ex.what() << std::endl;
     231            COUT(0) << "Could not parse command line: " << ex.what() << std::endl;
    236232            COUT(0) << CommandLineParser::getUsageInformation() << std::endl;
    237233            throw GeneralException("");
     
    249245        Parsing a file or the command line itself
    250246    */
    251     void CommandLineParser::checkFullArgument(const std::string& name, const std::string& value, bool bParsingFile)
     247    void CommandLineParser::checkFullArgument(const std::string& name, const std::string& value)
    252248    {
    253249        std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgs_.find(name);
     
    255251            ThrowException(Argument, "Command line argument '" + name + "' does not exist.");
    256252
    257         it->second->parse(value, bParsingFile);
     253        it->second->parse(value);
    258254    }
    259255
     
    268264        Parsing a file or the command line itself
    269265    */
    270     void CommandLineParser::checkShortcut(const std::string& shortcut, const std::string& value, bool bParsingFile)
     266    void CommandLineParser::checkShortcut(const std::string& shortcut, const std::string& value)
    271267    {
    272268        std::map<std::string, CommandLineArgument*>::const_iterator it = cmdLineArgsShortcut_.find(shortcut);
     
    274270            ThrowException(Argument, "Command line shortcut '" + shortcut + "' does not exist.");
    275271
    276         it->second->parse(value, bParsingFile);
     272        it->second->parse(value);
    277273    }
    278274
     
    342338        }
    343339    }
    344 
    345     /**
    346     @brief
    347         Parses only the command line for CommandLineArguments.
    348     */
    349     void CommandLineParser::_parseCommandLine(const std::string& cmdLine)
    350     {
    351         std::vector<std::string> args;
    352         SubString tokens(cmdLine, " ", " ", false, '\\', true, '"', true, '\0', '\0', false);
    353         for (unsigned i = 0; i < tokens.size(); ++i)
    354             args.push_back(tokens[i]);
    355         this->_parse(args, false);
    356     }
    357 
    358     /**
    359     @brief
    360         Parses start.ini (or the file specified with --optionsFile) for CommandLineArguments.
    361     */
    362     void CommandLineParser::_parseFile()
    363     {
    364         const std::string& filename = CommandLineParser::getValue("optionsFile").getString();
    365 
    366         // look for additional arguments in given file or start.ini as default
    367         // They will not overwrite the arguments given directly
    368         std::ifstream file;
    369         file.open((PathConfig::getConfigPathString() + filename).c_str());
    370         std::vector<std::string> args;
    371         if (file)
    372         {
    373             while (!file.eof())
    374             {
    375                 std::string line;
    376                 std::getline(file, line);
    377                 line = removeTrailingWhitespaces(line);
    378                 //if (!(line[0] == '#' || line[0] == '%'))
    379                 //{
    380                 SubString tokens(line, " ", " ", false, '\\', true, '"', true, '\0', '\0', false, '#');
    381                 for (unsigned i = 0; i < tokens.size(); ++i)
    382                     if (tokens[i][0] != '#')
    383                         args.push_back(tokens[i]);
    384                 //args.insert(args.end(), tokens.getAllStrings().begin(), tokens.getAllStrings().end());
    385                 //}
    386             }
    387             file.close();
    388         }
    389 
    390         _parse(args, true);
    391     }
    392340}
  • code/trunk/src/libraries/core/CommandLineParser.h

    r7401 r8729  
    5151#define SetCommandLineArgument(name, defaultValue) \
    5252    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
    53     = orxonox::CommandLineParser::addArgument(#name, defaultValue, false)
    54 #define SetCommandLineOnlyArgument(name, defaultValue) \
    55     orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
    56     = orxonox::CommandLineParser::addArgument(#name, defaultValue, true)
     53    = orxonox::CommandLineParser::addArgument(#name, defaultValue)
    5754#define SetCommandLineSwitch(name) \
    5855    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
    59     = orxonox::CommandLineParser::addArgument(#name, false, false)
    60 #define SetCommandLineOnlySwitch(name) \
    61     orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
    62     = orxonox::CommandLineParser::addArgument(#name, false, true)
    63 
     56    = orxonox::CommandLineParser::addArgument(#name, false)
    6457
    6558namespace orxonox
     
    10699
    107100        //! Returns the actual value of the argument. Can be equal to default value.
    108         MultiType getValue() const { return value_; }
     101        const MultiType& getValue() const { return value_; }
    109102        //! Returns the given default value as type T.
    110         MultiType getDefaultValue() const { return defaultValue_; }
     103        const MultiType& getDefaultValue() const { return defaultValue_; }
    111104
    112105    private:
    113106        //! Constructor initialises both value_ and defaultValue_ with defaultValue.
    114         CommandLineArgument(const std::string& name, const MultiType& defaultValue, bool bCommandLineOnly)
     107        CommandLineArgument(const std::string& name, const MultiType& defaultValue)
    115108            : bHasDefaultValue_(true)
    116109            , name_(name)
    117110            , value_(defaultValue)
    118111            , defaultValue_(defaultValue)
    119             , bCommandLineOnly_(bCommandLineOnly)
    120112        { }
    121113
     
    125117
    126118        //! Parses the value string of a command line argument.
    127         void parse(const std::string& value, bool bParsingFile);
     119        void parse(const std::string& value);
    128120
    129121        //! Tells whether the value has been changed by the command line.
     
    137129        MultiType   value_;            //!< The actual value
    138130        MultiType   defaultValue_;     //!< Default value. Should not be changed.
    139         bool        bCommandLineOnly_; //!< Whether you cannot specify the value in a text file
    140131    };
    141132
     
    155146
    156147        //! Parse redirection to internal member method.
    157         static void parseCommandLine(const std::string& cmdLine) { _getInstance()._parseCommandLine(cmdLine); }
    158         static void parseFile() { _getInstance()._parseFile(); }
     148        static void parse(const std::string& cmdLine)
     149        { _getInstance()._parse(cmdLine); }
    159150
    160151        static std::string getUsageInformation();
     
    165156        static void getValue(const std::string& name, T* value)
    166157        { *value = (T)(getArgument(name)->getValue()); }
    167         static MultiType getValue(const std::string& name)
     158        static const MultiType& getValue(const std::string& name)
    168159        { return getArgument(name)->getValue(); }
    169160        template <class T>
    170         static CommandLineArgument& addArgument(const std::string& name, T defaultValue, bool bCommandLineOnly);
     161        static CommandLineArgument& addArgument(const std::string& name, T defaultValue);
    171162
    172163        static bool existsArgument(const std::string& name)
     
    189180        static CommandLineParser& _getInstance();
    190181
    191         void _parseCommandLine(const std::string& cmdLine);
    192         void _parseFile();
    193         void _parse(const std::vector<std::string>& arguments, bool bParsingFile);
    194         void checkFullArgument(const std::string& name, const std::string& value, bool bParsingFile);
    195         void checkShortcut(const std::string& shortcut, const std::string& value, bool bParsingFile);
     182        void _parse(const std::string& cmdLine);
     183        void checkFullArgument(const std::string& name, const std::string& value);
     184        void checkShortcut(const std::string& shortcut, const std::string& value);
    196185
    197186        /**
     
    222211    @param defaultValue
    223212        Default value that is used when argument was not given.
    224     @param bCommandLineOnly
    225         Parsing a file or the command line itself
    226213    */
    227214    template <class T>
    228     CommandLineArgument& CommandLineParser::addArgument(const std::string& name, T defaultValue, bool bCommandLineOnly)
     215    CommandLineArgument& CommandLineParser::addArgument(const std::string& name, T defaultValue)
    229216    {
    230217        OrxAssert(!_getInstance().existsArgument(name),
     
    234221            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
    235222
    236         return *(_getInstance().cmdLineArgs_[name] = new CommandLineArgument(name, defaultValue, bCommandLineOnly));
     223        return *(_getInstance().cmdLineArgs_[name] = new CommandLineArgument(name, defaultValue));
    237224    }
    238225}
  • code/trunk/src/libraries/core/ConfigValueIncludes.h

    r7401 r8729  
    255255    ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__)
    256256
     257/** Modifies a runtime configurable value by using a modifier and some arguments.
     258    If the container for the value doesn't yet exist, a warning is displayed.
     259    Also, the @a variable argument will be modified and set to the current value.
     260@param variable
     261    Pointer to the variable where the value should be written to
     262@param entryName
     263    Name of the entry in the ini file (e.g. [MySection] myValue)
     264@param modifier
     265    On of these functions: set, tset, add, remove, reset, update
     266@param ...
     267    Arguments for the modifier function
     268*/
     269#define ModifyConfigValueExternal(variable, entryName, modifier, ...) \
     270    ModifyConfigValueGeneric(this, &variable, entryName, modifier, __VA_ARGS__)
     271
    257272#endif /* _ConfigValueIncludes_H__ */
  • code/trunk/src/libraries/core/Core.cc

    r8505 r8729  
    6969#include "Language.h"
    7070#include "LuaState.h"
     71#include "ObjectList.h"
    7172#include "command/ConsoleCommand.h"
    7273#include "command/IOConsole.h"
     
    131132
    132133        // Parse command line arguments AFTER the modules have been loaded (static code!)
    133         CommandLineParser::parseCommandLine(cmdLine);
     134        CommandLineParser::parse(cmdLine);
    134135
    135136        // Set configurable paths like log, config and media
     
    143144        // Set the correct log path. Before this call, /tmp (Unix) or %TEMP% (Windows) was used
    144145        OutputHandler::getInstance().setLogPath(PathConfig::getLogPathString());
    145 
    146         // Parse additional options file now that we know its path
    147         CommandLineParser::parseFile();
    148146
    149147#ifdef ORXONOX_PLATFORM_WINDOWS
     
    168166        RegisterRootObject(Core);
    169167        this->setConfigValues();
     168        // Rewrite the log file with the correct log levels
     169        OutputHandler::getInstance().rewriteLogFile();
    170170
    171171#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
     
    230230    }
    231231
     232    namespace DefaultLevelLogFile
     233    {
     234        const OutputLevel::Value Dev  = OutputLevel::Debug;
     235        const OutputLevel::Value User = OutputLevel::Info;
     236    }
     237
    232238    //! Function to collect the SetConfigValue-macro calls.
    233239    void Core::setConfigValues()
    234240    {
    235 #ifdef ORXONOX_RELEASE
    236         const unsigned int defaultLevelLogFile = 3;
    237 #else
    238         const unsigned int defaultLevelLogFile = 4;
    239 #endif
    240         SetConfigValueExternal(softDebugLevelLogFile_, "OutputHandler", "softDebugLevelLogFile", defaultLevelLogFile)
    241             .description("The maximum level of debug output shown in the log file");
    242         OutputHandler::getInstance().setSoftDebugLevel(OutputHandler::logFileOutputListenerName_s, this->softDebugLevelLogFile_);
     241        // Choose the default level according to the path Orxonox was started (build directory or not)
     242        OutputLevel::Value defaultLogLevel = (PathConfig::buildDirectoryRun() ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
     243
     244        SetConfigValueExternal(debugLevelLogFile_, "OutputHandler", "debugLevelLogFile", defaultLogLevel)
     245            .description("The maximum level of debug output written to the log file");
     246        OutputHandler::getInstance().setSoftDebugLevel("LogFile", debugLevelLogFile_);
    243247
    244248        SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun())
    245             .description("Developer mode. If not set, hides some things from the user to not confuse him.");
     249            .description("Developer mode. If not set, hides some things from the user to not confuse him.")
     250            .callback(this, &Core::devModeChanged);
    246251        SetConfigValue(language_, Language::getInstance().defaultLanguage_)
    247252            .description("The language of the in game text")
     
    258263    }
    259264
     265    /** Callback function for changes in the dev mode that affect debug levels.
     266        The function behaves according to these rules:
     267        - 'normal' mode is defined based on where the program was launched: if
     268          the launch path was the build directory, development mode \c on is
     269          normal, otherwise normal means development mode \c off.
     270        - Debug levels should not be hard configured (\c config instead of
     271          \c tconfig) in non 'normal' mode to avoid strange behaviour.
     272        - Changing the development mode from 'normal' to the other state will
     273          immediately change the debug levels to predefined values which can be
     274          reconfigured with \c tconfig.
     275    @note
     276        The debug levels for the IOConsole and the InGameConsole can be found
     277        in the Shell class. The same rules apply.
     278    */
     279    void Core::devModeChanged()
     280    {
     281        bool isNormal = (bDevMode_ == PathConfig::buildDirectoryRun());
     282        if (isNormal)
     283        {
     284            ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", update);
     285        }
     286        else
     287        {
     288            OutputLevel::Value level = (bDevMode_ ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);
     289            ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", tset, level);
     290        }
     291
     292        // Inform listeners
     293        ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
     294        for (; it != ObjectList<DevModeListener>::end(); ++it)
     295            it->devModeChanged(bDevMode_);
     296    }
     297
    260298    //! Callback function if the language has changed.
    261299    void Core::languageChanged()
     
    440478        ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(NULL)));
    441479    }
     480
     481
     482    DevModeListener::DevModeListener()
     483    {
     484        RegisterRootObject(DevModeListener);
     485    }
    442486}
  • code/trunk/src/libraries/core/Core.h

    r8423 r8729  
    4545
    4646#include <string>
    47 #include <loki/ScopeGuard.h>
    48 
    4947#include "util/DestructionHelper.h"
    5048#include "util/Singleton.h"
     
    5351namespace orxonox
    5452{
     53    //! Informs about changes in the Development Mode.
     54    class DevModeListener : virtual public OrxonoxClass
     55    {
     56    public:
     57        DevModeListener();
     58        virtual ~DevModeListener() {}
     59        virtual void devModeChanged(bool value) = 0;
     60    };
     61
    5562    /**
    5663    @brief
     
    101108            Core(const Core&); //!< Don't use (undefined symbol)
    102109
     110            void devModeChanged();
    103111            void languageChanged();
    104112            void initRandomNumberGenerator();
     
    128136
    129137            bool                      bGraphicsLoaded_;
    130             int                       softDebugLevelLogFile_;      //!< The debug level for the log file (belongs to OutputHandler)
     138            int                       debugLevelLogFile_;          //!< The debug level for the log file (belongs to OutputHandler)
    131139            std::string               language_;                   //!< The language
    132140            bool                      bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
  • code/trunk/src/libraries/core/CoreIncludes.h

    r8706 r8729  
    8080#include "util/Debug.h"
    8181#include "Identifier.h"
    82 #include "SubclassIdentifier.h"
    8382#include "ClassFactory.h"
    8483#include "ObjectList.h"
  • code/trunk/src/libraries/core/EventIncludes.h

    r7401 r8729  
    3737
    3838#include "CorePrereqs.h"
     39
     40#include "Event.h"
    3941#include "XMLPort.h"
    4042#include "command/Executor.h"
  • code/trunk/src/libraries/core/GUIManager.cc

    r8706 r8729  
    490490    }
    491491
    492     const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showCursor, TriBool::Value useKeyboard, bool bBlockJoyStick)
     492    const std::string& GUIManager::createInputState(const std::string& name, tribool showCursor, tribool useKeyboard, bool bBlockJoyStick)
    493493    {
    494494        InputState* state = InputManager::getInstance().createInputState(name);
     
    506506#ifdef ORXONOX_PLATFORM_APPLE
    507507        // There is no non exclusive mode on OS X yet
    508         state->setMouseExclusive(TriBool::True);
    509 #else
    510         if (showCursor == TriBool::Dontcare)
    511             state->setMouseExclusive(TriBool::Dontcare);
    512         else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False)
    513             state->setMouseExclusive(TriBool::True);
     508        state->setMouseExclusive(true);
     509#else
     510        if (showCursor == dontcare)
     511            state->setMouseExclusive(dontcare);
     512        else if (GraphicsManager::getInstance().isFullScreen() || showCursor == false)
     513            state->setMouseExclusive(true);
    514514        else
    515             state->setMouseExclusive(TriBool::False);
    516 #endif
    517 
    518         if (showCursor == TriBool::True)
     515            state->setMouseExclusive(false);
     516#endif
     517
     518        if (showCursor == true)
    519519            state->setMouseHandler(this);
    520         else if (showCursor == TriBool::False)
     520        else if (showCursor == false)
    521521            state->setMouseHandler(&InputHandler::EMPTY);
    522522
    523         if (useKeyboard == TriBool::True)
     523        if (useKeyboard == true)
    524524            state->setKeyHandler(this);
    525         else if (useKeyboard == TriBool::False)
     525        else if (useKeyboard == false)
    526526            state->setKeyHandler(&InputHandler::EMPTY);
    527527
     
    717717    }
    718718
     719    /** Helper method to get the developer's mode without having to export Core.h.
     720    @see Core::inDevMode
     721    */
     722    /*static*/ bool GUIManager::inDevMode()
     723    {
     724         return Core::getInstance().inDevMode();
     725    }
     726
    719727    /**
    720728        @brief Callback of window event listener, called if the window is resized. Sets the display size of CEGUI.
  • code/trunk/src/libraries/core/GUIManager.h

    r8706 r8729  
    3939
    4040#include <map>
    41 #include <set>
    4241#include <string>
    4342#include <CEGUIForwardRefs.h>
     
    4746#include "util/DestructionHelper.h"
    4847#include "util/OgreForwardRefs.h"
    49 #include "util/TriBool.h"
     48#include "util/tribool.h"
    5049#include "util/Singleton.h"
    5150#include "input/InputHandler.h"
    52 #include "Core.h"
    5351#include "OrxonoxClass.h"
    5452#include "WindowEventListener.h"
    55 
    56 // Tolua includes (have to be relative to the current directory)
    57 /*
    58 $cfile "../util/TriBool.h" // tolua_export
    59 */
    6053
    6154#if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     
    6659{ // tolua_export
    6760    class PlayerInfo; // Forward declaration
     61
     62    // Acquaint Tolua with tribool
     63    /* tolua_begin
     64    struct dontcare_keyword_t
     65    {
     66        dontcare_keyword_t();
     67    };
     68    class tribool
     69    {
     70        tribool(bool value);
     71        tribool(dontcare_keyword_t);
     72        bool operator==(tribool);
     73    };
     74    tolua_end */
    6875
    6976    /**
     
    104111        void setBackgroundImage(const std::string& image);
    105112
    106         /**
    107         @brief Helper method to get the developer's mode without having to export Core.h.
    108         @see Core::inDevMode
    109         */
    110         static bool inDevMode(void) { return Core::getInstance().inDevMode(); } // tolua_export
     113        static bool inDevMode(void); // tolua_export
    111114
    112115        //! Creates a new InputState to be used with a GUI Sheet
    113         const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
     116        const std::string& createInputState(const std::string& name, tribool showCursor = tribool(true), tribool useKeyboard = tribool(true), bool bBlockJoyStick = false); // tolua_export
    114117        LuaState* getLuaState(void)
    115118            { return this->luaState_; }
  • code/trunk/src/libraries/core/Game.cc

    r8706 r8729  
    109109
    110110        // Do this after the Core creation!
    111         ClassIdentifier<Game>::getIdentifier("Game")->initialiseObject(this, "Game", true);
     111        RegisterRootObject(Game);
    112112        this->setConfigValues();
    113113
  • code/trunk/src/libraries/core/LuaState.cc

    r8351 r8729  
    4040#include "util/Exception.h"
    4141#include "Resource.h"
    42 #include "ToluaBindCore.h"
    4342#include "command/IOConsole.h"
    4443
    4544namespace orxonox
    4645{
    47     LuaState::ToluaInterfaceMap LuaState::toluaInterfaces_s;
    48     std::vector<LuaState*> LuaState::instances_s;
    49 
    5046    const std::string LuaState::ERROR_HANDLER_NAME = "errorHandler";
    51 
    52     // Do this after declaring toluaInterfaces_s and instances_s to avoid larger problems
    53     DeclareToluaInterface(Core);
    5447
    5548    LuaState::LuaState()
     
    277270    }
    278271
     272    /*static*/ LuaState::ToluaInterfaceMap& LuaState::getToluaInterfaces()
     273    {
     274        static ToluaInterfaceMap p;
     275        return p;
     276    }
     277
     278    /*static*/ std::vector<LuaState*>& LuaState::getInstances()
     279    {
     280        static std::vector<LuaState*> p;
     281        return p;
     282    }
     283
    279284    /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
    280285    {
    281         for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
     286        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
    282287        {
    283288            if (it->first == name || it->second == function)
     
    287292            }
    288293        }
    289         toluaInterfaces_s[name] = function;
     294        getToluaInterfaces()[name] = function;
    290295
    291296        // Open interface in all LuaStates
    292         for (std::vector<LuaState*>::const_iterator it = instances_s.begin(); it != instances_s.end(); ++it)
     297        for (std::vector<LuaState*>::const_iterator it = getInstances().begin(); it != getInstances().end(); ++it)
    293298            (*function)((*it)->luaState_);
    294299
     
    299304    /*static*/ bool LuaState::removeToluaInterface(const std::string& name)
    300305    {
    301         ToluaInterfaceMap::iterator it = toluaInterfaces_s.find(name);
    302         if (it == toluaInterfaces_s.end())
     306        ToluaInterfaceMap::iterator it = getToluaInterfaces().find(name);
     307        if (it == getToluaInterfaces().end())
    303308        {
    304309            COUT(2) << "Warning: Cannot remove Tolua interface '" << name << "': Not found" << std::endl;
     
    307312
    308313        // Close interface in all LuaStates
    309         for (std::vector<LuaState*>::const_iterator itState = instances_s.begin(); itState != instances_s.end(); ++itState)
     314        for (std::vector<LuaState*>::const_iterator itState = getInstances().begin(); itState != getInstances().end(); ++itState)
    310315        {
    311316            lua_pushnil((*itState)->luaState_);
     
    314319
    315320        // Remove entry
    316         toluaInterfaces_s.erase(it);
     321        getToluaInterfaces().erase(it);
    317322
    318323        // Return dummy bool
     
    322327    /*static*/ void LuaState::openToluaInterfaces(lua_State* state)
    323328    {
    324         for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
     329        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
    325330            (*it->second)(state);
    326331    }
     
    328333    /*static*/ void LuaState::closeToluaInterfaces(lua_State* state)
    329334    {
    330         for (ToluaInterfaceMap::const_iterator it = toluaInterfaces_s.begin(); it != toluaInterfaces_s.end(); ++it)
     335        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
    331336        {
    332337            lua_pushnil(state);
  • code/trunk/src/libraries/core/LuaState.h

    r8351 r8729  
    4848#include <vector>
    4949#include <boost/shared_ptr.hpp>
    50 #include <loki/ScopeGuard.h>
    51 
    52 #include "ToluaInterface.h"
    5350
    5451namespace orxonox // tolua_export
     
    121118
    122119        typedef std::map<std::string, int (*)(lua_State *L)> ToluaInterfaceMap;
    123         static ToluaInterfaceMap toluaInterfaces_s;
    124         static std::vector<LuaState*> instances_s;
     120        static ToluaInterfaceMap& getToluaInterfaces();
     121        static std::vector<LuaState*>& getInstances();
    125122    }; // tolua_export
     123
     124
     125    //! Helper class that registers/unregisters tolua bindings
     126    class ToluaBindingsHelper
     127    {
     128    public:
     129        ToluaBindingsHelper(int (*function)(lua_State*), const std::string& libraryName)
     130            : libraryName_(libraryName)
     131        {
     132            LuaState::addToluaInterface(function, libraryName_);
     133        }
     134        ~ToluaBindingsHelper()
     135        {
     136            LuaState::removeToluaInterface(libraryName_);
     137        }
     138    private:
     139        std::string libraryName_;
     140    };
    126141} // tolua_export
    127142
  • code/trunk/src/libraries/core/ObjectListBase.h

    r7401 r8729  
    4141
    4242#include "CorePrereqs.h"
    43 
    4443#include <vector>
    45 #include "OrxonoxClass.h"
    4644
    4745namespace orxonox
  • code/trunk/src/libraries/core/OrxonoxClass.h

    r8351 r8729  
    4545
    4646#include "CorePrereqs.h"
    47 #include "Super.h"
    4847
    4948#include <set>
    5049#include <vector>
     50#include "Super.h"
    5151
    5252/**
  • code/trunk/src/libraries/core/PathConfig.cc

    r8366 r8729  
    7474
    7575    SetCommandLineArgument(externalDataPath, "").information("Path to the external data files");
    76     SetCommandLineOnlyArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
     76    SetCommandLineArgument(writingPathSuffix, "").information("Additional subfolder for config and log files");
    7777
    7878    PathConfig::PathConfig()
  • code/trunk/src/libraries/core/Super.h

    r8706 r8729  
    7373
    7474#include "CorePrereqs.h"
    75 
    7675#include "util/Debug.h"
    77 #include "Event.h"
    7876
    7977///////////////////////
  • code/trunk/src/libraries/core/ViewportEventListener.h

    r8079 r8729  
    3030#define _ViewportEventListener_H__
    3131
     32#include "CorePrereqs.h"
     33
    3234#include "util/OgreForwardRefs.h"
    33 
    34 #include "CorePrereqs.h"
    3535#include "OrxonoxClass.h"
    3636
  • code/trunk/src/libraries/core/command/Functor.h

    r8706 r8729  
    114114#define _Functor_H__
    115115
     116#include "core/CorePrereqs.h"
     117
    116118#include <typeinfo>
    117 
    118 #include "core/CorePrereqs.h"
    119119
    120120#include "util/Debug.h"
  • code/trunk/src/libraries/core/command/IOConsolePOSIX.cc

    r7422 r8729  
    236236    void IOConsole::printOutputLine(const std::string& text, Shell::LineType type)
    237237    {
    238 /*
    239238        // Colour line
    240239        switch (type)
    241240        {
    242         case Shell::None:    this->cout_ << "\033[37m"; break;
    243241        case Shell::Error:   this->cout_ << "\033[91m"; break;
    244         case Shell::Warning: this->cout_ << "\033[31m"; break;
    245         case Shell::Info:    this->cout_ << "\033[34m"; break;
    246         case Shell::Debug:   this->cout_ << "\033[36m"; break;
    247         case Shell::Verbose: this->cout_ << "\033[35m"; break;
    248         case Shell::Ultra:   this->cout_ << "\033[37m"; break;
     242        case Shell::Warning: this->cout_ << "\033[93m"; break;
     243        case Shell::Info:    this->cout_ << "\033[90m"; break;
     244        case Shell::Debug:   this->cout_ << "\033[90m"; break;
     245        case Shell::Verbose: this->cout_ << "\033[90m"; break;
     246        case Shell::Ultra:   this->cout_ << "\033[90m"; break;
     247        case Shell::Command: this->cout_ << "\033[36m"; break;
     248        case Shell::Hint:    this->cout_ << "\033[33m"; break;
     249        case Shell::TDebug:  this->cout_ << "\033[95m"; break;
    249250        default: break;
    250251        }
    251 */
    252252
    253253        // Print output line
    254254        this->cout_ << text;
    255255
    256         // Reset colour to white
    257 //        this->cout_ << "\033[37m";
     256        // Reset colour atributes
     257        this->cout_ << "\033[0m";
    258258    }
    259259
  • code/trunk/src/libraries/core/command/IOConsoleWindows.cc

    r7287 r8729  
    208208        case Shell::Command: colour =                        FOREGROUND_GREEN                  | FOREGROUND_BLUE; break;
    209209        case Shell::Hint:    colour =                        FOREGROUND_GREEN | FOREGROUND_RED                  ; break;
     210        case Shell::TDebug:  colour = FOREGROUND_INTENSITY                    | FOREGROUND_RED | FOREGROUND_BLUE; break;
    210211        default:             colour =                        FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE; break;
    211212        }
  • code/trunk/src/libraries/core/command/IOConsoleWindows.h

    r7401 r8729  
    3939#include <sstream>
    4040#include <string>
    41 #include <vector>
    4241#include "util/Singleton.h"
    4342#include "Shell.h"
  • code/trunk/src/libraries/core/command/Shell.cc

    r8706 r8729  
    3434#include "Shell.h"
    3535
     36#include "util/Math.h"
    3637#include "util/OutputHandler.h"
    3738#include "util/StringUtils.h"
     
    4041#include "core/ConfigFileManager.h"
    4142#include "core/ConfigValueIncludes.h"
     43#include "core/PathConfig.h"
     44#include "core/input/InputBuffer.h"
    4245#include "CommandExecutor.h"
    4346#include "ConsoleCommand.h"
     
    8487
    8588        // Get the previous output and add it to the Shell
    86         for (OutputHandler::OutputVectorIterator it = OutputHandler::getInstance().getOutputVectorBegin();
    87             it != OutputHandler::getInstance().getOutputVectorEnd(); ++it)
    88         {
    89             if (it->first <= this->getSoftDebugLevel())
     89        OutputHandler::OutputVector::const_iterator it = OutputHandler::getInstance().getOutput().begin();
     90        for (;it != OutputHandler::getInstance().getOutput().end(); ++it)
     91        {
     92            if (it->first <= debugLevel_)
    9093            {
    9194                this->outputBuffer_ << it->second;
     
    9699        // Register the shell as output listener
    97100        OutputHandler::getInstance().registerOutputListener(this);
     101        OutputHandler::getInstance().setSoftDebugLevel(consoleName_, debugLevel_);
    98102    }
    99103
     
    105109        OutputHandler::getInstance().unregisterOutputListener(this);
    106110        this->inputBuffer_->destroy();
     111    }
     112
     113    namespace DefaultLogLevel
     114    {
     115        const OutputLevel::Value Dev  = OutputLevel::Info;
     116        const OutputLevel::Value User = OutputLevel::Error;
    107117    }
    108118
     
    119129        SetConfigValue(cacheSize_s, 32);
    120130
    121 #ifdef ORXONOX_RELEASE
    122         const unsigned int defaultLevel = 1;
    123 #else
    124         const unsigned int defaultLevel = 3;
    125 #endif
    126         SetConfigValueExternal(softDebugLevel_, "OutputHandler", "softDebugLevel" + this->consoleName_, defaultLevel)
    127             .description("The maximal level of debug output shown in the Shell");
    128         this->setSoftDebugLevel(this->softDebugLevel_);
     131        // Choose the default level according to the path Orxonox was started (build directory or not)
     132        OutputLevel::Value defaultDebugLevel = (PathConfig::buildDirectoryRun() ? DefaultLogLevel::Dev : DefaultLogLevel::User);
     133        SetConfigValueExternal(debugLevel_, "OutputHandler", "debugLevel" + consoleName_, defaultDebugLevel)
     134            .description("The maximum level of debug output shown in the " + consoleName_);
     135        OutputHandler::getInstance().setSoftDebugLevel(consoleName_, debugLevel_);
    129136    }
    130137
     
    150157            this->commandHistory_.erase(this->commandHistory_.begin() + index);
    151158            ModifyConfigValue(commandHistory_, remove, index);
     159        }
     160    }
     161
     162    /** Called upon changes in the development mode (by Core)
     163        Behaviour details see Core::devModeChanged.
     164    */
     165    void Shell::devModeChanged(bool value)
     166    {
     167        bool isNormal = (value == PathConfig::buildDirectoryRun());
     168        if (isNormal)
     169        {
     170            ModifyConfigValueExternal(debugLevel_, "debugLevel" + consoleName_, update);
     171        }
     172        else
     173        {
     174            OutputLevel::Value level = (value ? DefaultLogLevel::Dev : DefaultLogLevel::User);
     175            ModifyConfigValueExternal(debugLevel_, "debugLevel" + consoleName_, tset, level);
    152176        }
    153177    }
     
    215239    }
    216240
     241    /// Returns the current position of the cursor in the input buffer.
     242    unsigned int Shell::getCursorPosition() const
     243    {
     244        return this->inputBuffer_->getCursorPosition();
     245    }
     246
     247    /// Returns the current content of the input buffer (the text which was entered by the user)
     248    const std::string& Shell::getInput() const
     249    {
     250        return this->inputBuffer_->get();
     251    }
     252
    217253    /**
    218254        @brief Sends output to the internal output buffer.
  • code/trunk/src/libraries/core/command/Shell.h

    r7401 r8729  
    4949
    5050#include "util/OutputHandler.h"
     51#include "core/Core.h"
    5152#include "core/OrxonoxClass.h"
    52 #include "core/input/InputBuffer.h"
    5353
    5454namespace orxonox
     
    8585        Different graphical consoles build upon a Shell, for example InGameConsole and IOConsole.
    8686    */
    87     class _CoreExport Shell : virtual public OrxonoxClass, public OutputListener
     87    class _CoreExport Shell : public OutputListener, public DevModeListener
    8888    {
    8989        public:
     
    9191            enum LineType
    9292            {
     93                TDebug  = OutputLevel::TDebug,
    9394                None    = OutputLevel::None,
    9495                Warning = OutputLevel::Warning,
     
    118119
    119120            void setCursorPosition(unsigned int cursor);
    120             /// Returns the current position of the cursor in the input buffer.
    121             inline unsigned int getCursorPosition() const
    122                 { return this->inputBuffer_->getCursorPosition(); }
    123 
    124             /// Returns the current content of the input buffer (the text which was entered by the user)
    125             inline const std::string& getInput() const
    126                 { return this->inputBuffer_->get(); }
     121            unsigned int getCursorPosition() const;
     122
     123            const std::string& getInput() const;
    127124
    128125            typedef std::list<std::pair<std::string, LineType> > LineList;
     
    146143        private:
    147144            Shell(const Shell& other);
     145
     146            // DevModeListener
     147            void devModeChanged(bool value);
    148148
    149149            void addToHistory(const std::string& command);
     
    197197            unsigned int              historyOffset_;       ///< The command history is a circular buffer, this variable defines the current write-offset
    198198            std::vector<std::string>  commandHistory_;      ///< The history of commands that were entered by the user
    199             int                       softDebugLevel_;      ///< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output)
     199            int                       debugLevel_;          //!< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output)
    200200            static unsigned int       cacheSize_s;          ///< The maximum cache size of the CommandExecutor - this is stored here for better readability of the config file and because CommandExecutor is no OrxonoxClass
    201201    };
  • code/trunk/src/libraries/core/input/InputHandler.h

    r6746 r8729  
    3131
    3232#include "InputPrereqs.h"
    33 #include "util/Math.h"
    3433
    3534namespace orxonox
    3635{
     36    /// A Vector class containing two integers @a x and @a y.
     37    class IntVector2
     38    {
     39    public:
     40        IntVector2() : x(0), y(0) { }
     41        IntVector2(int _x, int _y) : x(_x), y(_y) { }
     42        int x;
     43        int y;
     44    };
     45
    3746    namespace ButtonEvent
    3847    {
  • code/trunk/src/libraries/core/input/InputManager.cc

    r8351 r8729  
    9494        , oisInputManager_(0)
    9595        , devices_(2)
    96         , exclusiveMouse_(TriBool::False)
     96        , exclusiveMouse_(false)
    9797        , emptyState_(0)
    9898        , calibratorCallbackHandler_(0)
     
    108108
    109109        if (GraphicsManager::getInstance().isFullScreen())
    110             exclusiveMouse_ = TriBool::True;
     110            exclusiveMouse_ = true;
    111111        this->loadDevices();
    112112
     
    161161        paramList.insert(StringPair("w32_keyboard", "DISCL_FOREGROUND"));
    162162        paramList.insert(StringPair("w32_mouse", "DISCL_FOREGROUND"));
    163         if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
     163        if (exclusiveMouse_ || GraphicsManager::getInstance().isFullScreen())
    164164        {
    165165            // Disable Windows key plus special keys (like play, stop, next, etc.)
     
    174174        paramList.insert(StringPair("XAutoRepeatOn", "true"));
    175175
    176         if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
     176        if (exclusiveMouse_ || GraphicsManager::getInstance().isFullScreen())
    177177        {
    178178            if (CommandLineParser::getValue("keyboard_no_grab").getBool())
     
    447447
    448448        // Check whether we have to change the mouse mode
    449         TriBool::Value requestedMode = TriBool::Dontcare;
     449        tribool requestedMode = dontcare;
    450450        std::vector<InputState*>& mouseStates = devices_[InputDeviceEnumerator::Mouse]->getStateListRef();
    451451        if (mouseStates.empty())
    452             requestedMode = TriBool::False;
     452            requestedMode = false;
    453453        else
    454454            requestedMode = mouseStates.front()->getMouseExclusive();
    455         if (requestedMode != TriBool::Dontcare && exclusiveMouse_ != requestedMode)
    456         {
    457             exclusiveMouse_ = requestedMode;
     455        if (requestedMode != dontcare && exclusiveMouse_ != requestedMode)
     456        {
     457            assert(requestedMode != dontcare);
     458            exclusiveMouse_ = (requestedMode == true);
    458459            if (!GraphicsManager::getInstance().isFullScreen())
    459460                this->reloadInternal();
     
    644645    }
    645646
    646     bool InputManager::setMouseExclusive(const std::string& name, TriBool::Value value)
     647    bool InputManager::setMouseExclusive(const std::string& name, tribool value)
    647648    {
    648649        if (name == "empty")
  • code/trunk/src/libraries/core/input/InputManager.h

    r8079 r8729  
    3333
    3434#include <map>
    35 #include <set>
    3635#include <string>
    3736#include <vector>
     
    3938
    4039#include "util/Singleton.h"
    41 #include "util/TriBool.h"
     40#include "util/tribool.h"
    4241#include "core/WindowEventListener.h"
    4342
     
    169168            True if the call was successful, fals if the name was not found
    170169        */
    171         bool setMouseExclusive(const std::string& name, TriBool::Value value); // tolua_export
     170        bool setMouseExclusive(const std::string& name, tribool value); // tolua_export
    172171
    173172        //-------------------------------
     
    215214        OIS::InputManager*                  oisInputManager_;      //!< OIS input manager
    216215        std::vector<InputDevice*>           devices_;              //!< List of all input devices (keyboard, mouse, joy sticks)
    217         TriBool::Value                      exclusiveMouse_;       //!< Currently applied mouse mode
     216        bool                                exclusiveMouse_;       //!< Currently applied mouse mode
    218217
    219218        // some internally handled states and handlers
  • code/trunk/src/libraries/core/input/InputPrereqs.h

    r6746 r8729  
    4141#include <ois/OISKeyboard.h>
    4242#include <ois/OISMouse.h>
    43 #include <ois/OISJoyStick.h>
    4443#include "util/OrxEnum.h"
    4544
  • code/trunk/src/libraries/core/input/InputState.cc

    r7284 r8729  
    3737        , bAlwaysGetsInput_(bAlwaysGetsInput)
    3838        , bTransparent_(bTransparent)
    39         , exclusiveMouse_(TriBool::Dontcare)
     39        , exclusiveMouse_(dontcare)
    4040        , bExpired_(true)
    4141        , handlers_(2)
  • code/trunk/src/libraries/core/input/InputState.h

    r8351 r8729  
    3838#include <boost/bind.hpp>
    3939
    40 #include "util/TriBool.h"
     40#include "util/tribool.h"
    4141#include "InputHandler.h"
    4242#include "InputManager.h"
     
    112112        void setHandler        (InputHandler* handler);
    113113
    114         void setMouseExclusive(TriBool::Value value) { exclusiveMouse_ = value; this->bExpired_ = true; }
    115         TriBool::Value getMouseExclusive() const { return exclusiveMouse_; }
     114        void setMouseExclusive(tribool value) { exclusiveMouse_ = value; this->bExpired_ = true; }
     115        tribool getMouseExclusive() const { return exclusiveMouse_; }
    116116
    117117        //! Returns the name of the state (which is unique!)
     
    166166        const bool                  bAlwaysGetsInput_;      //!< See class declaration for explanation
    167167        const bool                  bTransparent_;          //!< See class declaration for explanation
    168         TriBool::Value              exclusiveMouse_;        //!< See class declaration for explanation
     168        tribool                     exclusiveMouse_;        //!< See class declaration for explanation
    169169        int                         priority_;              //!< Current priority (might change)
    170170        bool                        bExpired_;              //!< See hasExpired()
  • code/trunk/src/libraries/core/input/JoyStick.h

    r7809 r8729  
    3434#include <string>
    3535#include <vector>
     36#include <ois/OISJoyStick.h>
    3637#include "InputDevice.h"
    3738
  • code/trunk/src/libraries/core/input/JoyStickQuantityListener.h

    r6417 r8729  
    3636
    3737#include "InputPrereqs.h"
     38
     39#include <vector>
    3840#include "core/OrxonoxClass.h"
    3941
  • code/trunk/src/libraries/core/input/KeyBinderManager.h

    r7284 r8729  
    3434#include <map>
    3535#include <string>
    36 #include <boost/shared_ptr.hpp>
    3736
    3837#include "util/Singleton.h"
  • code/trunk/src/libraries/core/input/KeyDetector.h

    r7284 r8729  
    3232#include "InputPrereqs.h"
    3333
    34 #include <boost/shared_ptr.hpp>
    3534#include "util/Singleton.h"
    3635#include "KeyBinder.h"
  • code/trunk/src/libraries/core/input/Keyboard.h

    r8079 r8729  
    3131
    3232#include "InputPrereqs.h"
    33 
    34 #include "InputHandler.h"
    3533#include "InputDevice.h"
    3634
  • code/trunk/src/libraries/core/input/Mouse.cc

    r7284 r8729  
    3737// include this as last, X11 seems to define some macros...
    3838#include <ois/linux/LinuxMouse.h>
     39#undef Success
    3940#endif
    4041
Note: See TracChangeset for help on using the changeset viewer.