Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4256 in orxonox.OLD


Ignore:
Timestamp:
May 22, 2005, 2:31:08 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: doxygen-tags

Location:
orxonox/branches/levelLoader/src/util/loading
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader/src/util/loading/load_param.cc

    r4255 r4256  
    2121#include <stdarg.h>
    2222
    23 
     23/**
     24   \param object The object this Parameter is loaded too.
     25   \param paramName The name of the parameter loaded.
     26   \param paramCount how many parameters this loading-function takes
     27   \param ... the parameter information
     28*/
    2429BaseLoadParam::BaseLoadParam(BaseObject* object, const char* paramName, int paramCount, ...)
    2530{
     
    4853}
    4954
    50 
     55/**
     56   \param descriptionText The text to set as a description for this Parameter
     57*/
    5158void BaseLoadParam::describe(const char* descriptionText)
    5259{
     
    5764}
    5865
     66/**
     67   \param paramName the name of the parameter to load
     68*/
    5969LoadParamDescription::LoadParamDescription(const char* paramName)
    6070{
     
    6575}
    6676
    67 
     77/**
     78   \brief removes all the alocated memory
     79*/
    6880LoadParamDescription::~LoadParamDescription(void)
    6981{
     
    7486  delete []this->types;
    7587  delete []this->paramName;
    76 }
    77 
     88  delete []this->description;
     89}
     90
     91/**
     92   \param descriptionText The text to set as a description for this Parameter
     93*/
    7894void LoadParamDescription::setDescription(const char* descriptionText)
    7995{
    80   this->description = descriptionText;
    81 }
    82 
     96  this->description = new char[strlen(descriptionText)+1];
     97  strcpy(this->description, descriptionText);
     98}
     99
     100/**
     101   \brief prints out this parameter, its input method and the description (if availiable)
     102*/
    83103void LoadParamDescription::print(void) const
    84104{
     
    96116}
    97117
    98 
     118/**
     119   \brief A list, that holds all the classes that are loadable (classes not objects!!)
     120*/
    99121tList<LoadClassDescription>* LoadClassDescription::classList = new tList<LoadClassDescription>;
    100122
     
    104126bool LoadClassDescription::parametersDescription = true;
    105127
     128/**
     129   \param className the name of the class to be loadable
     130*/
    106131LoadClassDescription::LoadClassDescription(const char* className)
    107132{
     
    114139}
    115140
    116 
     141/**
     142   \brief deletes a classDescription (deletes all the parameterDescriptions as well
     143*/
    117144LoadClassDescription::~LoadClassDescription(void)
    118145{
     
    129156}
    130157
    131 
     158/**
     159   \brief adds a class to the list of loadable classes
     160   \param className The name of the class to add
     161
     162   this function searches for the className string, and if found just returns the appropriate Class.
     163   Otherwise it returns a new classDescription
     164*/
    132165LoadClassDescription* LoadClassDescription::addClass(const char* className)
    133166{
     
    148181}
    149182
    150 
     183/**
     184   \brief does the same as addClass(const char* className), but with params
     185   \param paramName the name of the parameter to add.
     186*/
    151187LoadParamDescription* LoadClassDescription::addParam(const char* paramName)
    152188{
     
    168204}
    169205
     206/**
     207   \brief prints out all loadable Classes, and their parameters
     208*/
    170209void LoadClassDescription::printAll(void)
    171210{
  • orxonox/branches/levelLoader/src/util/loading/load_param.h

    r4255 r4256  
    155155
    156156
     157//! A class that handles the description of loadable parameters
    157158class LoadParamDescription
    158159{
     
    169170  void print(void) const;
    170171 private:
    171   char* paramName;
    172   int paramCount;
    173   char** types;
    174   const char* description;
     172  char* paramName;              //!< The name of the parameter
     173  int paramCount;               //!< The count of parameters
     174  char** types;                 //!< What kind of parameters does this function take ??
     175  char* description;            //!< A longer description about this function
    175176};
    176177
     
    187188  static void printAll(void);
    188189
    189   static bool parametersDescription; 
    190   static tList<LoadClassDescription>* classList;
     190  static bool parametersDescription;             //!< if parameter-description should be enabled.
     191  static tList<LoadClassDescription>* classList; //!< a list, that holds all the loadable classes. (after one instance has been loaded)
    191192 private:
    192   char* className;
    193   tList<LoadParamDescription>* paramList;
     193  char* className;                               //!< name of the class
     194  tList<LoadParamDescription>* paramList;        //!< List of parameters this class knows.
    194195};
    195196
     
    204205
    205206 protected:
    206   LoadClassDescription* classDesc;
    207   LoadParamDescription* paramDesc;
    208 };
    209 
    210 
    211 // derived template class
     207  LoadClassDescription* classDesc;               //!< The LoadClassDescription of this LoadParameter
     208  LoadParamDescription* paramDesc;               //!< The LoadParameterDescription of this LoadParameter
     209};
     210
     211
     212//! derived template class, so all the Classes can load something.
    212213template<class T> class LoadParam : public BaseLoadParam
    213214{
Note: See TracChangeset for help on using the changeset viewer.