/* 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 "base_object.h" #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 paramName; //!< The name of the parameter. int paramCount; //!< The count of parameters. int* types; //!< What kind of parameters does this function take ?? std::string description; //!< A longer description about this function. char** defaultValues; //!< The 'Default Values'. @TODO MAKE THIS A MULTITYPE }; //! A class for descriptions of a loadable module class LoadClassDescription { friend class CLoadParam; 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::list* classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded) std::string className; //!< name of the class std::list paramList; //!< List of parameters this class knows. }; #endif /* _LOAD_PARAM_DESCRIPTION_H */