Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/loading/load_param_description.h

    r7221 r9869  
    1515
    1616/*!
    17  * @file load_param.h
     17 * @file load_param_description.h
    1818 * A Class and macro-functions, that makes our lives easy to load-in parameters
    1919 */
     
    2222#define _LOAD_PARAM_DESCRIPTION_H
    2323
    24 #include "base_object.h"
    25 #include <list>
     24#include <vector>
     25#include <string>
    2626
    2727// Forward Declaration //
     
    3434class LoadParamDescription
    3535{
    36   friend class LoadParam;
    37   friend class LoadClassDescription;
    3836public:
    39   LoadParamDescription(const std::string& paramName);
    40   ~LoadParamDescription();
     37  LoadParamDescription(const std::string& paramName = "");
     38
     39  //! Compares a LoadParamDescription with a String.
     40  bool operator==(const std::string& paramName) const { return this->_name == paramName; };
     41  //! Compares two LoadParamDescription
     42  bool operator==(const LoadParamDescription& paramDescr) const { return this->_name == paramDescr._name; };
     43  //! Compares two LoadParamDescription with the less operator
     44  bool operator<(const LoadParamDescription& paramDescr) const { return this->_name < paramDescr._name; };
    4145
    4246  void setDescription(const std::string& descriptionText);
     47  void setValues(unsigned int paramCount,
     48                 const MultiType* const defaultValues,
     49                 bool retVal = false);
     50
    4351  /** @returns the descriptionString */
    44   const std::string& getDescription() { return this->description; };
     52  const std::string& description() { return this->_description; };
    4553
    46   void print() const;
     54  void print(FILE* stream = stdout, bool withComments = true) const;
    4755
    4856private:
    49   std::string   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   std::string   description;           //!< A longer description about this function.
    53   char**        defaultValues;         //!< The 'Default Values'. @TODO MAKE THIS A MULTITYPE
    54 };
     57  std::string                _name;                  //!< The Name of the Parameter.
     58  unsigned int               _parameterCount;        //!< The Count of parameters.
     59  std::string                _description;           //!< A longer description about this function.
    5560
    56 //! A class for descriptions of a loadable module
    57 class LoadClassDescription
    58 {
    59   friend class CLoadParam;
    60 public:
    61   LoadClassDescription(const std::string& className);
    62   ~LoadClassDescription();
    63 
    64   static LoadClassDescription* addClass(const std::string& className);
    65   LoadParamDescription* addParam(const std::string& paramName);
    66 
    67   static void deleteAllDescriptions();
    68 
    69   static void printAll(const std::string& fileName = "");
    70   static std::list<std::string> searchClassWithShort(const std::string& classNameBegin);
    71   //  static const LoadParamDescription* getClass(const std::string& className);
    72 
    73 private:
    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   std::string                              className;              //!< name of the class
    77 
    78   std::list<LoadParamDescription*>         paramList;              //!< List of parameters this class knows.
     61  std::vector<std::string>   _types;                 //!< A Vector of types of this Parameter.
     62  std::vector<std::string>   _defaultValues;         //!< A Vector of defaultValues of this Parameter.
    7963};
    8064
Note: See TracChangeset for help on using the changeset viewer.