Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8674


Ignore:
Timestamp:
May 30, 2011, 12:01:33 AM (14 years ago)
Author:
rgrieder
Message:

Reduced some header file dependencies in tools:

  • moved Timer::setTimer() to source file
Location:
code/branches/unity_build/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/src/libraries/tools/Shader.h

    r8079 r8674  
    3232#include "tools/ToolsPrereqs.h"
    3333
    34 #include <map>
     34#include <list>
    3535#include <string>
    36 #include <vector>
    37 
    3836#include <OgreCompositorInstance.h>
    3937
    4038#include "util/MultiType.h"
    41 #include "util/OgreForwardRefs.h"
    4239#include "core/ViewportEventListener.h"
    4340
  • code/branches/unity_build/src/libraries/tools/Timer.cc

    r8079 r8674  
    4242#include "core/command/ConsoleCommand.h"
    4343#include "core/command/CommandExecutor.h"
     44#include "core/command/Executor.h"
    4445#include "core/command/Functor.h"
    4546#include "tools/interfaces/TimeFactorListener.h"
     
    175176    {
    176177        return TimeFactorListener::getTimeFactor();
     178    }
     179
     180    /**
     181        @brief Initializes and starts the timer, which will call an executor after some time.
     182        @param interval         The timer-interval in seconds
     183        @param bLoop            If true, the executor gets called every @a interval seconds
     184        @param executor         The executor that will be called
     185        @param bKillAfterCall   If true, the timer will be deleted after the executor was called
     186    */
     187    void Timer::setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall)
     188    {
     189        this->setInterval(interval);
     190        this->bLoop_ = bLoop;
     191        this->executor_ = executor;
     192        this->bActive_ = true;
     193
     194        this->time_ = this->interval_;
     195        this->bKillAfterCall_ = bKillAfterCall;
     196
     197        executor->getFunctor()->setSafeMode(true);
    177198    }
    178199
  • code/branches/unity_build/src/libraries/tools/Timer.h

    r8079 r8674  
    8080
    8181#include "core/OrxonoxClass.h"
    82 #include "core/command/Executor.h"
     82#include "core/command/ExecutorPtr.h"
    8383
    8484namespace orxonox
     
    109109            Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false);
    110110
    111             /**
    112                 @brief Initializes and starts the timer, which will call an executor after some time.
    113                 @param interval         The timer-interval in seconds
    114                 @param bLoop            If true, the executor gets called every @a interval seconds
    115                 @param executor         The executor that will be called
    116                 @param bKillAfterCall   If true, the timer will be deleted after the executor was called
    117             */
    118             void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false)
    119             {
    120                 this->setInterval(interval);
    121                 this->bLoop_ = bLoop;
    122                 this->executor_ = executor;
    123                 this->bActive_ = true;
    124 
    125                 this->time_ = this->interval_;
    126                 this->bKillAfterCall_ = bKillAfterCall;
    127 
    128                 executor->getFunctor()->setSafeMode(true);
    129             }
     111            void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false);
    130112
    131113            void run();
  • code/branches/unity_build/src/modules/pong/PongAI.cc

    r8108 r8674  
    3636#include "core/CoreIncludes.h"
    3737#include "core/ConfigValueIncludes.h"
     38#include "core/command/Executor.h"
    3839#include "tools/Timer.h"
    3940
  • code/branches/unity_build/src/modules/weapons/munitions/ReplenishingMunition.cc

    r5929 r8674  
    2828
    2929#include "ReplenishingMunition.h"
     30
    3031#include "core/CoreIncludes.h"
     32#include "core/command/Executor.h"
    3133
    3234namespace orxonox
  • code/branches/unity_build/src/modules/weapons/projectiles/LightningGunProjectile.cc

    r6417 r8674  
    3131#include "util/Convert.h"
    3232#include "core/CoreIncludes.h"
     33#include "core/command/Executor.h"
    3334
    3435namespace orxonox
  • code/branches/unity_build/src/orxonox/gametypes/Dynamicmatch.cc

    r8327 r8674  
    4848#include "util/Convert.h"
    4949#include "core/CoreIncludes.h"
     50#include "core/command/Executor.h"
    5051#include "network/Host.h"
    5152#include "infos/PlayerInfo.h"
  • code/branches/unity_build/src/orxonox/weaponsystem/Munition.cc

    r7896 r8674  
    2929
    3030#include "Munition.h"
     31
    3132#include "core/CoreIncludes.h"
     33#include "core/command/Executor.h"
    3234
    3335namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.