/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Benjamin Grauer co-programmer: ... */ /*! * @file load_param_class_description.h * A Class and macro-functions, that makes our lives easy to load-in parameters */ #ifndef _LOAD_PARAM_CLASS_DESCRIPTION_H #define _LOAD_PARAM_CLASS_DESCRIPTION_H #include "load_param_description.h" #include "class_id.h" #include #include // Forward Declaration // class MultiType; //! A class for descriptions of a loadable module class LoadParamClassDescription { public: LoadParamClassDescription(const std::string& className = ""); ~LoadParamClassDescription(); bool operator==(const std::string& className) const { return this->_className == className; }; bool operator==(const LoadParamClassDescription& classDescr) const { return this->_className == classDescr._className; }; bool operator<(const LoadParamClassDescription& classDescr) const { return this->_className < classDescr._className; } static void describeClass(const ClassID& classID, const std::string& paramName, const std::string& descriptionText); static void setValuesOf(const ClassID& classID, const std::string& paramName, unsigned int paramCount, const MultiType* const defaultValues, bool retVal = false); static void deleteAllDescriptions(); static void printAll(const std::string& fileName = ""); private: typedef std::map ClassDescriptionMap; typedef std::map ParamDescriptionMap; private: static ParamDescriptionMap::iterator getParamDescription(const ClassID& classID, const std::string& paramName); private: static bool _parametersDescription; //!< if parameter-description should be enabled globally. static ClassDescriptionMap _classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded) private: std::string _className; //!< name of the class ParamDescriptionMap _parameters; //!< List of parameters this class knows. }; #endif /* _LOAD_PARAM_CLASS_DESCRIPTION_H */