LoveBrains  1.0.0
config_getter.h
1 /*
2 ** config_getter.h for LoveBrains in /home/robin_f/Programming/Git/CPP/LoveBrains
3 **
4 ** Made by Guillaume ROBIN
5 ** Login <robin_f@epitech.eu>
6 **
7 ** Started on Fri Jul 31 12:05:11 2015 Guillaume ROBIN
8 ** Last update Tue Aug 25 12:05:17 2015 Guillaume ROBIN
9 */
10 
11 #ifndef CONFIG_GETTER_H_
12 # define CONFIG_GETTER_H_
13 
14 # include <string>
15 
16 # include "Simulator/simulator_config.h"
17 
18 namespace App
19 {
20  /*
21  ** Typedef.
22  */
23  typedef void (*ConfigGetter)(Simulator::SConfig&, std::string const&);
24 
25  /*
26  ** Struct.
27  */
28 
32  typedef struct s_config_getter
33  {
34  std::string token;
35  ConfigGetter get;
37 
38  /*
39  ** Methods.
40  */
41 
45  void config_getCrossingRate(Simulator::SConfig& config, std::string const& value);
49  void config_getMutationRate(Simulator::SConfig& config, std::string const& value);
53  void config_getSelectionRate(Simulator::SConfig& config, std::string const& value);
57  void config_getExpectedFitness(Simulator::SConfig& config, std::string const& value);
61  void config_getPoolSize(Simulator::SConfig& config, std::string const& value);
65  void config_getMaxEpochs(Simulator::SConfig& config, std::string const& value);
69  void config_getReportInterval(Simulator::SConfig& config, std::string const& value);
73  void config_getPopulationSize(Simulator::SConfig& config, std::string const& value);
77  void config_getANNInfos(Simulator::SConfig& config, std::string const& value);
81  void config_getActivation(Simulator::SConfig& config, std::string const& value);
85  void config_getOutputsActivation(Simulator::SConfig& config, std::string const& value);
89  void config_getEnvironmentSize(Simulator::SConfig& config, std::string const& value);
93  void config_getIsTournament(Simulator::SConfig& config, std::string const& value);
97  void config_getDisplayMode(Simulator::SConfig& config, std::string const& value);
98 }
99 
100 #endif /* !CONFIG_GETTER_H_ */
void config_getCrossingRate(Simulator::SConfig &config, std::string const &value)
Get the crossing rate from the configuration file.
Definition: config_getter.cc:23
Contains all the tools which compose the application.
Definition: app.h:27
void config_getActivation(Simulator::SConfig &config, std::string const &value)
Get the activation function for the intern layers, from the configuration file.
Definition: config_getter.cc:214
Manage the configuration of the simulator.
Definition: simulator_config.h:26
struct App::s_config_getter t_config_getter
Object which manage parsing of the configuration file.
void config_getMutationRate(Simulator::SConfig &config, std::string const &value)
Get the mutation rate from the configuration file.
Definition: config_getter.cc:48
void config_getEnvironmentSize(Simulator::SConfig &config, std::string const &value)
Get the environment size (window size) from the configuration file.
Definition: config_getter.cc:248
void config_getPoolSize(Simulator::SConfig &config, std::string const &value)
Get the pool size for the tournament from the configuration file.
Definition: config_getter.cc:114
void config_getIsTournament(Simulator::SConfig &config, std::string const &value)
Get if it's a tournament from the configuration file.
Definition: config_getter.cc:282
void config_getMaxEpochs(Simulator::SConfig &config, std::string const &value)
Get the maximum epochs from the configuration file.
Definition: config_getter.cc:139
void config_getReportInterval(Simulator::SConfig &config, std::string const &value)
Get the report interval from the configuration file.
Definition: config_getter.cc:155
void config_getPopulationSize(Simulator::SConfig &config, std::string const &value)
Get the population size from the configuration file.
Definition: config_getter.cc:172
void config_getDisplayMode(Simulator::SConfig &config, std::string const &value)
Get the display mode of the environment.
Definition: config_getter.cc:290
Object which manage parsing of the configuration file.
Definition: config_getter.h:32
void config_getANNInfos(Simulator::SConfig &config, std::string const &value)
Get the neural network informations from the configuration file.
Definition: config_getter.cc:198
void config_getOutputsActivation(Simulator::SConfig &config, std::string const &value)
Get the activation function for the output layer, from the configuration file.
Definition: config_getter.cc:231
void config_getExpectedFitness(Simulator::SConfig &config, std::string const &value)
Get the expected fitness from the configuration file.
Definition: config_getter.cc:98
void config_getSelectionRate(Simulator::SConfig &config, std::string const &value)
Get the selection rate from the configuration file.
Definition: config_getter.cc:73