Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3196 for code/trunk/src/core


Ignore:
Timestamp:
Jun 20, 2009, 9:20:47 AM (15 years ago)
Author:
rgrieder
Message:

Merged pch branch back to trunk.

Location:
code/trunk
Files:
3 deleted
85 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/ArgumentCompletionFunctions.cc

    r2759 r3196  
    2929#include "ArgumentCompletionFunctions.h"
    3030
    31 #include <iostream>
    3231#include <map>
    3332#include <boost/version.hpp>
    3433#include <boost/filesystem.hpp>
    3534
    36 #include "CoreIncludes.h"
     35#include "util/Convert.h"
     36#include "util/String.h"
    3737#include "Identifier.h"
    3838#include "ConfigValueContainer.h"
    3939#include "TclThreadManager.h"
    40 #include "util/Convert.h"
    41 #include "util/String.h"
    4240
    4341// Boost 1.36 has some issues with deprecated functions that have been omitted
  • code/trunk/src/core/ArgumentCompletionListElement.h

    r1784 r3196  
    3232#include "CorePrereqs.h"
    3333
     34#include <list>
    3435#include <string>
    35 #include <list>
    36 
    3736
    3837namespace orxonox
  • code/trunk/src/core/BaseObject.cc

    r2710 r3196  
    3636#include <tinyxml/tinyxml.h>
    3737
     38#include "util/String.h"
    3839#include "CoreIncludes.h"
     40#include "Event.h"
    3941#include "EventIncludes.h"
    4042#include "Functor.h"
    41 #include "XMLPort.h"
     43#include "Iterator.h"
     44#include "Template.h"
    4245#include "XMLFile.h"
    4346#include "XMLNameListener.h"
    44 #include "Template.h"
    45 #include "util/String.h"
    46 #include "util/mbool.h"
     47#include "XMLPort.h"
    4748
    4849namespace orxonox
     
    293294    void BaseObject::processEvent(Event& event)
    294295    {
    295         SetEvent(BaseObject, "activity", setActive, event);
    296         SetEvent(BaseObject, "visibility", setVisible, event);
     296        ORXONOX_SET_EVENT(BaseObject, "activity", setActive, event);
     297        ORXONOX_SET_EVENT(BaseObject, "visibility", setVisible, event);
    297298    }
    298299
  • code/trunk/src/core/BaseObject.h

    r2662 r3196  
    4444    }
    4545
     46
     47#include "CorePrereqs.h"
     48
    4649#include <map>
    47 
    48 #include "CorePrereqs.h"
    49 
     50#include <list>
     51
     52#include "util/mbool.h"
     53#include "OrxonoxClass.h"
    5054#include "Super.h"
    51 #include "OrxonoxClass.h"
    52 #include "XMLIncludes.h"
    53 #include "Event.h"
    54 #include "util/mbool.h"
    5555
    5656namespace orxonox
  • code/trunk/src/core/CMakeLists.txt

    r3036 r3196  
    6363)
    6464ADD_SUBDIRECTORY(input)
    65 GET_ALL_HEADER_FILES(CORE_HDR_FILES)
    66 SET(CORE_FILES ${CORE_SRC_FILES} ${CORE_HDR_FILES})
    6765
    68 GENERATE_SOURCE_GROUPS(${CORE_FILES})
    69 GENERATE_TOLUA_BINDINGS(Core CORE_FILES INPUTFILES LuaBind.h CommandExecutor.h Game.h)
    70 
    71 ADD_LIBRARY(core SHARED ${CORE_FILES})
    72 
    73 SET_TARGET_PROPERTIES(core PROPERTIES DEFINE_SYMBOL "CORE_SHARED_BUILD")
    74 TARGET_LINK_LIBRARIES(core
    75   ${OGRE_LIBRARY}
    76   ${Boost_THREAD_LIBRARY}
    77   ${Boost_FILESYSTEM_LIBRARY}
    78   ${Boost_SYSTEM_LIBRARY}
    79   ${Boost_DATE_TIME_LIBRARY} # MSVC only
    80   ${LUA_LIBRARIES}
    81   cpptcl_orxonox
    82   ois_orxonox
    83   tinyxml++_orxonox
    84   tolua++_orxonox
    85   util
     66ORXONOX_ADD_LIBRARY(core
     67  FIND_HEADER_FILES
     68  TOLUA_FILES
     69    CommandExecutor.h
     70    Game.h
     71    LuaBind.h
     72  DEFINE_SYMBOL
     73    "CORE_SHARED_BUILD"
     74  PCH_FILE
     75    CorePrecompiledHeaders.h
     76  LINK_LIBRARIES
     77    ${OGRE_LIBRARY}
     78    ${Boost_THREAD_LIBRARY}
     79    ${Boost_FILESYSTEM_LIBRARY}
     80    ${Boost_SYSTEM_LIBRARY}
     81    ${Boost_DATE_TIME_LIBRARY} # MSVC only
     82    ${LUA_LIBRARIES}
     83    cpptcl_orxonox
     84    ois_orxonox
     85    tinyxml++_orxonox
     86    tolua++_orxonox
     87    util
     88  SOURCE_FILES
     89    ${CORE_SRC_FILES}
    8690)
    87 
    88 ORXONOX_INSTALL(core)
  • code/trunk/src/core/ClassFactory.h

    r2171 r3196  
    4141#include <string>
    4242
     43#include "util/Debug.h"
    4344#include "Factory.h"
    4445#include "Identifier.h"
    45 #include "util/Debug.h"
    4646
    4747namespace orxonox
     
    8888    */
    8989    template <class T>
    90     BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
     90    inline BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
    9191    {
    9292        return ClassFactory<T>::createNewObject(creator);
     
    9898    */
    9999    template <class T>
    100     T* ClassFactory<T>::createNewObject(BaseObject* creator)
     100    inline T* ClassFactory<T>::createNewObject(BaseObject* creator)
    101101    {
    102102        return new T(creator);
  • code/trunk/src/core/ClassTreeMask.cc

    r2171 r3196  
    3434#include "ClassTreeMask.h"
    3535#include "Identifier.h"
    36 #include "BaseObject.h"
    3736
    3837namespace orxonox
  • code/trunk/src/core/ClassTreeMask.h

    r2171 r3196  
    7575#include <list>
    7676#include <stack>
    77 
     77#include "BaseObject.h"
    7878#include "Iterator.h"
    79 #include "BaseObject.h"
    8079
    8180namespace orxonox
  • code/trunk/src/core/Clock.cc

    r1755 r3196  
    5757        tickTime_ = storedTime_ + timersTime;
    5858        tickDt_ = timersTime - lastTimersTime_;
    59         tickDtFloat_ = (float)tickDt_ / 1000000.0f;
     59        tickDtFloat_ = static_cast<float>(tickDt_) / 1000000.0f;
    6060
    6161        if (timersTime > 0x7FFFFFF0)
  • code/trunk/src/core/Clock.h

    r2896 r3196  
    3939
    4040#include "CorePrereqs.h"
    41 #include <OgrePrerequisites.h>
     41#include "util/OgreForwardRefs.h"
    4242
    4343namespace orxonox
     
    5353        unsigned long long getMicroseconds()   const { return tickTime_; }
    5454        unsigned long long getMilliseconds()   const { return tickTime_ / 1000; }
    55         int                getSeconds()        const { return tickTime_ / 1000000; }
    56         float              getSecondsPrecise() const { return (float)tickTime_ / 1000000.0f; }
     55        unsigned long      getSeconds()        const { return static_cast<long> (tickTime_ / 1000000); }
     56        float              getSecondsPrecise() const { return static_cast<float>(tickTime_ / 1000000.0f); }
    5757
    5858        float              getDeltaTime()      const { return tickDtFloat_; }
    59         int                getDeltaTimeMicroseconds() const { return tickDt_; }
     59        long               getDeltaTimeMicroseconds() const { return tickDt_; }
    6060
    6161        unsigned long long getRealMicroseconds() const;
     
    6767        unsigned long long storedTime_;
    6868        unsigned long long tickTime_;
    69         int                tickDt_;
     69        long               tickDt_;
    7070        float              tickDtFloat_;
    7171        unsigned long      lastTimersTime_;
  • code/trunk/src/core/CommandEvaluation.cc

    r2087 r3196  
    2828
    2929#include "CommandEvaluation.h"
     30
     31#include "util/Debug.h"
     32#include "util/String.h"
    3033#include "ConsoleCommand.h"
    3134#include "Identifier.h"
    32 #include "util/Debug.h"
    33 #include "util/String.h"
    3435
    3536namespace orxonox
  • code/trunk/src/core/CommandExecutor.cc

    r3035 r3196  
    2828
    2929#include "CommandExecutor.h"
     30
     31#include "util/Debug.h"
     32#include "util/String.h"
    3033#include "ConsoleCommand.h"
    31 #include "util/String.h"
    32 #include "util/Debug.h"
    3334#include "Identifier.h"
    3435#include "Language.h"
  • code/trunk/src/core/CommandExecutor.h

    r3035 r3196  
    3333
    3434#include <map>
     35#include <set>
     36#include <string>
    3537
     38#include "util/MultiType.h"
    3639#include "CommandEvaluation.h"
    3740
  • code/trunk/src/core/CommandLine.cc

    r2759 r3196  
    3030
    3131#include <boost/filesystem.hpp>
     32
     33#include "util/Convert.h"
     34#include "util/Debug.h"
     35#include "util/Exception.h"
    3236#include "util/String.h"
    3337#include "util/SubString.h"
  • code/trunk/src/core/CommandLine.h

    r2662 r3196  
    3131
    3232#include "CorePrereqs.h"
     33
    3334#include <map>
    34 #include "util/Convert.h"
    35 #include "util/Debug.h"
    36 #include "util/Exception.h"
     35#include "util/OrxAssert.h"
    3736#include "util/MultiType.h"
    3837
  • code/trunk/src/core/ConfigFileManager.cc

    r2896 r3196  
    2929#include "ConfigFileManager.h"
    3030
    31 #include <cassert>
    3231#include <boost/filesystem.hpp>
    3332
    3433#include "util/Convert.h"
     34#include "util/Math.h"
    3535#include "util/String.h"
    3636#include "ConsoleCommand.h"
     
    312312                                // There might be an array index
    313313                                unsigned int index = 0;
    314                                 if (ConvertValue(&index, line.substr(pos2 + 1, pos3 - pos2 - 1)))
     314                                if (convertValue(&index, line.substr(pos2 + 1, pos3 - pos2 - 1)))
    315315                                {
    316316                                    // New array
  • code/trunk/src/core/ConfigFileManager.h

    r2662 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <iostream>
     34#include <cassert>
    3535#include <string>
    3636#include <list>
    3737#include <map>
    3838
    39 #include "util/Math.h"
    4039#include "util/OrxEnum.h"
    4140
  • code/trunk/src/core/ConfigValueContainer.cc

    r2662 r3196  
    3434#include "ConfigValueContainer.h"
    3535
    36 #include <fstream>
    37 
     36#include "util/Convert.h"
    3837#include "util/SubString.h"
    39 #include "util/Convert.h"
    4038#include "Language.h"
    41 #include "Identifier.h"
    42 
    43 
    4439
    4540namespace orxonox
     
    303298
    304299        if (token.size() > 0)
    305             success = ConvertValue(&index, token[0]);
     300            success = convertValue(&index, token[0]);
    306301
    307302        if (!success || index < 0 || index > (signed int)MAX_VECTOR_INDEX)
  • code/trunk/src/core/ConfigValueContainer.h

    r2662 r3196  
    4949#include <vector>
    5050
    51 #include "util/Math.h"
    5251#include "util/MultiType.h"
    5352#include "ConfigFileManager.h"
  • code/trunk/src/core/ConsoleCommand.h

    r2662 r3196  
    3232#include "CorePrereqs.h"
    3333
     34#include "ArgumentCompletionFunctions.h"
     35#include "CommandExecutor.h"
    3436#include "Executor.h"
    3537#include "Identifier.h"
    36 #include "CommandExecutor.h"
    37 #include "ArgumentCompletionFunctions.h"
    3838
    3939
  • code/trunk/src/core/ConsoleCommandCompilation.cc

    r1747 r3196  
    2828
    2929#include "ConsoleCommandCompilation.h"
    30 #include "ConsoleCommand.h"
     30
     31#include <fstream>
     32#include <set>
     33#include <string>
     34
    3135#include "util/Debug.h"
    3236#include "util/ExprParser.h"
     37#include "ConsoleCommand.h"
    3338
    3439namespace orxonox
     
    165170                COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << "'" << std::endl;
    166171            }
    167             return expr.getResult();
     172            return static_cast<float>(expr.getResult());
    168173        }
    169174        else
  • code/trunk/src/core/ConsoleCommandCompilation.h

    r1505 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <string>
    35 
    3634namespace orxonox
    3735{
  • code/trunk/src/core/Core.cc

    r3103 r3196  
    2929
    3030/**
    31     @file
    32     @brief Implementation of the Core class.
     31@file
     32@brief
     33    Implementation of the Core singleton with its global variables (avoids boost include)
    3334*/
    3435
     
    8182    static boost::filesystem::path logPath_g;                   //!< Path to the log file folder
    8283
     84    //! Static pointer to the singleton
    8385    Core* Core::singletonRef_s  = 0;
    8486
     
    365367        if (!bInitialized && this->bInitializeRandomNumberGenerator_)
    366368        {
    367             srand(time(0));
     369            srand(static_cast<unsigned int>(time(0)));
    368370            rand();
    369371            bInitialized = true;
     
    472474        If found it means that this is not an installed run, hence we
    473475        don't write the logs and config files to ~/.orxonox
     476    @throws
     477        GeneralException
    474478    */
    475479    void Core::checkDevBuild()
     
    532536        Checks for the log and the config directory and creates them
    533537        if necessary. Otherwise me might have problems opening those files.
     538    @throws
     539        orxonox::GeneralException if the directory to be created is a file.
    534540    */
    535541    void Core::createDirectories()
    536542    {
    537543        std::vector<std::pair<boost::filesystem::path, std::string> > directories;
    538         directories.push_back(std::pair<boost::filesystem::path, std::string>
    539             (boost::filesystem::path(configPath_g), "config"));
    540         directories.push_back(std::pair<boost::filesystem::path, std::string>
    541             (boost::filesystem::path(logPath_g),    "log"));
     544        directories.push_back(std::make_pair(boost::filesystem::path(configPath_g), "config"));
     545        directories.push_back(std::make_pair(boost::filesystem::path(logPath_g), "log"));
    542546
    543547        for (std::vector<std::pair<boost::filesystem::path, std::string> >::iterator it = directories.begin();
  • code/trunk/src/core/Core.h

    r2896 r3196  
    2929
    3030/**
    31     @file
    32     @brief Declaration of the Core class.
    33 
     31@file
     32@brief
     33    Declaration of the Core class.
     34@details
    3435    The Core class is a singleton, only used to configure some variables
    3536    in the core through the config-file.
     
    4546#include "util/OutputHandler.h"
    4647
    47 // boost::filesystem header has quite a large tail, use forward declaration
    48 namespace boost { namespace filesystem
    49 {
    50     struct path_traits;
    51     template<class String, class Traits> class basic_path;
    52     typedef basic_path< std::string, path_traits> path;
    53 } }
    54 
    5548namespace orxonox
    5649{
    57     //! The Core class is a singleton, only used to configure some config-values.
     50    /**
     51    @brief
     52        The Core class is a singleton used to configure the program basics.
     53    @details
     54        The class provides information about the media, config and log path.
     55        It determines those by the use of platform specific functions.
     56    */
    5857    class _CoreExport Core : public OrxonoxClass
    5958    {
    6059        public:
     60            /**
     61            @brief
     62                Determines the executable path, checks for build directory runs, creates
     63                the output directories and sets up the other core library singletons.
     64            @throws
     65                GeneralException
     66            */
    6167            Core();
    6268            ~Core();
     
    7682            static void tsetMediaPath(const std::string& path)
    7783            { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); }
     84            //! Returns the path to the config files as boost::filesystem::path
    7885            static const boost::filesystem::path& getMediaPath();
     86            //! Returns the path to the config files as boost::filesystem::path
    7987            static const boost::filesystem::path& getConfigPath();
     88            //! Returns the path to the log files as boost::filesystem::path
    8089            static const boost::filesystem::path& getLogPath();
     90            //! Returns the path to the data files as std::string
    8191            static std::string getMediaPathString();
     92            //! Returns the path to the config files as std::string
    8293            static std::string getConfigPathString();
     94            //! Returns the path to the log files as std::string
    8395            static std::string getLogPathString();
    8496
    8597        private:
    86             Core(const Core&);
     98            Core(const Core&); //!< Don't use (undefined symbol)
    8799
    88100            void checkDevBuild();
  • code/trunk/src/core/CoreIncludes.h

    r2171 r3196  
    4343#include "CorePrereqs.h"
    4444
     45#include "util/Debug.h"
    4546#include "Identifier.h"
    4647#include "Factory.h"
    4748#include "ClassFactory.h"
    48 #include "Functor.h"
    49 #include "util/Debug.h"
     49#include "ObjectList.h"
    5050
    5151
     
    129129    orxonox::Factory::getIdentifier(networkID)
    130130
    131 /**
    132     @brief Registers a member function as callback when an object of 'type' is created.
    133     @param
    134 */
    135 #define RegisterConstructionCallback(ThisClassName, TargetClassName, FunctionName) \
    136     orxonox::ClassIdentifier<TargetClassName>::getIdentifier()->addConstructionCallback( \
    137         orxonox::createFunctor(&ThisClassName::FunctionName)->setObject(this))
    138 
    139131#endif /* _CoreIncludes_H__ */
  • code/trunk/src/core/CorePrereqs.h

    r2896 r3196  
    3636
    3737#include "OrxonoxConfig.h"
    38 
    39 #include <string>
    4038
    4139//-----------------------------------------------------------------------
     
    6462namespace orxonox
    6563{
    66   namespace XMLPort
    67   {
    68     enum Mode
     64    namespace XMLPort
    6965    {
    70       LoadObject,
    71       SaveObject,
    72       ExpandObject
     66        enum Mode
     67        {
     68            LoadObject,
     69            SaveObject,
     70            ExpandObject
     71        };
     72    }
     73
     74    namespace KeybindMode
     75    {
     76        enum Enum
     77        {
     78            OnPress,
     79            OnHold,
     80            OnRelease,
     81            None
     82        };
    7383    };
    74   }
    75 
    76   namespace KeybindMode
    77   {
    78     enum Enum
    79     {
    80       OnPress,
    81       OnHold,
    82       OnRelease,
    83       None
    84     };
    85   };
    86 
    87   typedef std::string LanguageEntryLabel;
    88 
    89   class ArgumentCompleter;
    90   class ArgumentCompletionListElement;
    91   class BaseFactory;
    92   class BaseMetaObjectListElement;
    93   class BaseObject;
    94   template <class T>
    95   class ClassFactory;
    96   template <class T>
    97   class ClassIdentifier;
    98   class ClassTreeMask;
    99   class ClassTreeMaskIterator;
    100   class ClassTreeMaskNode;
    101   class ClassTreeMaskObjectIterator;
    102   class Clock;
    103   class CommandEvaluation;
    104   class CommandExecutor;
    105   class CommandLine;
    106   class CommandLineArgument;
    107   class ConfigFile;
    108   class ConfigFileEntry;
    109   class ConfigFileEntryComment;
    110   class ConfigFileEntryValue;
    111   class ConfigFileManager;
    112   class ConfigFileSection;
    113   class ConfigValueContainer;
    114   class ConsoleCommand;
    115   class Core;
    116   struct Event;
    117   class EventContainer;
    118   class Executor;
    119   template <class T>
    120   class ExecutorMember;
    121   class ExecutorStatic;
    122   class Factory;
    123   class Functor;
    124   template <class T>
    125   class FunctorMember;
    126   class FunctorStatic;
    127   class Identifier;
    128   class IRC;
    129   template <class T>
    130   class Iterator;
    131   class IteratorBase;
    132   class Language;
    133   class LanguageEntry;
    134   class Loader;
    135   class LuaBind;
    136   class MetaObjectList;
    137   class MetaObjectListElement;
    138   class Namespace;
    139   class NamespaceNode;
    140   template <class T>
    141   class ObjectList;
    142   class ObjectListBase;
    143   class ObjectListBaseElement;
    144   template <class T>
    145   class ObjectListElement;
    146   template <class T>
    147   class ObjectListIterator;
    148   class OrxonoxClass;
    149   class Shell;
    150   class ShellListener;
    151   template <class T>
    152   class SubclassIdentifier;
    153   class TclBind;
    154   struct TclInterpreterBundle;
    155   class TclThreadManager;
    156   class Template;
    157   class Tickable;
    158   class XMLFile;
    159   class XMLNameListener;
    160   template <class T, class O>
    161   class XMLPortClassObjectContainer;
    162   template <class T>
    163   class XMLPortClassParamContainer;
    164   class XMLPortObjectContainer;
    165   class XMLPortParamContainer;
    166 
    167   // game states
    168   class Game;
    169   class GameState;
    170   struct GameStateTreeNode;
    171 
    172   // input
    173   class BaseCommand;
    174   class BufferedParamCommand;
    175   class Button;
    176   class CalibratorCallback;
    177   class ExtendedInputState;
    178   class HalfAxis;
    179   class InputBuffer;
    180   class InputManager;
    181   class InputState;
    182   class JoyStickHandler;
    183   class MouseHandler;
    184   class KeyBinder;
    185   class KeyDetector;
    186   class KeyHandler;
    187   class ParamCommand;
    188   class SimpleCommand;
    189   class SimpleInputState;
    190 }
     84
     85    typedef std::string LanguageEntryLabel;
     86
     87    class ArgumentCompleter;
     88    class ArgumentCompletionListElement;
     89    class BaseFactory;
     90    class BaseMetaObjectListElement;
     91    class BaseObject;
     92    template <class T>
     93    class ClassFactory;
     94    template <class T>
     95    class ClassIdentifier;
     96    class ClassTreeMask;
     97    class ClassTreeMaskIterator;
     98    class ClassTreeMaskNode;
     99    class ClassTreeMaskObjectIterator;
     100    class Clock;
     101    class CommandEvaluation;
     102    class CommandExecutor;
     103    class CommandLine;
     104    class CommandLineArgument;
     105    class ConfigFile;
     106    class ConfigFileEntry;
     107    class ConfigFileEntryComment;
     108    class ConfigFileEntryValue;
     109    class ConfigFileManager;
     110    class ConfigFileSection;
     111    class ConfigValueContainer;
     112    class ConsoleCommand;
     113    class Core;
     114    struct Event;
     115    class EventContainer;
     116    class Executor;
     117    template <class T>
     118    class ExecutorMember;
     119    class ExecutorStatic;
     120    class Factory;
     121    class Functor;
     122    template <class T>
     123    class FunctorMember;
     124    class FunctorStatic;
     125    class Identifier;
     126    class IRC;
     127    template <class T>
     128    class Iterator;
     129    class IteratorBase;
     130    class Language;
     131    class LanguageEntry;
     132    class Loader;
     133    class LuaBind;
     134    class MetaObjectList;
     135    class MetaObjectListElement;
     136    class Namespace;
     137    class NamespaceNode;
     138    template <class T>
     139    class ObjectList;
     140    class ObjectListBase;
     141    class ObjectListBaseElement;
     142    template <class T>
     143    class ObjectListElement;
     144    template <class T>
     145    class ObjectListIterator;
     146    class OrxonoxClass;
     147    class Shell;
     148    class ShellListener;
     149    template <class T>
     150    class SubclassIdentifier;
     151    class TclBind;
     152    struct TclInterpreterBundle;
     153    class TclThreadManager;
     154    class Template;
     155    class Tickable;
     156    class XMLFile;
     157    class XMLNameListener;
     158    template <class T, class O>
     159    class XMLPortClassObjectContainer;
     160    template <class T>
     161    class XMLPortClassParamContainer;
     162    class XMLPortObjectContainer;
     163    class XMLPortParamContainer;
     164
     165    // game states
     166    class Game;
     167    class GameState;
     168    struct GameStateTreeNode;
     169
     170    // input
     171    class BaseCommand;
     172    class BufferedParamCommand;
     173    class Button;
     174    class CalibratorCallback;
     175    class ExtendedInputState;
     176    class HalfAxis;
     177    class InputBuffer;
     178    class InputManager;
     179    class InputState;
     180    class JoyStickHandler;
     181    class MouseHandler;
     182    class KeyBinder;
     183    class KeyDetector;
     184    class KeyHandler;
     185    class ParamCommand;
     186    class SimpleCommand;
     187    class SimpleInputState;
     188}
     189
     190// CppTcl
     191namespace Tcl
     192{
     193    class interpreter;
     194    class object;
     195}
     196
     197// Boost
     198namespace boost { namespace filesystem
     199{
     200    struct path_traits;
     201    template <class String, class Traits> class basic_path;
     202    typedef basic_path<std::string, path_traits> path;
     203} }
     204
     205// TinyXML and TinyXML++
     206class TiXmlString;
     207class TiXmlOutStream;
     208class TiXmlNode;
     209class TiXmlHandle;
     210class TiXmlDocument;
     211class TiXmlElement;
     212class TiXmlComment;
     213class TiXmlUnknown;
     214class TiXmlAttribute;
     215class TiXmlText;
     216class TiXmlDeclaration;
     217class TiXmlParsingData;
     218namespace ticpp
     219{
     220    class Document;
     221    class Element;
     222    class Declaration;
     223    class StylesheetReference;
     224    class Text;
     225    class Comment;
     226    class Attribute;
     227}
     228namespace orxonox
     229{
     230    using ticpp::Document;
     231    using ticpp::Element;
     232    using ticpp::Declaration;
     233    using ticpp::StylesheetReference;
     234    using ticpp::Text;
     235    using ticpp::Comment;
     236    using ticpp::Attribute;
     237}
     238
    191239
    192240#endif /* _CorePrereqs_H__ */
  • code/trunk/src/core/Event.cc

    r2087 r3196  
    2828
    2929#include "Event.h"
     30
    3031#include "BaseObject.h"
    3132#include "Executor.h"
  • code/trunk/src/core/Event.h

    r2087 r3196  
    3131
    3232#include "CorePrereqs.h"
     33#include <string>
    3334
    3435namespace orxonox
  • code/trunk/src/core/EventIncludes.h

    r2087 r3196  
    3333#include "Executor.h"
    3434
    35 #define SetEvent(classname, eventname, functionname, event) \
    36     SetEventGeneric(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject)
     35#define ORXONOX_SET_EVENT(classname, eventname, functionname, event) \
     36    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject)
    3737
    38 #define SetEventTemplate(classname, eventname, functionname, event, ...) \
    39     SetEventGenericTemplate(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject, __VA_ARGS__)
     38#define ORXONOX_SET_EVENT_TEMPLATE(classname, eventname, functionname, event, ...) \
     39    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject, __VA_ARGS__)
    4040
    41 #define SetSubclassEvent(classname, eventname, functionname, event, subclassname) \
    42     SetEventGeneric(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname)
     41#define ORXONOX_SET_SUBCLASS_EVENT(classname, eventname, functionname, event, subclassname) \
     42    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname)
    4343
    44 #define SetSubclassEventTemplate(classname, eventname, functionname, event, subclassname, ...) \
    45     SetEventGenericTemplate(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname, __VA_ARGS__)
     44#define ORXONOX_SET_SUBCLASS_EVENT_TEMPLATE(classname, eventname, functionname, event, subclassname, ...) \
     45    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname, __VA_ARGS__)
    4646
    47 #define SetEventGeneric(containername, classname, eventname, functionname, event, subclassname) \
     47#define ORXONOX_SET_EVENT_GENERIC(containername, classname, eventname, functionname, event, subclassname) \
    4848    orxonox::EventContainer* containername = this->getEventContainer(eventname); \
    4949    if (!containername) \
     
    5757    containername->process(this, event)
    5858
    59 #define SetEventGenericTemplate(containername, classname, eventname, functionname, event, subclassname, ...) \
     59#define ORXONOX_SET_EVENT_GENERIC_TEMPLATE(containername, classname, eventname, functionname, event, subclassname, ...) \
    6060    orxonox::EventContainer* containername = this->getEventContainer(eventname); \
    6161    if (!containername) \
  • code/trunk/src/core/Executor.cc

    r1879 r3196  
    2929
    3030#include "Executor.h"
    31 #include "util/Math.h"
     31
    3232#include "util/Convert.h"
    3333#include "Language.h"
  • code/trunk/src/core/Executor.h

    r1889 r3196  
    3333#include "CorePrereqs.h"
    3434
     35#include "util/Debug.h"
     36#include "util/Math.h"
     37#include "util/String.h"
    3538#include "util/SubString.h"
    36 #include "util/String.h"
    37 #include "util/Math.h"
    3839#include "Functor.h"
    39 #include "util/Debug.h"
    4040
    4141
  • code/trunk/src/core/Factory.cc

    r2761 r3196  
    3333
    3434#include "Factory.h"
     35
     36#include "util/Debug.h"
    3537#include "Identifier.h"
    3638#include "BaseObject.h"
    37 #include "util/Debug.h"
    3839
    3940namespace orxonox
  • code/trunk/src/core/Functor.h

    r2710 r3196  
    3333#include "CorePrereqs.h"
    3434
     35#include "util/Debug.h"
    3536#include "util/MultiType.h"
    3637#include "util/String.h"
    37 #include "util/Debug.h"
    38 
    3938
    4039namespace orxonox
  • code/trunk/src/core/Game.cc

    r3084 r3196  
    3636
    3737#include <exception>
    38 #include <cassert>
     38#include <boost/weak_ptr.hpp>
    3939
    4040#include "util/Debug.h"
     
    5151namespace orxonox
    5252{
     53    using boost::shared_ptr;
     54    using boost::weak_ptr;
     55
    5356    static void stop_game()
    5457        { Game::getInstance().stop(); }
     
    5760    struct _CoreExport GameStateTreeNode
    5861    {
    59         GameState*                      state_;
    60         GameStateTreeNode*              parent_;
    61         std::vector<GameStateTreeNode*> children_;
     62        GameState* state_;
     63        weak_ptr<GameStateTreeNode> parent_;
     64        std::vector<shared_ptr<GameStateTreeNode> > children_;
    6265    };
    6366
     
    7376        assert(singletonRef_s == 0);
    7477        singletonRef_s = this;
    75 
    76         this->rootStateNode_ = 0;
    77         this->activeStateNode_ = 0;
    7878
    7979        this->abort_ = false;
     
    105105        // Destroy pretty much everyhting left
    106106        delete this->core_;
    107 
    108         // Delete all the created nodes
    109         for (std::vector<GameStateTreeNode*>::const_iterator it = this->allStateNodes_.begin(); it != this->allStateNodes_.end(); ++it)
    110             delete *it;
    111107
    112108        delete this->gameClock_;
     
    172168            {
    173169                // Note: this->requestedStateNodes_.front() is the currently active state node
    174                 std::vector<GameStateTreeNode*>::iterator it = this->requestedStateNodes_.begin() + 1;
    175                 if (*it == this->activeStateNode_->parent_)
     170                std::vector<shared_ptr<GameStateTreeNode> >::iterator it = this->requestedStateNodes_.begin() + 1;
     171                if (*it == this->activeStateNode_->parent_.lock())
    176172                    this->unloadState(this->activeStateNode_->state_);
    177173                else // has to be child
     
    194190
    195191                if ((*it)->getCountTickTime())
    196                     this->addTickTime(this->gameClock_->getRealMicroseconds() - timeBeforeTick);
     192                    this->addTickTime(static_cast<uint32_t>(this->gameClock_->getRealMicroseconds() - timeBeforeTick));
    197193            }
    198194
     
    216212
    217213                uint32_t framesPerPeriod = this->statisticsTickTimes_.size();
    218                 this->avgFPS_ = (float)framesPerPeriod / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0;
    219                 this->avgTickTime_ = (float)this->periodTickTime_ / framesPerPeriod / 1000.0;
     214                this->avgFPS_ = static_cast<float>(framesPerPeriod) / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0f;
     215                this->avgTickTime_ = static_cast<float>(this->periodTickTime_) / framesPerPeriod / 1000.0f;
    220216
    221217                this->periodTime_ -= this->statisticsRefreshCycle_;
     
    226222        while (!this->activeStates_.empty())
    227223            this->unloadState(this->activeStates_.back());
    228         this->activeStateNode_ = 0;
     224        this->activeStateNode_.reset();
    229225        this->requestedStateNodes_.clear();
    230226    }
     
    251247            return;
    252248
    253         GameStateTreeNode* requestedNode = 0;
     249        shared_ptr<GameStateTreeNode> requestedNode;
    254250
    255251        // this->requestedStateNodes_.back() is the currently active state
    256         GameStateTreeNode* lastRequestedNode = this->requestedStateNodes_.back();
     252        shared_ptr<GameStateTreeNode> lastRequestedNode = this->requestedStateNodes_.back();
    257253
    258254        // Already the active node?
     
    274270
    275271        // Check parent and all its grand parents
    276         GameStateTreeNode* currentNode = lastRequestedNode;
     272        shared_ptr<GameStateTreeNode> currentNode = lastRequestedNode;
    277273        while (requestedNode == NULL && currentNode != NULL)
    278274        {
    279275            if (currentNode->state_ == state)
    280276                requestedNode = currentNode;
    281             currentNode = currentNode->parent_;
     277            currentNode = currentNode->parent_.lock();
    282278        }
    283279
     
    297293    void Game::popState()
    298294    {
    299         if (this->activeStateNode_ != NULL && this->requestedStateNodes_.back()->parent_)
    300             this->requestState(this->requestedStateNodes_.back()->parent_->state_->getName());
     295        if (this->activeStateNode_ != NULL && this->requestedStateNodes_.back()->parent_.lock())
     296            this->requestState(this->requestedStateNodes_.back()->parent_.lock()->state_->getName());
    301297        else
    302298            COUT(2) << "Warning: Could not pop GameState. Ignoring." << std::endl;
     
    333329        }
    334330        unsigned int currentLevel = 0;
    335         GameStateTreeNode* currentNode = 0;
     331        shared_ptr<GameStateTreeNode> currentNode;
    336332        for (std::vector<std::pair<std::string, unsigned> >::const_iterator it = stateStrings.begin(); it != stateStrings.end(); ++it)
    337333        {
     
    346342                if (this->rootStateNode_ != NULL)
    347343                    ThrowException(GameState, "No two root GameStates are allowed!");
    348                 GameStateTreeNode* newNode = new GameStateTreeNode;
    349                 this->allStateNodes_.push_back(newNode);
     344                shared_ptr<GameStateTreeNode> newNode(new GameStateTreeNode);
    350345                newNode->state_ = newState;
    351                 newNode->parent_ = 0;
    352346                this->rootStateNode_ = newNode;
    353347                currentNode = this->rootStateNode_;
     
    355349            else if (currentNode)
    356350            {
    357                 GameStateTreeNode* newNode = new GameStateTreeNode;
    358                 this->allStateNodes_.push_back(newNode);
     351                shared_ptr<GameStateTreeNode> newNode(new GameStateTreeNode);
    359352                newNode->state_ = newState;
    360353                if (newLevel < currentLevel)
     
    362355                    // Get down the hierarchy
    363356                    do
    364                         currentNode = currentNode->parent_;
     357                        currentNode = currentNode->parent_.lock();
    365358                    while (newLevel < --currentLevel);
    366359                }
     
    369362                    // same level
    370363                    newNode->parent_ = currentNode->parent_;
    371                     newNode->parent_->children_.push_back(newNode);
     364                    newNode->parent_.lock()->children_.push_back(newNode);
    372365                }
    373366                else if (newLevel == currentLevel + 1)
  • code/trunk/src/core/Game.h

    r3084 r3196  
    3737
    3838#include "CorePrereqs.h"
     39
    3940#include <cassert>
    4041#include <list>
    4142#include <map>
     43#include <string>
    4244#include <vector>
     45#include <boost/shared_ptr.hpp>
     46#include <boost/preprocessor/cat.hpp>
     47
    4348#include "OrxonoxClass.h"
    4449
     
    4954*/
    5055#define AddGameState(classname, ...) \
    51     static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
     56    static bool BOOST_PP_CAT(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
    5257
    5358// tolua_begin
     
    106111
    107112        std::vector<GameState*>         activeStates_;
    108         GameStateTreeNode*              rootStateNode_;
    109         GameStateTreeNode*              activeStateNode_;
    110         std::vector<GameStateTreeNode*> requestedStateNodes_;
    111         std::vector<GameStateTreeNode*> allStateNodes_;
     113        boost::shared_ptr<GameStateTreeNode> rootStateNode_;
     114        boost::shared_ptr<GameStateTreeNode> activeStateNode_;
     115        std::vector<boost::shared_ptr<GameStateTreeNode> > requestedStateNodes_;
    112116
    113117        Core*                           core_;
  • code/trunk/src/core/GameState.cc

    r3084 r3196  
    3434
    3535#include "GameState.h"
    36 #include <cassert>
     36
    3737#include "util/Debug.h"
    3838#include "util/Exception.h"
    39 #include "Clock.h"
     39#include "util/OrxAssert.h"
    4040
    4141namespace orxonox
  • code/trunk/src/core/GameState.h

    r3084 r3196  
    3838#include "CorePrereqs.h"
    3939
     40#include <map>
    4041#include <string>
    41 #include <map>
    42 #include "CorePrereqs.h"
    4342
    4443namespace orxonox
  • code/trunk/src/core/IRC.cc

    r1792 r3196  
    2929#include "IRC.h"
    3030
    31 #include <boost/thread/thread.hpp>
     31#include <cpptcl/cpptcl.h>
     32
     33#include "util/Convert.h"
    3234#include "ConsoleCommand.h"
     35#include "CoreIncludes.h"
    3336#include "TclThreadManager.h"
    34 #include "CoreIncludes.h"
    35 #include "util/Convert.h"
    36 
    3737
    3838namespace orxonox
  • code/trunk/src/core/IRC.h

    r2710 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <cpptcl/cpptcl.h>
     34#include <string>
    3535#include "OrxonoxClass.h"
    3636
  • code/trunk/src/core/Identifier.cc

    r2662 r3196  
    3636#include <ostream>
    3737
    38 #include "Factory.h"
     38#include "util/String.h"
    3939#include "ConfigValueContainer.h"
    4040#include "ConsoleCommand.h"
    41 #include "CommandExecutor.h"
     41#include "Factory.h"
    4242#include "XMLPort.h"
    4343
     
    6363        this->bHasConfigValues_ = false;
    6464        this->bHasConsoleCommands_ = false;
    65         this->bHasConstructionCallback_ = false;
    6665
    6766        this->children_ = new std::set<const Identifier*>();
     
    9392        for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
    9493            delete (it->second);
    95         for (std::vector<Functor*>::iterator it = this->constructionCallbacks_.begin(); it != this->constructionCallbacks_.end(); ++it)
    96             delete *it;
    9794    }
    9895
     
    519516
    520517    /**
    521         @brief Adds a construction callback functor that gets called every time an object is created.
    522         @param functor Functor pointer to any function with no argument.
    523     */
    524     void Identifier::addConstructionCallback(Functor* functor)
    525     {
    526         for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
    527         {
    528             if (this->constructionCallbacks_[i] == functor)
    529                 return;
    530         }
    531         this->constructionCallbacks_.push_back(functor);
    532         this->bHasConstructionCallback_ = true;
    533     }
    534 
    535     /**
    536         @brief Removes a construction callback functor that gets called every time an object is created.
    537         @param functor Functor pointer to any function with no argument.
    538     */
    539     void Identifier::removeConstructionCallback(Functor* functor)
    540     {
    541         for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
    542         {
    543             if (this->constructionCallbacks_[i] == functor)
    544             {
    545                 this->constructionCallbacks_.erase(this->constructionCallbacks_.begin() + i);
    546             }
    547         }
    548         if (constructionCallbacks_.empty())
    549             this->bHasConstructionCallback_ = false;
    550     }
    551 
    552     /**
    553518        @brief Lists the names of all Identifiers in a std::set<const Identifier*>.
    554519        @param out The outstream
  • code/trunk/src/core/Identifier.h

    r2784 r3196  
    5555#include "CorePrereqs.h"
    5656
     57#include <cassert>
     58#include <map>
    5759#include <set>
    58 #include <map>
    59 #include <vector>
    6060#include <string>
    61 #include <utility>
    6261#include <typeinfo>
    63 #include <cstdlib>
    64 #include <cassert>
    65 
     62
     63#include "util/Debug.h"
    6664#include "MetaObjectList.h"
    67 #include "Iterator.h"
     65#include "ObjectList.h"
     66#include "ObjectListBase.h"
    6867#include "Super.h"
    69 #include "Functor.h"
    70 #include "util/Debug.h"
    71 #include "util/String.h"
    7268
    7369namespace orxonox
     
    223219            /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */
    224220            inline bool hasConsoleCommands() const { return this->bHasConsoleCommands_; }
    225             /** @brief Returns true if this class has at least one construction callback Functor registered. */
    226             inline bool hasConstructionCallback() const { return this->bHasConstructionCallback_; }
    227221
    228222            /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
     
    251245            ConsoleCommand* getConsoleCommand(const std::string& name) const;
    252246            ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
    253 
    254             void addConstructionCallback(Functor* functor);
    255             void removeConstructionCallback(Functor* functor);
    256247
    257248            void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
     
    276267            /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
    277268            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
    278 
    279             bool bHasConstructionCallback_;                                //!< True if at least one Functor is registered to get informed when an object of type T is created.
    280             std::vector<Functor*> constructionCallbacks_;                  //!< All construction callback Functors of this class.
    281269
    282270            ObjectListBase* objects_;                                      //!< The list of all objects of this class
     
    383371    */
    384372    template <class T>
    385     ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
     373    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
    386374    {
    387375        // check if the static field has already been filled
     
    398386    */
    399387    template <class T>
    400     ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
     388    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
    401389    {
    402390        ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
     
    435423    */
    436424    template <class T>
    437     void ClassIdentifier<T>::addObject(T* object)
     425    inline void ClassIdentifier<T>::addObject(T* object)
    438426    {
    439427        COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
    440428        object->getMetaList().add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
    441         if (this->bHasConstructionCallback_)
    442         {
    443             // Call all registered callbacks that a new object of type T has been created.
    444             // Do NOT deliver a T* pointer here because it's way too risky (object not yet fully created).
    445             for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
    446                 (*constructionCallbacks_[i])();
    447         }
    448429    }
    449430
  • code/trunk/src/core/Iterator.h

    r2896 r3196  
    4747#include "CorePrereqs.h"
    4848
     49#include "Identifier.h"
    4950#include "ObjectListBase.h"
    50 #include "ObjectListIterator.h"
    51 #include "OrxonoxClass.h"
    5251
    5352namespace orxonox
     
    305304}
    306305
    307 // Include ObjectList.h so the user only has to include one file: Iterator.h
    308 #include "ObjectList.h"
    309 
    310306#endif /* _Iterator_H__ */
  • code/trunk/src/core/Language.cc

    r2759 r3196  
    3737#include <boost/filesystem.hpp>
    3838
     39#include "util/Debug.h"
    3940#include "Core.h"
    40 #include "util/Debug.h"
    4141
    4242namespace orxonox
  • code/trunk/src/core/Loader.cc

    r3008 r3196  
    3232#include <boost/filesystem.hpp>
    3333
    34 #include "XMLFile.h"
     34#include "util/Debug.h"
     35#include "util/Exception.h"
    3536#include "BaseObject.h"
    36 #include "Identifier.h"
     37#include "Core.h"
    3738#include "Iterator.h"
    3839#include "ObjectList.h"
    39 #include "CoreIncludes.h"
    4040#include "LuaBind.h"
    4141#include "Namespace.h"
    42 #include "util/Debug.h"
    43 #include "util/Exception.h"
    44 #include "Core.h"
     42#include "XMLFile.h"
    4543
    4644namespace orxonox
  • code/trunk/src/core/Loader.h

    r3008 r3196  
    3333
    3434#include <vector>
    35 
    3635#include "ClassTreeMask.h"
    3736
  • code/trunk/src/core/LuaBind.cc

    r3068 r3196  
    3131#include <fstream>
    3232#include <map>
    33 
    3433extern "C" {
    35 #include <lua.h>
    3634#include <lualib.h>
    3735}
     
    3937#include <boost/filesystem.hpp>
    4038
     39#include "util/Debug.h"
    4140#include "util/String.h"
    42 #include "util/Debug.h"
    4341#include "ToluaBindCore.h"
    4442#include "Core.h"
     
    7270  }
    7371
    74   void LuaBind::luaPrint(std::string str)
     72  void LuaBind::luaPrint(const std::string& str)
    7573  {
    7674    output_ += str;
     
    8482      @param luaTags if true, the loaded file gets stripped off luaTags
    8583  */
    86   void LuaBind::loadFile(std::string filename, bool luaTags)
     84  void LuaBind::loadFile(const std::string& filename, bool luaTags)
    8785  {
    8886    boost::filesystem::path filepath(filename);
     
    117115  }
    118116
    119   void LuaBind::loadString(std::string code)
     117  void LuaBind::loadString(const std::string& code)
    120118  {
    121119    luaSource_ = code;
  • code/trunk/src/core/LuaBind.h

    r3068 r3196  
    3838#include "CorePrereqs.h"
    3939
     40#include <cassert>
     41#include <string>
    4042extern "C" {
    4143#include <lua.h>
    4244}
    43 
    44 #include <cassert>
    45 #include <list>
    46 #include <string>
    4745
    4846// tolua_begin
     
    6462      inline static LuaBind& getInstance() { assert(singletonRef_s); return *LuaBind::singletonRef_s; } // tolua_export
    6563
    66     void loadFile(std::string filename, bool luaTags);
    67     void loadString(std::string code);
     64    void loadFile(const std::string& filename, bool luaTags);
     65    void loadString(const std::string& code);
    6866    //void init(lua_State *state_);
    6967    //void xmlToLua();
    7068    void run();
    71     void luaPrint(std::string str); // tolua_export
     69    void luaPrint(const std::string& str); // tolua_export
    7270
    7371#if LUA_VERSION_NUM != 501
     
    7674
    7775    inline lua_State* getLuaState() { return luaState_; };
    78     inline std::string getLuaOutput() { return output_; };
     76    inline const std::string& getLuaOutput() { return output_; };
    7977    //inline std::string* getFileString() { return &fileString_; };
    8078    inline void clearLuaOutput() { output_ = ""; }
  • code/trunk/src/core/MetaObjectList.cc

    r2171 r3196  
    3333
    3434#include "MetaObjectList.h"
     35
     36#include "util/Debug.h"
     37#include "Identifier.h"
    3538#include "ObjectListBase.h"
    36 #include "Identifier.h"
    37 #include "util/Debug.h"
    3839
    3940namespace orxonox
  • code/trunk/src/core/Namespace.cc

    r2087 r3196  
    2828
    2929#include "Namespace.h"
     30
     31#include <set>
     32
    3033#include "NamespaceNode.h"
    3134#include "CoreIncludes.h"
  • code/trunk/src/core/Namespace.h

    r2087 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <map>
    35 
    36 #include "XMLIncludes.h"
     34#include <set>
     35#include <string>
    3736#include "BaseObject.h"
    3837
  • code/trunk/src/core/ObjectListBase.cc

    r2784 r3196  
    3535*/
    3636
     37#include "ObjectListBase.h"
     38
    3739#include <set>
    38 
    39 #include "CorePrereqs.h"
    40 
    41 #include "ObjectListBase.h"
    4240#include "Identifier.h"
    4341#include "Iterator.h"
     42#include "ObjectListIterator.h"
    4443
    4544namespace orxonox
  • code/trunk/src/core/ObjectListBase.h

    r2896 r3196  
    3838#define _ObjectListBase_H__
    3939
     40#include "CorePrereqs.h"
     41
    4042#include <vector>
    41 
    42 #include "CorePrereqs.h"
     43#include "OrxonoxClass.h"
    4344
    4445namespace orxonox
     
    139140
    140141        private:
    141             Identifier* identifier_;               //!< The Iterator owning this list
    142             ObjectListBaseElement* first_;         //!< The first element in the list
    143             ObjectListBaseElement* last_;          //!< The last element in the list
     142            Identifier* identifier_;                 //!< The Iterator owning this list
     143            ObjectListBaseElement* first_;           //!< The first element in the list
     144            ObjectListBaseElement* last_;            //!< The last element in the list
    144145            std::vector<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
    145146            std::vector<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
  • code/trunk/src/core/ObjectListIterator.h

    r2784 r3196  
    2828
    2929/**
    30     @file Iterator.h
     30    @file
    3131    @brief Definition and implementation of the Iterator class.
    3232
     
    4747
    4848#include "CorePrereqs.h"
    49 #include "ObjectListBase.h"
     49#include "Identifier.h"
     50#include "ObjectList.h"
    5051
    5152namespace orxonox
     
    230231}
    231232
    232 // Include ObjectList.h so the user only has to include one file: Iterator.h
    233 #include "ObjectList.h"
    234 
    235233#endif /* _ObjectListIterator_H__ */
  • code/trunk/src/core/OrxonoxClass.cc

    r2171 r3196  
    3333
    3434#include "OrxonoxClass.h"
     35
    3536#include "MetaObjectList.h"
    3637#include "Identifier.h"
  • code/trunk/src/core/OrxonoxClass.h

    r2171 r3196  
    3939
    4040#include "CorePrereqs.h"
    41 
    4241#include <set>
    43 #include <string>
    4442
    4543namespace orxonox
  • code/trunk/src/core/Shell.cc

    r2662 r3196  
    2828
    2929#include "Shell.h"
     30
     31#include "util/OutputHandler.h"
    3032#include "CommandExecutor.h"
    3133#include "CoreIncludes.h"
     
    3335#include "Core.h"
    3436#include "ConsoleCommand.h"
    35 #include "util/OutputHandler.h"
    3637
    3738#define SHELL_UPDATE_LISTENERS(function) \
  • code/trunk/src/core/Shell.h

    r1792 r3196  
    3232#include "CorePrereqs.h"
    3333
     34#include <cassert>
    3435#include <list>
     36#include <string>
    3537#include <vector>
    3638
  • code/trunk/src/core/Super.h

    r2662 r3196  
    6767#define _Super_H__
    6868
    69 #include <iostream>
    70 
    7169#include "CorePrereqs.h"
    7270
    7371#include "util/Debug.h"
    74 #include "XMLIncludes.h"
    7572#include "Event.h"
    7673
  • code/trunk/src/core/TclBind.cc

    r2710 r3196  
    2929#include "TclBind.h"
    3030
    31 #include <iostream>
     31#include <exception>
    3232#include <string>
    33 #include "ConsoleCommand.h"
    34 #include "CommandExecutor.h"
    35 #include "TclThreadManager.h"
     33#include <cpptcl/cpptcl.h>
     34
    3635#include "util/Debug.h"
    3736#include "util/String.h"
     37#include "CommandExecutor.h"
     38#include "ConsoleCommand.h"
     39#include "TclThreadManager.h"
    3840
    3941namespace orxonox
  • code/trunk/src/core/TclBind.h

    r2710 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <cpptcl/cpptcl.h>
     34#include <cassert>
     35#include <string>
    3536
    3637namespace orxonox
  • code/trunk/src/core/TclThreadManager.cc

    r2896 r3196  
    2929#include "TclThreadManager.h"
    3030
    31 #include <iostream>
    32 #include <string>
    33 #include <boost/thread/thread.hpp>
    3431#include <boost/bind.hpp>
    3532#include <OgreTimer.h>
    36 
     33#include <cpptcl/cpptcl.h>
     34
     35#include "util/Convert.h"
     36#include "util/Debug.h"
    3737#include "Clock.h"
     38#include "CommandExecutor.h"
     39#include "ConsoleCommand.h"
    3840#include "CoreIncludes.h"
    39 #include "ConsoleCommand.h"
    40 #include "CommandExecutor.h"
    4141#include "TclBind.h"
    42 #include "util/Debug.h"
    43 #include "util/Convert.h"
    44 
    4542
    4643namespace orxonox
  • code/trunk/src/core/TclThreadManager.h

    r2896 r3196  
    3232#include "CorePrereqs.h"
    3333
    34 #include <queue>
     34#include <list>
    3535#include <map>
    36 #include <list>
    37 
     36#include <string>
     37#include <boost/thread/condition.hpp>
    3838#include <boost/thread/mutex.hpp>
    39 #include <boost/thread/condition.hpp>
    4039#include <boost/thread/thread.hpp>
    4140
    42 #include <cpptcl/cpptcl.h>
    4341#include "core/OrxonoxClass.h"
    4442
  • code/trunk/src/core/Template.cc

    r3068 r3196  
    2929#include "Template.h"
    3030
     31#include <tinyxml/tinyxml.h>
    3132#include <tinyxml/ticpp.h>
    3233
     34#include "util/Debug.h"
    3335#include "core/CoreIncludes.h"
    3436#include "core/XMLPort.h"
    35 #include "util/Debug.h"
    3637
    3738namespace orxonox
     
    3940    CreateFactory(Template);
    4041
    41     Template::Template(BaseObject* creator) : BaseObject(creator), xmlelement_("")
     42    Template::Template(BaseObject* creator) : BaseObject(creator)
    4243    {
     44        this->xmlelement_ = new TiXmlElement("");
     45
    4346        RegisterObject(Template);
    4447
     
    5255    {
    5356        Template::getTemplateMap().erase(this->getName());
     57        delete this->xmlelement_;
    5458    }
    5559
     
    9094    }
    9195
     96    void Template::setXMLElement(const TiXmlElement& xmlelement)
     97    {
     98        *this->xmlelement_ = xmlelement;
     99    }
     100
    92101    const TiXmlElement& Template::getXMLElement() const
    93102    {
     
    115124        }
    116125
    117         return this->xmlelement_;
     126        return *this->xmlelement_;
    118127    }
    119128
  • code/trunk/src/core/Template.h

    r3068 r3196  
    3030#define _Template_H__
    3131
    32 #include <map>
    33 
    3432#include "CorePrereqs.h"
    3533
    36 #include <tinyxml/tinyxml.h>
     34#include <map>
     35#include <string>
    3736#include "BaseObject.h"
    3837
     
    5857                { return this->bLoadDefaults_; }
    5958
    60             inline void setXMLElement(const TiXmlElement& xmlelement)
    61                 { this->xmlelement_ = xmlelement; }
     59            void setXMLElement(const TiXmlElement& xmlelement);
    6260            const TiXmlElement& getXMLElement() const;
    6361
     
    7573
    7674        private:
    77             TiXmlElement xmlelement_;
     75            TiXmlElement* xmlelement_;
    7876            std::string link_;
    7977            std::string baseclass_;
  • code/trunk/src/core/XMLFile.h

    r3068 r3196  
    3333
    3434#include <string>
    35 
    3635#include "ClassTreeMask.h"
    3736
  • code/trunk/src/core/XMLPort.cc

    r1789 r3196  
    2828
    2929#include "XMLPort.h"
    30 #include "Language.h"
     30
    3131#include "Loader.h"
    3232#include "Namespace.h"
    33 #include "CoreIncludes.h"
    3433
    3534namespace orxonox
     
    4039    bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
    4140    {
    42         return ((!this->bApplyLoaderMask_) || identifier->isA(Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier));
     41        return ((!this->bApplyLoaderMask_) || identifier->isA(ClassIdentifier<Namespace>::getIdentifier()) || Loader::currentMask_s.isIncluded(identifier));
    4342    }
    4443}
  • code/trunk/src/core/XMLPort.h

    r2896 r3196  
    4444
    4545#include <cassert>
     46#include <string>
    4647#include <tinyxml/ticpp.h>
     48
    4749#include "util/Debug.h"
    4850#include "util/Exception.h"
    4951#include "util/MultiType.h"
    50 #include "XMLIncludes.h"
     52#include "util/OrxAssert.h"
     53#include "Factory.h"
     54#include "Identifier.h"
    5155#include "Executor.h"
    52 #include "CoreIncludes.h"
    5356#include "BaseObject.h"
    5457
     
    176179*/
    177180#define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
    178     orxonox::XMLPortClassParamContainer<objectclass>* containername = (orxonox::XMLPortClassParamContainer<objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
     181    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
    179182    if (!containername) \
    180183    { \
     
    545548                            for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
    546549                            {
    547                                 Identifier* identifier = ClassByString(child->Value());
     550                                Identifier* identifier = Factory::getIdentifier(child->Value());
    548551                                if (identifier)
    549552                                {
    550                                     if (identifier->isA(Class(O)))
     553                                    if (identifier->isA(ClassIdentifier<O>::getIdentifier()))
    551554                                    {
    552555                                        if (identifier->isLoadable())
     
    606609                                    else
    607610                                    {
    608                                         COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
     611                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << ClassIdentifier<O>::getIdentifier()->getName() << "'." << std::endl;
    609612                                    }
    610613                                }
     
    626629                    {
    627630                        COUT(1) << std::endl;
    628                         COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
     631                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << ClassIdentifier<O>::getIdentifier()->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
    629632                        COUT(1) << ex.what() << std::endl;
    630633                    }
  • code/trunk/src/core/input/CMakeLists.txt

    r2710 r3196  
    11ADD_SOURCE_FILES(CORE_SRC_FILES
    22  Button.cc
    3   CalibratorCallback.cc
    43  ExtendedInputState.cc
    54  HalfAxis.cc
  • code/trunk/src/core/input/ExtendedInputState.cc

    r2896 r3196  
    3636
    3737#include <cassert>
    38 #include "util/Debug.h"
     38#include "core/Executor.h"
    3939
    4040namespace orxonox
     
    457457        this->bHandlersChanged_ = true;
    458458    }
     459
     460    void ExtendedInputState::onEnter()
     461    {
     462        if (executorOnEnter_)
     463            (*executorOnEnter_)();
     464    }
     465
     466    void ExtendedInputState::onLeave()
     467    {
     468        if (executorOnLeave_)
     469            (*executorOnLeave_)();
     470    }
    459471}
  • code/trunk/src/core/input/ExtendedInputState.h

    r2896 r3196  
    3838
    3939#include <vector>
    40 
    4140#include "InputInterfaces.h"
    4241#include "InputState.h"
     
    8988        void update();
    9089
     90        void onEnter();
     91        void onLeave();
     92
    9193        std::vector<KeyHandler*>                    keyHandlers_;
    9294        std::vector<MouseHandler*>                  mouseHandlers_;
  • code/trunk/src/core/input/HalfAxis.h

    r2087 r3196  
    3737
    3838#include "core/CorePrereqs.h"
     39
    3940#include "Button.h"
    4041#include "InputCommands.h"
  • code/trunk/src/core/input/InputBuffer.cc

    r2896 r3196  
    2828
    2929#include "InputBuffer.h"
    30 
    31 #include <iostream>
    3230
    3331#include "util/Clipboard.h"
     
    5755    }
    5856
    59     InputBuffer::InputBuffer(const std::string allowedChars)
     57    InputBuffer::InputBuffer(const std::string& allowedChars)
    6058    {
    6159        RegisterRootObject(InputBuffer);
  • code/trunk/src/core/input/InputBuffer.h

    r2896 r3196  
    3232#include "core/CorePrereqs.h"
    3333
     34#include <list>
    3435#include <string>
    35 #include <list>
    36 
    3736#include "core/OrxonoxClass.h"
    3837#include "InputInterfaces.h"
     
    8079            InputBuffer();
    8180            ~InputBuffer();
    82             InputBuffer(const std::string allowedChars);
     81            InputBuffer(const std::string& allowedChars);
    8382
    8483            void setConfigValues();
     
    145144            void updated(const char& update, bool bSingleInput);
    146145
    147             inline std::string get() const
     146            inline const std::string& get() const
    148147                { return this->buffer_; }
    149148            inline unsigned int getSize() const
  • code/trunk/src/core/input/InputCommands.cc

    r2087 r3196  
    3535#include "InputCommands.h"
    3636#include "util/Math.h"
    37 #include "core/CommandExecutor.h"
    3837
    3938namespace orxonox
  • code/trunk/src/core/input/InputInterfaces.h

    r2896 r3196  
    3838#include "core/CorePrereqs.h"
    3939
    40 #include "ois/OISKeyboard.h"
    41 #include "ois/OISMouse.h"
    42 #include "ois/OISJoyStick.h"
     40#include <ois/OISKeyboard.h>
     41#include <ois/OISMouse.h>
     42#include <ois/OISJoyStick.h>
    4343#include "util/Math.h"
    4444
  • code/trunk/src/core/input/InputManager.cc

    r3084 r3196  
    3838#include <climits>
    3939#include <cassert>
    40 
    41 #include "ois/OISException.h"
    42 #include "ois/OISInputManager.h"
    43 #include "core/ConsoleCommand.h"
    44 
    45 // HACK
    46 #ifdef ORXONOX_PLATFORM_LINUX
    47 #  include "ois/linux/LinuxMouse.h"
    48 #endif
    49 
     40#include <ois/OISException.h>
     41#include <ois/OISInputManager.h>
     42
     43#include "util/Convert.h"
    5044#include "util/Exception.h"
     45#include "util/Debug.h"
    5146#include "core/Clock.h"
    5247#include "core/CoreIncludes.h"
    5348#include "core/ConfigValueIncludes.h"
    54 #include "core/CommandExecutor.h"
     49#include "core/ConsoleCommand.h"
    5550#include "core/CommandLine.h"
    56 #include "util/Debug.h"
    5751
    5852#include "InputBuffer.h"
    59 #include "KeyBinder.h"
    6053#include "KeyDetector.h"
    61 #include "CalibratorCallback.h"
    6254#include "InputState.h"
    6355#include "SimpleInputState.h"
    6456#include "ExtendedInputState.h"
    6557#include "JoyStickDeviceNumberListener.h"
     58
     59// HACK (include this as last, X11 seems to define some macros...)
     60#ifdef ORXONOX_PLATFORM_LINUX
     61#  include <ois/linux/LinuxMouse.h>
     62#endif
    6663
    6764namespace orxonox
     
    367364        for (unsigned int i = 0; i < configValueVectorSize; ++i)
    368365        {
    369             list[i] = omni_cast<int>(ConfigFileManager::getInstance().getValue(
    370                 ConfigFileType::JoyStickCalibration, sectionName, valueName, i, omni_cast<std::string>(defaultValue), false));
     366            list[i] = multi_cast<int>(ConfigFileManager::getInstance().getValue(
     367                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, multi_cast<std::string>(defaultValue), false));
    371368        }
    372369
     
    403400            // Generate some sort of execution unique id per joy stick
    404401            std::string id = "JoyStick_";
    405             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
    406             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
    407             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
    408             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
    409             id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
     402            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
     403            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
     404            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
     405            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
     406            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
    410407            id += joySticks_[iJoyStick]->vendor();
    411408            for (unsigned int i = 0; i < iJoyStick; ++i)
     
    414411                {
    415412                    // Two joysticks are probably equal --> add the index as well
    416                     id += "_" + omni_cast<std::string>(iJoyStick);
     413                    id += "_" + multi_cast<std::string>(iJoyStick);
    417414                }
    418415            }
     
    497494                    joyStickMinValues_[iJoyStick][i] = -32768;
    498495                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    499                     this->joyStickIDs_[iJoyStick], "MinValue", i, omni_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
     496                    this->joyStickIDs_[iJoyStick], "MinValue", i, multi_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
    500497
    501498                // Maximum values
     
    503500                    joyStickMaxValues_[iJoyStick][i] = 32767;
    504501                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    505                     this->joyStickIDs_[iJoyStick], "MaxValue", i, omni_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
     502                    this->joyStickIDs_[iJoyStick], "MaxValue", i, multi_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
    506503
    507504                // Middle values
    508505                ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
    509                     this->joyStickIDs_[iJoyStick], "MiddleValue", i, omni_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
     506                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, multi_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
    510507            }
    511508        }
     
    11691166        else
    11701167        {
    1171             float fValue = value - joyStickCalibrations_[iJoyStick].middleValue[axis];
     1168            float fValue = static_cast<float>(value - joyStickCalibrations_[iJoyStick].middleValue[axis]);
    11721169            if (fValue > 0.0f)
    11731170                fValue *= joyStickCalibrations_[iJoyStick].positiveCoeff[axis];
  • code/trunk/src/core/input/InputManager.h

    r3084 r3196  
    4040
    4141#include <map>
     42#include <set>
     43#include <string>
    4244#include <vector>
    43 #include <stack>
     45#include <ois/OISKeyboard.h>
     46#include <ois/OISMouse.h>
     47#include <ois/OISJoyStick.h>
     48
    4449#include "util/Math.h"
    4550#include "util/OrxEnum.h"
  • code/trunk/src/core/input/InputState.h

    r2896 r3196  
    3939#include <string>
    4040#include <vector>
    41 #include "core/Executor.h"
    4241#include "InputInterfaces.h"
    4342
     
    6362        void resetHandlersChanged() { bHandlersChanged_ = false; }
    6463
    65         virtual void onEnter() { if (executorOnEnter_) (*executorOnEnter_)(); }
    66         virtual void onLeave() { if (executorOnLeave_) (*executorOnLeave_)(); }
     64        virtual void onEnter() = 0;
     65        virtual void onLeave() = 0;
    6766
    6867        virtual void registerOnEnter(Executor* executor)      { executorOnEnter_ = executor; }
     
    9291        InputState()
    9392            : bHandlersChanged_(false)
     93            , executorOnEnter_(0)
     94            , executorOnLeave_(0)
    9495            , priority_(0)
    9596            , bAlwaysGetsInput_(false)
    9697            , bTransparent_(false)
    97             , executorOnEnter_(0)
    98             , executorOnLeave_(0)
    9998        { }
    10099        virtual ~InputState() { }
     
    108107
    109108        bool bHandlersChanged_;
     109        Executor*                                   executorOnEnter_;
     110        Executor*                                   executorOnLeave_;
    110111
    111112    private:
     
    123124        bool                                        bAlwaysGetsInput_;
    124125        bool                                        bTransparent_;
    125 
    126         Executor*                                   executorOnEnter_;
    127         Executor*                                   executorOnLeave_;
    128126    };
    129127}
  • code/trunk/src/core/input/KeyBinder.cc

    r2896 r3196  
    3333
    3434#include "KeyBinder.h"
    35 
    36 #include <fstream>
    37 #include <string>
    3835
    3936#include "util/Convert.h"
     
    320317                    {
    321318                        mouseAxes_[2*i + 0].absVal_
    322                             = -mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
     319                            = -mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
    323320                        mouseAxes_[2*i + 1].absVal_ = 0.0f;
    324321                    }
     
    327324                        mouseAxes_[2*i + 0].absVal_ = 0.0f;
    328325                        mouseAxes_[2*i + 1].absVal_
    329                             =  mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
     326                            =  mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
    330327                    }
    331328                    else
  • code/trunk/src/core/input/KeyBinder.h

    r2896 r3196  
    3838#include "core/CorePrereqs.h"
    3939
     40#include <cassert>
     41#include <string>
    4042#include <vector>
    41 #include <cassert>
    4243
    4344#include "InputInterfaces.h"
  • code/trunk/src/core/input/KeyDetector.cc

    r1887 r3196  
    3434
    3535#include "KeyDetector.h"
     36
    3637#include "util/Debug.h"
    3738#include "core/CoreIncludes.h"
    38 #include "core/CommandExecutor.h"
    39 #include "core/CommandEvaluation.h"
    40 #include "InputCommands.h"
    4139#include "Button.h"
    4240
  • code/trunk/src/core/input/KeyDetector.h

    r1887 r3196  
    3838#include "core/CorePrereqs.h"
    3939
     40#include <string>
    4041#include "KeyBinder.h"
    4142
  • code/trunk/src/core/input/SimpleInputState.cc

    r1887 r3196  
    3434
    3535#include "SimpleInputState.h"
     36#include "core/Executor.h"
    3637
    3738namespace orxonox
     
    148149        bHandlersChanged_ = true;
    149150    }
     151
     152    void SimpleInputState::onEnter()
     153    {
     154        if (executorOnEnter_)
     155            (*executorOnEnter_)();
     156    }
     157
     158    void SimpleInputState::onLeave()
     159    {
     160        if (executorOnLeave_)
     161            (*executorOnLeave_)();
     162    }
    150163}
  • code/trunk/src/core/input/SimpleInputState.h

    r2896 r3196  
    7979        void update();
    8080        void numberOfJoySticksChanged(unsigned int n);
     81
     82        void onEnter();
     83        void onLeave();
    8184
    8285        KeyHandler*                   keyHandler_;
Note: See TracChangeset for help on using the changeset viewer.