/* 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.h * A Class and macro-functions, that makes our lives easy to load-in parameters */ #ifndef _LOAD_PARAM_DESCRIPTION_H #define _LOAD_PARAM_DESCRIPTION_H #include #include // Forward Declaration // class MultiType; /************************ *** DESCRIPTION STUFF *** ************************/ //! A class that handles the description of loadable parameters class LoadParamDescription { friend class LoadParam; friend class LoadClassDescription; public: LoadParamDescription(const std::string& paramName); ~LoadParamDescription(); void setDescription(const std::string& descriptionText); /** @returns the descriptionString */ const std::string& getDescription() { return this->description; }; void print() const; private: std::string description; //!< A longer description about this function. std::vector parameters; std::vector defaultValues; }; //! A class for descriptions of a loadable module class LoadClassDescription { friend class LoadParamBase; public: LoadClassDescription(const std::string& className); ~LoadClassDescription(); static LoadClassDescription* addClass(const std::string& className); LoadParamDescription* addParam(const std::string& paramName); static void deleteAllDescriptions(); static void printAll(const std::string& fileName = ""); static std::list searchClassWithShort(const std::string& classNameBegin); // static const LoadParamDescription* getClass(const std::string& className); private: static bool parametersDescription; //!< if parameter-description should be enabled. static std::vector* classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded) std::string className; //!< name of the class std::vector paramList; //!< List of parameters this class knows. }; #endif /* _LOAD_PARAM_DESCRIPTION_H */