Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7375


Ignore:
Timestamp:
Sep 8, 2010, 1:39:02 AM (14 years ago)
Author:
landauf
Message:

added documentation

Location:
code/branches/doc/src/libraries
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/core/BaseObject.h

    r7372 r7375  
    3535    @file
    3636    @ingroup BaseObject
    37     @brief Definition of the BaseObject class.
     37    @brief Declaration of BaseObject, the base class of all objects in Orxonox.
    3838
    3939    The BaseObject is the parent of all classes representing an instance in the game.
  • code/branches/doc/src/libraries/core/ClassFactory.h

    r7372 r7375  
    3232    @brief Definition and implementation of the ClassFactory class
    3333
    34     The ClassFactory is able to create new objects of a specific class.
     34    The ClassFactory is able to create new objects of a specific class which creates objects.
    3535*/
    3636
  • code/branches/doc/src/libraries/core/ConfigFileManager.h

    r7373 r7375  
    3030    @file
    3131    @ingroup Config ConfigFile
    32     @brief Declaration of ConfigFileManager and its helper classes.
     32    @brief Declaration of ConfigFileManager and its helper classes, used to load and save config files.
    3333*/
    3434
  • code/branches/doc/src/libraries/core/ConfigValueContainer.h

    r7372 r7375  
    3030    @file
    3131    @ingroup Config ConfigFile
    32     @brief Declaration of the ConfigValueContainer class.
     32    @brief Declaration of the ConfigValueContainer class, caches a config-value.
    3333
    3434    The ConfigValueContainer class contains all needed information about a configurable variable:
  • code/branches/doc/src/libraries/core/Core.h

    r7363 r7375  
    3636    @file
    3737    @ingroup Management CoreGame
     38    @brief Declaration of the Core singleton which is used to configure the program basics.
    3839*/
    3940
  • code/branches/doc/src/libraries/core/CoreIncludes.h

    r7372 r7375  
    3535    @file
    3636    @ingroup Object Factory
    37     @brief Definition of macros for Identifiers
     37    @brief Defines several very important macros used to register objects, create factories, and to work with identifiers.
    3838
    3939    Every class needs the @c RegisterObject(class) macro in its constructor. If the class is an interface
  • code/branches/doc/src/libraries/core/DynLib.h

    r7363 r7375  
    3333    @file
    3434    @ingroup Management CoreGame
     35    @brief Declaration of DynLib which represents a dynamically loaded module.
    3536*/
    3637
     
    6667namespace orxonox
    6768{
    68     /** Resource holding data about a dynamic library.
     69    /** %Resource holding data about a dynamic library.
    6970        @remarks
    7071            This class holds the data required to get symbols from
     
    7475        @since
    7576            27 January 2002
    76         @see
    77             Resource
    7877    */
    7978    class _CoreExport DynLib
  • code/branches/doc/src/libraries/core/DynLibManager.h

    r7363 r7375  
    3333    @file
    3434    @ingroup Management CoreGame
     35    @brief Declaration of DynLibManager, used to load modules at runtime.
    3536*/
    3637
  • code/branches/doc/src/libraries/core/Game.h

    r7363 r7375  
    3131@ingroup Management CoreGame
    3232@brief
    33     Declaration of Game Singleton.
     33    Declaration of Game Singleton which is responsible for running the game.
    3434 */
    3535
  • code/branches/doc/src/libraries/core/GameMode.h

    r7374 r7375  
    3030    @file
    3131    @ingroup Management CoreGame
    32     @brief Declaration of the GameMode class.
     32    @brief Declaration of the GameMode class which stores and returns the current mode of the game.
    3333*/
    3434
  • code/branches/doc/src/libraries/core/Identifier.h

    r7372 r7375  
    3535    @file
    3636    @ingroup Class Identifier
    37     @brief Declaration of Identifier, definition of ClassIdentifier<T>.
     37    @brief Declaration of Identifier, definition of ClassIdentifier<T>; used to identify the class of an object.
    3838
    3939    @anchor IdentifierExample
  • code/branches/doc/src/libraries/core/Iterator.h

    r7372 r7375  
    3030    @file
    3131    @ingroup Object ObjectList
    32     @brief Definition of the Iterator class.
     32    @brief Definition of the Iterator class, used to iterate through object-lists.
    3333
    3434    @anchor IteratorExample
  • code/branches/doc/src/libraries/core/ObjectList.h

    r7372 r7375  
    3535    @file
    3636    @ingroup Object ObjectList
    37     @brief Definition of the ObjectList class.
     37    @brief Definition of the ObjectList class, a wrapper of ObjectListBase.
    3838
    3939    @ref orxonox::ObjectList "ObjectList<T>" is a wrapper of an @ref orxonox::ObjectListBase
  • code/branches/doc/src/libraries/core/ObjectListBase.h

    r7372 r7375  
    3030    @file
    3131    @ingroup Object ObjectList
    32     @brief Declaration of the ObjectListBase class.
     32    @brief Declaration of the ObjectListBase class which stores all objects of each class.
    3333
    3434    orxonox::ObjectListBase is a double-linked list, used by @ref orxonox::Identifier "Identifiers"
  • code/branches/doc/src/libraries/core/ObjectListIterator.h

    r7372 r7375  
    3030    @file
    3131    @ingroup Object ObjectList
    32     @brief Definition of the ObjectListIterator class.
     32    @brief Definition of the ObjectListIterator class, used to iterate through object-lists.
    3333
    3434    @anchor ObjectListIteratorExample
  • code/branches/doc/src/libraries/core/OrxonoxClass.cc

    r7373 r7375  
    2929/**
    3030    @file
    31     @brief Implementation of the OrxonoxClass Class.
     31    @brief Implementation of OrxonoxClass.
    3232*/
    3333
  • code/branches/doc/src/libraries/core/OrxonoxClass.h

    r7373 r7375  
    3535    @file
    3636    @ingroup Class OrxonoxClass
    37     @brief Declaration of the OrxonoxClass Class.
     37    @brief Declaration of OrxonoxClass, the base class of all objects and interfaces in Orxonox.
    3838
    3939    All objects and interfaces of the game-logic (not the engine) are derived from OrxonoxClass.
  • code/branches/doc/src/libraries/core/SmartPtr.h

    r7373 r7375  
    3737    @file
    3838    @ingroup Object SmartPtr
    39     @brief Definition of SmartPtr<T>.
     39    @brief Definition of SmartPtr<T>, wraps a pointer to an object and keeps it alive.
    4040
    4141    @anchor SmartPtrExample
  • code/branches/doc/src/libraries/core/Super.h

    r7372 r7375  
    3535    @file
    3636    @ingroup Class Super
    37     @brief Definition of all super-function related macros.
     37    @brief Definition of all super-function related macros, used to call functions of the base class.
    3838
    3939    This file defines all macros needed to add a new "super-function". If you add
  • code/branches/doc/src/libraries/core/WeakPtr.h

    r7373 r7375  
    3232    @file
    3333    @ingroup Object SmartPtr
    34     @brief Definition of WeakPtr<T>.
     34    @brief Definition of WeakPtr<T>, wraps a pointer to an object.
    3535
    3636    @anchor WeakPtrExample
  • code/branches/doc/src/libraries/tools/Timer.cc

    r7297 r7375  
    2727 */
    2828
     29/**
     30    @file
     31    @brief Implementation of the Timer class.
     32*/
     33
    2934#include "Timer.h"
    3035
     
    4550
    4651    /**
    47         @brief Calls a console command after 'delay' seconds.
     52        @brief Console-command: Calls another console command after @a delay seconds.
    4853        @param delay The delay in seconds
    4954        @param command The console command
     
    6065
    6166    /**
    62         @brief Executes the command.
    63         @param timer The timer to destroy after the command-execution
     67        @brief Helper function for delay(), executes the command and destroys the timer.
     68        @param timer The timer which called this function.
    6469        @param command The command to execute
    6570    */
     
    7277
    7378    /**
    74         @brief Kills all delayed commands.
     79        @brief Console-command: Kills all scheduled commands that were delayed using delay().
    7580    */
    7681    void killdelays()
     
    9297
    9398    /**
    94         @brief Constructor: Initializes the Timer with given values.
    95         @param interval The timer-interval in seconds
    96         @param bLoop If true, the function gets called every 'interval' seconds
    97         @param executor A executor of the function to call
    98         @param bKillAfterCall If true, the timer will be deleted after the function was executed
     99        @brief Constructor: Initializes and starts the timer, which will call an executor after some time.
     100        @param interval         The timer-interval in seconds
     101        @param bLoop            If true, the executor gets called every @a interval seconds
     102        @param executor         The executor that will be called
     103        @param bKillAfterCall   If true, the timer will be deleted after the executor was called
    99104    */
    100105    Timer::Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall)
     
    121126
    122127    /**
    123         @brief Executes the executor.
     128        @brief Calls the executor and destroys the timer if requested.
    124129    */
    125130    void Timer::run()
  • code/branches/doc/src/libraries/tools/Timer.h

    r7307 r7375  
    2727 */
    2828
    29 /*!
     29/**
     30    @defgroup Timer Timer
     31    @ingroup Tools
     32*/
     33
     34/**
    3035    @file
    31     @brief Definition and Implementation of the Timer class.
     36    @ingroup Timer
     37    @brief Declaration of the Timer class, used to call functions after a given time-interval.
    3238
    33     The Timer is a callback-object, calling a given function after a given time-interval.
     39    @anchor TimerExample
     40
     41    Timer is a helper class that executes a function after a given amount of time.
    3442
    3543    Usage: <br>
    3644    header.h:
    3745    @code
    38         class ClassName
    39         {
    40             public:
    41                 ClassName();
    42                 void functionName();
    43                 Timer myTimer;
    44         };
     46    class MyClass
     47    {
     48        public:
     49            MyClass();
     50            void functionName();
     51
     52        private:
     53            Timer myTimer;
     54    };
    4555    @endcode
    4656
    4757    source.cc:
    4858    @code
    49         #include "core/command/Executor.h"
     59    #include "core/command/Executor.h"
    5060
    51         ClassName::ClassName()
    52         {
    53             myTimer.setTimer(interval_in_seconds, bLoop, createExecutor(createFunctor(&ClassName::functionName, this)));
    54         }
     61    MyClass::MyClass()
     62    {
     63        myTimer.setTimer(3, false, createExecutor(createFunctor(&ClassName::myFunction, this)));
     64    }
    5565
    56         void ClassName::functionName()
    57         {
    58             whateveryouwant();
    59             something(else);
    60         }
     66    void MyClass::myFunction()
     67    {
     68        COUT(0) << "Hello World" << std::endl;
     69    }
    6170    @endcode
     71
     72    The code in this example prints "Hello World" to the console, 3 seconds after creating
     73    an instance of MyClass.
    6274*/
    6375
     
    7789    void executeDelayedCommand(Timer* timer, const std::string& command);
    7890
    79     //! The Timer is a callback-object, calling a given function after a given time-interval.
     91    /**
     92        @brief Timer is a helper class that executes a function after a given amount of time.
     93
     94        @see See @ref TimerExample "Timer.h" for an example.
     95    */
    8096    class _ToolsExport Timer : public TimeFactorListener
    8197    {
     
    86102
    87103            /**
    88                 @brief Initializes the Timer with given values.
    89                 @param interval The timer-interval in seconds
    90                 @param bLoop If true, the function gets called every 'interval' seconds
    91                 @param executor A executor of the function to call
    92                 @param bKillAfterCall If true, the timer will be deleted after the function was executed
     104                @brief Initializes and starts the timer, which will call an executor after some time.
     105                @param interval         The timer-interval in seconds
     106                @param bLoop            If true, the executor gets called every @a interval seconds
     107                @param executor         The executor that will be called
     108                @param bKillAfterCall   If true, the timer will be deleted after the executor was called
    93109            */
    94110            void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false)
     
    105121            void run();
    106122
    107             /** @brief Starts the Timer: Function-call after 'interval' seconds. */
     123            /// Re-starts the Timer: The executor will be called after @a interval seconds.
    108124            inline void startTimer()
    109125                { this->bActive_ = true; this->time_ = this->interval_; }
    110             /** @brief Stops the Timer. */
     126            /// Stops the Timer.
    111127            inline void stopTimer()
    112128                { this->bActive_ = false; this->time_ = this->interval_; }
    113             /** @brief Pauses the Timer - it will continue with the actual state if you unpause it. */
     129            /// Pauses the Timer - it will continue with the actual state if you call unpauseTimer().
    114130            inline void pauseTimer()
    115131                { this->bActive_ = false; }
    116             /** @brief Unpauses the Timer - continues with the given state. */
     132            /// Unpauses the Timer - continues with the given state.
    117133            inline void unpauseTimer()
    118134                { this->bActive_ = true; }
    119             /** @brief Returns true if the Timer is active (= not stoped, not paused). @return True = Time is active */
     135            /// Returns true if the Timer is active (neither stoped nor paused).
    120136            inline bool isActive() const
    121137                { return this->bActive_; }
    122             /** @brief Returns the remaining time until the Timer calls the function. @return The remaining time */
     138            /// Returns the remaining time until the Timer calls the executor.
    123139            inline float getRemainingTime() const
    124140                { return static_cast<float>(this->time_ / 1000000.0f); }
    125             /** @brief Gives the Timer some extra time. @param time The amount of extra time in seconds */
     141            /// Increases the remaining time of the Timer by the given amount of time (in seconds).
    126142            inline void addTime(float time)
    127143                { if (time > 0.0f) this->time_ += static_cast<long long>(time * 1000000.0f); }
    128             /** @brief Decreases the remaining time of the Timer. @param time The amount of time to remove */
     144            /// Decreases the remaining time of the Timer by the given amount of time (in seconds)
    129145            inline void removeTime(float time)
    130146                { if (time > 0.0f) this->time_ -= static_cast<long long>(time * 1000000.0f); }
    131             /** @brief Sets the interval of the Timer. @param interval The interval */
     147            /// Changes the calling interval.
    132148            inline void setInterval(float interval)
    133149                { this->interval_ = static_cast<long long>(interval * 1000000.0f); }
    134             /** @brief Sets bLoop to a given value. @param bLoop True = loop */
     150            /// Defines if the timer call the executor every @a interval seconds or only once.
    135151            inline void setLoop(bool bLoop)
    136152                { this->bLoop_ = bLoop; }
     
    141157            void init();
    142158
    143             ExecutorPtr executor_;  //!< The executor of the function that should be called when the time expires
     159            ExecutorPtr executor_;  //!< The executor of the function that will be called when the time expires
    144160
    145161            long long interval_;    //!< The time-interval in micro seconds
    146             bool bLoop_;            //!< If true, the function gets called every 'interval' seconds
    147             bool bActive_;          //!< If true, the Timer ticks and calls the function if the time's up
    148             bool bKillAfterCall_;   //!< If true the timer gets deleted after it called the function
     162            bool bLoop_;            //!< If true, the executor gets called every @a interval seconds
     163            bool bActive_;          //!< If true, the Timer ticks and calls the executor if the time's up
     164            bool bKillAfterCall_;   //!< If true the timer gets deleted after it expired and called the executor
    149165
    150             long long time_;        //!< Internal variable, counting the time till the next function-call
     166            long long time_;        //!< Internal variable, counting the time untill the next executor-call
    151167    };
    152168}
Note: See TracChangeset for help on using the changeset viewer.