Changeset 9765 in orxonox.OLD for branches/new_class_id/src/lib/util/loading/load_param_class_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_class_description.h
r9764 r9765 15 15 16 16 /*! 17 * @file load_param .h17 * @file load_param_class_description.h 18 18 * A Class and macro-functions, that makes our lives easy to load-in parameters 19 19 */ 20 20 21 #ifndef _LOAD_PARAM_ DESCRIPTION_H22 #define _LOAD_PARAM_ DESCRIPTION_H21 #ifndef _LOAD_PARAM_CLASS_DESCRIPTION_H 22 #define _LOAD_PARAM_CLASS_DESCRIPTION_H 23 23 24 #include <list>25 #include <s tring>24 #include "load_param_description.h" 25 #include <set> 26 26 27 27 // Forward Declaration // 28 28 class MultiType; 29 29 30 /************************ 31 *** DESCRIPTION STUFF *** 32 ************************/ 33 //! A class that handles the description of loadable parameters 34 class LoadParamDescription 30 //! A class for descriptions of a loadable module 31 class LoadParamClassDescription 35 32 { 36 friend class LoadParam;37 friend class LoadClassDescription;38 33 public: 39 LoadParam Description(const std::string& paramName);40 ~LoadParam Description();34 LoadParamClassDescription(const std::string& className); 35 ~LoadParamClassDescription(); 41 36 42 void setDescription(const std::string& descriptionText);43 /** @returns the descriptionString */44 const std::string& getDescription() { return this->description; };37 bool operator==(const std::string& className) const { return this->className == className; }; 38 bool operator==(const LoadParamClassDescription& classDescr) const { return this->className == classDescr.className; }; 39 bool operator<(const LoadParamClassDescription& classDescr) const { return this->className < classDescr.className; } 45 40 46 void print() const; 47 48 private: 49 std::string description; //!< A longer description about this function. 50 51 std::vector<std::string> parameters; 52 std::vector<std::string> defaultValues; 53 54 }; 55 56 57 58 59 //! A class for descriptions of a loadable module 60 class LoadClassDescription 61 { 62 friend class LoadParamBase; 63 public: 64 LoadClassDescription(const std::string& className); 65 ~LoadClassDescription(); 66 67 static LoadClassDescription* addClass(const std::string& className); 41 static LoadParamClassDescription* addClass(const std::string& className); 68 42 LoadParamDescription* addParam(const std::string& paramName); 69 43 … … 75 49 76 50 private: 51 typedef std::set<LoadParamClassDescription> ClassDescriptionSet; 52 typedef std::set<LoadParamDescription> ParamDescriptionSet; 53 77 54 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)55 static ClassDescriptionSet* classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded) 79 56 std::string className; //!< name of the class 80 57 81 std::vector<LoadParamDescription*> paramList; //!< List of parameters this class knows.58 ParamDescriptionSet parameters; //!< List of parameters this class knows. 82 59 }; 83 60 84 #endif /* _LOAD_PARAM_ DESCRIPTION_H */61 #endif /* _LOAD_PARAM_CLASS_DESCRIPTION_H */
Note: See TracChangeset
for help on using the changeset viewer.