ModErn Text Analysis
META Enumerates Textual Applications
Private Member Functions | Private Attributes | List of all members
meta::analyzers::analyzer_factory Class Reference

Factory that is responsible for creating analyzers from configuration files. More...

#include <analyzer_factory.h>

Inheritance diagram for meta::analyzers::analyzer_factory:
meta::util::factory< analyzer_factory, analyzer, const cpptoml::table &, const cpptoml::table & >

Private Member Functions

 analyzer_factory ()
 Constructor.
 
template<class Analyzer >
void register_analyzer ()
 Adds (registers) an analyzer with this factory so it is able to be created.
 

Private Attributes

friend base_factory
 friend the base class
 
std::unordered_map< std::string, factory_methodmethods_
 maps id strings to the factory method used to create that class
 

Additional Inherited Members

- Public Types inherited from meta::util::factory< analyzer_factory, analyzer, const cpptoml::table &, const cpptoml::table & >
using base_factory = factory
 Convenience typedef for the derived classes.
 
using pointer = std::unique_ptr< analyzer >
 The return type for the create method.
 
using factory_method = std::function< pointer(Arguments...)>
 Convenience typedef for the factory methods used to create objects.
 
- Public Member Functions inherited from meta::util::factory< analyzer_factory, analyzer, const cpptoml::table &, const cpptoml::table & >
void add (const std::string &identifier, Function &&fn)
 Associates the given identifier with the given factory method. More...
 
pointer create (const std::string &identifier, Args &&...args)
 Creates a new object based on the factory method parameters. More...
 
- Static Public Member Functions inherited from meta::util::factory< analyzer_factory, analyzer, const cpptoml::table &, const cpptoml::table & >
static analyzer_factory & get ()
 Obtains the singleton. More...
 

Detailed Description

Factory that is responsible for creating analyzers from configuration files.

Clients should use the register_analyzer method instead of this class directly.


The documentation for this class was generated from the following files: