Responsible for creation of Parser instances.
More...
#include <Engine.hpp>
|
| | ~Engine () |
| |
| auto | parser (std::string const &name) -> std::shared_ptr< Parser > |
| | Gets or constructs a shared Parser instance that's been previously configured.
|
| |
| auto | parsersInfo () const -> std::unordered_map< std::string, ParserInfo > const & |
| | Gets available parsers info.
|
| |
|
| template<class T , typename... Args> |
| static auto | make (Args &&... args) -> std::shared_ptr< Engine > |
| | Gets or constructs a shared Nlu::Engine instance of type T with args.
|
| |
Responsible for creation of Parser instances.
◆ Engine() [1/3]
| Engine::Engine |
( |
char const * | name, |
|
|
std::string const & | configPath ) |
|
protected |
- Parameters
-
| name | Name of the configuration object in vsdk.json |
| configPath | Path to a vsdk.json formatted file |
◆ Engine() [2/3]
| Engine::Engine |
( |
char const * | name, |
|
|
nlohmann::json | config ) |
|
protected |
- Parameters
-
| name | Name of the configuration object in vsdk.json |
| config | A vsdk.json formatted JSON configuration object |
◆ Engine() [3/3]
| Engine::Engine |
( |
char const * | name, |
|
|
char const * | configPath ) |
|
protected |
Specialization used to avoid overload collisions, forwards to Engine(char const*, std::string const &);
- Parameters
-
| name | Name of the configuration object in vsdk.json |
| configPath | Path to a vsdk.json formatted file |
◆ ~Engine()
◆ make()
template<class T , typename... Args>
| static auto Vsdk::Nlu::Engine::make |
( |
Args &&... | args | ) |
-> std::shared_ptr<Engine>
|
|
static |
Gets or constructs a shared Nlu::Engine instance of type T with args.
- Note
- If an engine of this type exists, a shared instance will be returned instead.
◆ parser()
| auto Engine::parser |
( |
std::string const & | name | ) |
-> std::shared_ptr<Parser> |
Gets or constructs a shared Parser instance that's been previously configured.
- Parameters
-
| name | Found in the configuration of this engine, name of the Parser you want |
◆ parsersInfo()
| auto Engine::parsersInfo |
( |
| ) |
const -> std::unordered_map<std::string, ParserInfo> const & |
Gets available parsers info.
◆ makeParser()
| virtual auto Vsdk::Nlu::Engine::makeParser |
( |
std::string | name | ) |
-> Parser * |
|
protectedpure virtual |
◆ setParserInfo()
- Note
- If
info.name.empty() then removes entry