Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/presentation/src/lib/util/loading/load_param_description.h @ 10769

Last change on this file since 10769 was 9869, checked in by bensch, 18 years ago

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 size: 2.2 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
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
16/*!
17 * @file load_param_description.h
18 * A Class and macro-functions, that makes our lives easy to load-in parameters
19 */
20
21#ifndef _LOAD_PARAM_DESCRIPTION_H
22#define _LOAD_PARAM_DESCRIPTION_H
23
24#include <vector>
25#include <string>
26
27// Forward Declaration //
28class MultiType;
29
30/************************
31*** DESCRIPTION STUFF ***
32************************/
33//! A class that handles the description of loadable parameters
34class LoadParamDescription
35{
36public:
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; };
45
46  void setDescription(const std::string& descriptionText);
47  void setValues(unsigned int paramCount,
48                 const MultiType* const defaultValues,
49                 bool retVal = false);
50
51  /** @returns the descriptionString */
52  const std::string& description() { return this->_description; };
53
54  void print(FILE* stream = stdout, bool withComments = true) const;
55
56private:
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.
60
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.
63};
64
65#endif /* _LOAD_PARAM_DESCRIPTION_H */
Note: See TracBrowser for help on using the repository browser.