defuze.me  Client
paramscore.hpp
00001 /**************************************************************************
00002 ** defuze.me Epitech Innovative Project
00003 **
00004 ** Copyright 2010-2011
00005 **   Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard
00006 **   Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier
00007 **
00008 ** All rights reserved.
00009 **************************************************************************/
00010 
00011 #ifndef PARAMSCORE_HPP
00012 #define PARAMSCORE_HPP
00013 
00014 #include "core.hpp"
00015 #include "parameterizable.hpp"
00016 #include <QtCore/QHash>
00017 #include <QtCore/QVariant>
00018 
00019 namespace Params
00020 {
00021 
00027     class ParamsCore : public Core, public Parameterizable
00028     {
00029     public:
00030         ParamsCore(QStringList &arguments);
00031         ~ParamsCore();
00032         void init(Cores *cores);
00033         void aboutToQuit();
00034 
00035         void registerParameterizable(Parameterizable *parameterizable);
00036         const QHash<QString, QVariant> cmdLineParameters(QString paramsName) const;
00037 
00038     private:
00039         void handleCmdLineParameters(QStringList &arguments);
00040         void _printCmdLineParameters();
00041         void defineParams();
00042 
00043         QHash<QString, QHash<QString, QVariant> > _cmdLineParameters;                                   
00044         QHash<QString, Parameterizable*> _parameterizables;
00045     };
00046 
00047 }
00048 
00049 #endif // PARAMSCORE_HPP