Changeset 9765 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/load_param_description.h
- Timestamp:
- Sep 19, 2006, 5:49:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/load_param_description.h
r9764 r9765 15 15 16 16 /*! 17 * @file load_param .h17 * @file load_param_description.h 18 18 * A Class and macro-functions, that makes our lives easy to load-in parameters 19 19 */ … … 22 22 #define _LOAD_PARAM_DESCRIPTION_H 23 23 24 #include < list>24 #include <vector> 25 25 #include <string> 26 26 … … 34 34 class LoadParamDescription 35 35 { 36 friend class LoadParam;37 friend class LoadClassDescription;38 36 public: 39 37 LoadParamDescription(const std::string& paramName); 40 38 ~LoadParamDescription(); 39 40 bool operator==(const std::string& paramName) const { return this->name == paramName; }; 41 bool operator==(const LoadParamDescription& paramDescr) const { return this->name == paramDescr.name; }; 42 bool operator<(const LoadParamDescription& paramDescr) const { return this->name < paramDescr.name; }; 41 43 42 44 void setDescription(const std::string& descriptionText); … … 47 49 48 50 private: 51 const std::string name; //!< The Name of the Parameter. 52 unsigned int parameterCount; //!< The Count of parameters. 49 53 std::string description; //!< A longer description about this function. 50 54 51 std::vector<std::string> parameters;55 std::vector<std::string> types; 52 56 std::vector<std::string> defaultValues; 53 57 54 58 }; 55 59 56 57 58 59 //! A class for descriptions of a loadable module60 class LoadClassDescription61 {62 friend class LoadParamBase;63 public:64 LoadClassDescription(const std::string& className);65 ~LoadClassDescription();66 67 static LoadClassDescription* addClass(const std::string& className);68 LoadParamDescription* addParam(const std::string& paramName);69 70 static void deleteAllDescriptions();71 72 static void printAll(const std::string& fileName = "");73 static std::list<std::string> searchClassWithShort(const std::string& classNameBegin);74 // static const LoadParamDescription* getClass(const std::string& className);75 76 private:77 static bool parametersDescription; //!< if parameter-description should be enabled.78 static std::vector<LoadClassDescription*>* classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded)79 std::string className; //!< name of the class80 81 std::vector<LoadParamDescription*> paramList; //!< List of parameters this class knows.82 };83 84 60 #endif /* _LOAD_PARAM_DESCRIPTION_H */
Note: See TracChangeset
for help on using the changeset viewer.