diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:04:34 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:16:14 +0100 |
commit | e6ab4a8ed100d5d5b7611c74cf3ccd556f1f1d71 (patch) | |
tree | 129cf13c2f9b3eae54402300db4570815789a02a /include/HyperNeat/Utils/LoadFile.hpp |
Diffstat (limited to 'include/HyperNeat/Utils/LoadFile.hpp')
-rw-r--r-- | include/HyperNeat/Utils/LoadFile.hpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/HyperNeat/Utils/LoadFile.hpp b/include/HyperNeat/Utils/LoadFile.hpp new file mode 100644 index 0000000..1960e90 --- /dev/null +++ b/include/HyperNeat/Utils/LoadFile.hpp @@ -0,0 +1,40 @@ +#ifndef __HYPERNEAT_LOADFILE_HPP__ +#define __HYPERNEAT_LOADFILE_HPP__ + +#include <iostream> +#include <HyperNeat/Utils/String.hpp> +#include <HyperNeat/Utils/Vector.hpp> + +namespace hyperneat +{ + using Istream = std::istream; + + class Genome; + class Organism; + class Population; + class NoveltyMetric; + class PopulationPrms; + class NoveltyMetricPrms; + + class LoadFile + { + public: + LoadFile(Istream& stream); + + void loadPopulation(Population& population); + void loadPopulationPrms(PopulationPrms& prms); + void loadNeuralNetPrms(NeuralNetPrms& prms); + void loadNoveltyMetric(NoveltyMetric& noveltyMetric); + void loadNoveltyMetricPrms(NoveltyMetricPrms& prms); + void loadOrganism(Organism& organism); + void loadGenome(Genome& genome); + + private: + Istream& nextPrm(bool arrayVal = false); + Istream& nextArrayValue(); + + Istream& _stream; + }; +} + +#endif |