Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 4, 2010, 11:33:02 PM (14 years ago)
Author:
landauf
Message:

added documentation

also some small naming and readability changes in the code.

Location:
code/branches/doc/src/libraries/util
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/util/Debug.h

    r7323 r7352  
    3535/**
    3636@file
    37 @ingroup Util COUT
     37@ingroup COUT
    3838@brief
    3939    Handles different output-levels of errors, warnings, infos, and debug information.
  • code/branches/doc/src/libraries/util/Math.h

    r7323 r7352  
    3434/**
    3535    @file
    36     @ingroup Util Math
     36    @ingroup Math
    3737    @brief Declaration and implementation of several math-functions, typedefs of some Ogre::Math classes to the orxonox namespace.
    3838*/
  • code/branches/doc/src/libraries/util/MultiType.h

    r7323 r7352  
    3434/**
    3535    @file
    36     @ingroup Util MultiType
     36    @ingroup MultiType
    3737    @brief Declaration of the MultiType and some helper constructs.
    3838
  • code/branches/doc/src/libraries/util/MultiTypeValue.h

    r7323 r7352  
    2929/**
    3030    @file
    31     @ingroup Util MultiType
     31    @ingroup MultiType
    3232    @brief Declaration and Implementation of the MT_Value<T> class.
    3333
  • code/branches/doc/src/libraries/util/Scope.h

    r7323 r7352  
    2929/**
    3030@file
    31 @ingroup Util SingletonScope
     31@ingroup SingletonScope
    3232@brief Declaration of the classes that are needed to use Scopes:
    3333orxonox::Scope, orxonox::ScopeListener, and orxonox::ScopeManager.
  • code/branches/doc/src/libraries/util/ScopedSingletonManager.h

    r7323 r7352  
    2929/**
    3030    @file
    31     @ingroup Util SingletonScope
     31    @ingroup SingletonScope
    3232    @brief Definition of orxonox::ScopedSingletonManager, orxonox::ClassScopedSingletonManager, and the ManageScopedSingleton macro.
    3333
  • code/branches/doc/src/libraries/util/SharedPtr.h

    r7327 r7352  
    2929/**
    3030    @defgroup SharedPtr SharedPtr<T>
    31     @ingroup Util Object
     31    @ingroup Util
    3232*/
    3333
    3434/**
    3535    @file
    36     @ingroup Util SharedPtr
     36    @ingroup SharedPtr
    3737    @brief Definition of the SharedPtr template that is used to manage pointers.
    3838
  • code/branches/doc/src/libraries/util/Singleton.h

    r7323 r7352  
    3434/**
    3535    @file
    36     @ingroup Util SingletonScope
     36    @ingroup SingletonScope
    3737    @brief Definition of the Singleton template that is used as base class for classes that allow only one instance.
    3838
  • code/branches/doc/src/libraries/util/SmallObjectAllocator.h

    r7327 r7352  
    2929/**
    3030    @defgroup SmallObjectAllocator SmallObjectAllocator
    31     @ingroup Util Object
     31    @ingroup Util
    3232*/
    3333
    3434/**
    3535    @file
    36     @ingroup Util SmallObjectAllocator
     36    @ingroup SmallObjectAllocator
    3737    @brief Declaration of SmallObjectAllocator
    3838
  • code/branches/doc/src/libraries/util/StringUtils.h

    r7327 r7352  
    3434/**
    3535    @file
    36     @ingroup Util String
     36    @ingroup String
    3737    @brief Declaration of several string manipulation functions, used in many parts of the game.
    3838*/
  • code/branches/doc/src/libraries/util/SubString.cc

    r7332 r7352  
    3737 *   Extended by Fabian 'x3n' Landau by the SL_PARENTHESES mode.
    3838 */
     39
     40/**
     41    @file
     42    @brief Implementation of the SubString class.
     43*/
    3944
    4045#include "SubString.h"
  • code/branches/doc/src/libraries/util/SubString.h

    r7327 r7352  
    3939 /**
    4040    @file
    41     @ingroup Util String
    42     @brief a small class to get the parts of a string separated by commas
     41    @ingroup String
     42    @brief A helper class to split a string into several tokens.
    4343
    4444    @anchor SubStringExample
  • code/branches/doc/src/libraries/util/VA_NARGS.h

    r7327 r7352  
    3131    @ingroup Util
    3232    @brief Declaration of the ORXONOX_VA_NARGS macro which returns the number of arguments passed to a variadic macro.
     33
     34    With this utility you can overload a macro for different numbers of arguments
     35    (of course overloading is not possible for different types, as macros are not
     36    type aware, but for different numbers of arguments is still very powerful).
     37
     38    Example: A macro to call functions
     39    @code
     40    myfunction();                                           // A static function
     41    MyClass::myStaticFunction();                            // A static class function
     42    MyClass::myFunction();                                  // A member function
     43
     44    #define CallFunction(...) \                             // Define a variadic macro that passes the arguments to the overloaded implementations
     45        BOOST_PP_EXPAND(BOOST_PP_CAT(CallFunction, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
     46
     47    #define CallFunction1(function) \                       // Overloaded macro for 1 argument
     48        function()                                          // Calls the static function
     49
     50    #define CallFunction2(class, function) \                // Overloaded macro for 2 arguments
     51        class::function()                                   // Calls the static class function
     52
     53    #define CallFunction3(class, function, object) \        // Overloaded macro for 3 arguments
     54        object->class::function()                           // Calls the function on the object
     55
     56
     57    CallFunction(myFunction);                               // Call the macro with 1 argument
     58    CallFunction(MyClass, myStaticFunction);                // Call the macro with 2 arguments
     59    CallFunction(MyClass, myFunction, new MyClass());       // Call the macro with 3 arguments
     60    @endcode
     61
     62    Note that the first (variadic) macro concatenates the name "CallFunction" with
     63    the number of arguments ("1" - "N"). Then all arguments are passed to the right macro.
    3364*/
    3465
Note: See TracChangeset for help on using the changeset viewer.