/* 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: ... */ #include "load_param_class_description.h" #include "multi_type.h" #include "debug.h" /** * A list, that holds all the classes that are loadable (classes not objects!!) */ LoadParamClassDescription::ClassDescriptionSet LoadParamClassDescription::_classList; /** * if the description of Parameters should be executed */ bool LoadParamClassDescription::_parametersDescription = false; /** * @param className the name of the class to be loadable */ LoadParamClassDescription::LoadParamClassDescription(const std::string& className) : _className(className) { } /** * deletes a classDescription (deletes all the parameterDescriptions as well */ LoadParamClassDescription::~LoadParamClassDescription() {} void LoadParamClassDescription::deleteAllDescriptions() { LoadParamClassDescription::_classList.clear(); } /** * prints out all loadable Classes, and their parameters * @param fileName prints the output to a File * @todo implement it */ void LoadParamClassDescription::printAll(const std::string& fileName) { PRINT(3)("===============================================================\n"); PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n"); for (ClassDescriptionSet::const_iterator classIt = LoadParamClassDescription::_classList.begin(); classIt != LoadParamClassDescription::_classList.begin(); classIt ++) { PRINT(3)("<%s>\n", (*classIt)._className.c_str()); for (ParamDescriptionSet::const_iterator param = (*classIt)._parameters.begin(); param != (*classIt)._parameters.end(); ++param) { (*param).print(); } PRINT(3)("\n\n", (*classIt)._className.c_str()); } PRINT(3)("===============================================================\n"); }