#include <TokenizerFactory.h>
|
| static Tokenizer * | create (const std::string &id, const std::string &tokenizer_dir) |
| |
| static void | add (const std::string &name, const Creator &ctor) |
| |
Definition at line 29 of file TokenizerFactory.h.
◆ Creator
◆ add()
| void ggma::TokenizerFactory::add |
( |
const std::string & |
name, |
|
|
const Creator & |
ctor |
|
) |
| |
|
static |
◆ create()
| Tokenizer * ggma::TokenizerFactory::create |
( |
const std::string & |
id, |
|
|
const std::string & |
tokenizer_dir |
|
) |
| |
|
static |
Definition at line 29 of file TokenizerFactory.cc.
30{
31 auto &factory = getInstance();
32 auto ctor_it = factory._ctors.find(id);
33 if (ctor_it != factory._ctors.end())
34 {
35 auto tokenizer = ctor_it->second(package_path);
36 if (tokenizer)
37 {
38 return tokenizer;
39 }
40 }
41 return nullptr;
42}
Referenced by ggma_create_tokenizer().
The documentation for this class was generated from the following files: