[4592] | 1 | /* |
---|
[4250] | 2 | orxonox - the future of 3D-vertical-scrollers |
---|
[4233] | 3 | |
---|
[4250] | 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Benjamin Grauer |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
[4592] | 16 | /*! |
---|
[9765] | 17 | * @file load_param_class_description.h |
---|
[5129] | 18 | * A Class and macro-functions, that makes our lives easy to load-in parameters |
---|
| 19 | */ |
---|
[4250] | 20 | |
---|
[9765] | 21 | #ifndef _LOAD_PARAM_CLASS_DESCRIPTION_H |
---|
| 22 | #define _LOAD_PARAM_CLASS_DESCRIPTION_H |
---|
[4233] | 23 | |
---|
[9765] | 24 | #include "load_param_description.h" |
---|
| 25 | #include <set> |
---|
[5129] | 26 | |
---|
[4251] | 27 | // Forward Declaration // |
---|
[5556] | 28 | class MultiType; |
---|
[4251] | 29 | |
---|
[9765] | 30 | //! A class for descriptions of a loadable module |
---|
| 31 | class LoadParamClassDescription |
---|
[5332] | 32 | { |
---|
[7221] | 33 | public: |
---|
[9765] | 34 | LoadParamClassDescription(const std::string& className); |
---|
| 35 | ~LoadParamClassDescription(); |
---|
[5332] | 36 | |
---|
[9767] | 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; } |
---|
[5332] | 40 | |
---|
| 41 | static void deleteAllDescriptions(); |
---|
| 42 | |
---|
[9767] | 43 | |
---|
| 44 | |
---|
[7221] | 45 | static void printAll(const std::string& fileName = ""); |
---|
| 46 | static std::list<std::string> searchClassWithShort(const std::string& classNameBegin); |
---|
| 47 | // static const LoadParamDescription* getClass(const std::string& className); |
---|
[5332] | 48 | |
---|
[7221] | 49 | private: |
---|
[9765] | 50 | typedef std::set<LoadParamClassDescription> ClassDescriptionSet; |
---|
| 51 | typedef std::set<LoadParamDescription> ParamDescriptionSet; |
---|
| 52 | |
---|
[9767] | 53 | static bool _parametersDescription; //!< if parameter-description should be enabled globally. |
---|
[5556] | 54 | |
---|
[9767] | 55 | static ClassDescriptionSet* _classList; //!< a list, that stores all the loadable classes. (after one instance has been loaded) |
---|
| 56 | |
---|
| 57 | private: |
---|
| 58 | std::string _className; //!< name of the class |
---|
| 59 | ParamDescriptionSet _parameters; //!< List of parameters this class knows. |
---|
[5332] | 60 | }; |
---|
| 61 | |
---|
[9765] | 62 | #endif /* _LOAD_PARAM_CLASS_DESCRIPTION_H */ |
---|