factory.hpp (982B)
1 /** 2 * @file 3 * @brief Declaration of factories for nmlp classes. 4 */ 5 6 #ifndef FACTORY_HPP_INCLUDED 7 #define FACTORY_HPP_INCLUDED 8 9 #include <cstddef> 10 #include <iosfwd> 11 #include <string> 12 13 #include <boost/shared_ptr.hpp> 14 #include <nmlp/Criterion.h> 15 #include <nmlp/modules/SequentialModule.h> 16 17 // pre-declaration 18 namespace boost{ namespace program_options{ 19 class variables_map; 20 } } 21 22 23 /** @brief Construct a Module interactively. */ 24 boost::shared_ptr<SequentialModule> interactive_module_factory(std::istream &in, std::ostream &out, std::size_t input_size, std::size_t output_size); 25 26 /** @brief Construct a Module from a configuration stream. */ 27 boost::shared_ptr<SequentialModule> detached_module_factory(boost::program_options::variables_map const &vm, std::string const &prefix, std::size_t input_size, std::size_t output_size); 28 29 /** @brief Construct a criterion of a given size. */ 30 boost::shared_ptr<Criterion> criterion_factory(std::string const &name, std::size_t size); 31 32 #endif 33