summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/config/config.hh
diff options
context:
space:
mode:
authorschodet2005-04-13 21:08:01 +0000
committerschodet2005-04-13 21:08:01 +0000
commitaffc465467f55b37cbde63b1c60aa5298a14da4f (patch)
tree66f8f7bd4d620b0cd2d9ed6e64bff4cccc8ee32e /2005/i/robert/src/config/config.hh
parentce622316783e905dcf67d0b647f70d5299136faf (diff)
Finition de config.
Diffstat (limited to '2005/i/robert/src/config/config.hh')
-rw-r--r--2005/i/robert/src/config/config.hh24
1 files changed, 23 insertions, 1 deletions
diff --git a/2005/i/robert/src/config/config.hh b/2005/i/robert/src/config/config.hh
index 766a70f..c88ec98 100644
--- a/2005/i/robert/src/config/config.hh
+++ b/2005/i/robert/src/config/config.hh
@@ -24,17 +24,39 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// }}}
+#include "config_data.hh"
#include <list>
#include <string>
-/// Class to access config.
+/// Classe d'accés à la configuration.
class Config
{
+ ConfigData configData_;
public:
typedef std::list<int> IntList;
typedef std::list<double> FloatList;
typedef std::list<std::string> StringList;
+ public:
+ /// Boa constricteur, voir ConfigData.
+ Config (int &argc, char **&argv)
+ : configData_ (argc, argv)
+ { }
+ /// Boa constricteur, voir ConfigData.
+ Config (int &argc, char **&argv, const std::string &file)
+ : configData_ (argc, argv, file)
+ { }
+ /// Récupère une valeur de configuration, fonction générique.
+ template<typename T>
+ const T &get (const std::string &id) const
+ {
+ return configData_.get<T> (id);
+ }
+ /// Récupère une valeur de configuration.
+ const any &get (const std::string &id) const
+ {
+ return configData_.get (id);
+ }
};
#endif // config_hh