Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/util/loading/load_param_description.h @ 7130

Last change on this file since 7130 was 7130, checked in by bensch, 19 years ago

orxonox/trunk: removed some std::list

File size: 2.6 KB
RevLine 
[4592]1/*
[4250]2   orxonox - the future of 3D-vertical-scrollers
[4233]3
[4250]4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
[4592]16/*!
[5039]17 * @file load_param.h
[5129]18 * A Class and macro-functions, that makes our lives easy to load-in parameters
19 */
[4250]20
[5546]21#ifndef _LOAD_PARAM_DESCRIPTION_H
22#define _LOAD_PARAM_DESCRIPTION_H
[4233]23
[4597]24#include "base_object.h"
[7130]25#include <list>
[5129]26
[4251]27// Forward Declaration //
[5556]28class MultiType;
[4251]29
[5332]30/************************
31*** DESCRIPTION STUFF ***
32************************/
33//! A class that handles the description of loadable parameters
34class LoadParamDescription
35{
[5655]36  friend class LoadParam;
[5332]37  friend class LoadClassDescription;
38 public:
39  LoadParamDescription(const char* paramName);
40  ~LoadParamDescription();
41
42  void setDescription(const char* descriptionText);
43  /** @returns the descriptionString */
44  const char* getDescription() { return this->description; };
45
46  void print() const;
[5708]47
[5332]48 private:
49  char*         paramName;             //!< The name of the parameter.
50  int           paramCount;            //!< The count of parameters.
51  int*          types;                 //!< What kind of parameters does this function take ??
52  char*         description;           //!< A longer description about this function.
[5556]53  char**        defaultValues;         //!< The 'Default Values'. @TODO MAKE THIS A MULTITYPE
[5332]54};
55
56//! A class for descriptions of a loadable module
57class LoadClassDescription
58{
[5671]59  friend class CLoadParam;
[5332]60 public:
61  LoadClassDescription(const char* className);
62  ~LoadClassDescription();
63
64  static LoadClassDescription* addClass(const char* className);
65  LoadParamDescription* addParam(const char* paramName);
66
67  static void deleteAllDescriptions();
68
69  static void printAll(const char* fileName = NULL);
[7130]70  static std::list<const char*> searchClassWithShort(const char* classNameBegin);
[5332]71//  static const LoadParamDescription* getClass(const char* className);
72
73 private:
[7130]74  static bool                              parametersDescription;  //!< if parameter-description should be enabled.
75  static std::list<LoadClassDescription*>* classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
76  char*                                    className;              //!< name of the class
[5556]77
[7130]78  std::list<LoadParamDescription*>         paramList;              //!< List of parameters this class knows.
[5332]79};
80
[5546]81#endif /* _LOAD_PARAM_DESCRIPTION_H */
Note: See TracBrowser for help on using the repository browser.