Factory class for all suppored lanelet map parsers. More...
#include <Factory.h>
Public Types | |
using | ParserCreationFcn = std::function< Parser *(const Projector &, const io::Configuration &)> |
Static Public Member Functions | |
static std::vector< std::string > | availableExtensions () |
returns all available extensions as vector More... | |
static std::vector< std::string > | availableParsers () |
returns all available parsers as vector More... | |
static Parser::Ptr | create (const std::string &parserName, const Projector &projector, const io::Configuration &config=io::Configuration()) |
creates a parser that matches the given name. More... | |
static Parser::Ptr | createFromExtension (const std::string &extension, const Projector &projector, const io::Configuration &config=io::Configuration()) |
creates a matching parser for the given file extension More... | |
static ParserFactory & | instance () |
Private Member Functions | |
ParserFactory ()=default | |
void | registerParser (const std::string &strategy, const std::string &extension, const ParserCreationFcn &factoryFunction) |
Private Attributes | |
std::map< std::string, ParserCreationFcn > | extensionRegistry_ |
std::map< std::string, ParserCreationFcn > | registry_ |
Friends | |
template<typename T > | |
class | RegisterParser |
using lanelet::io_handlers::ParserFactory::ParserCreationFcn = std::function<Parser*(const Projector&, const io::Configuration&)> |
|
privatedefault |
|
static |
returns all available extensions as vector
Definition at line 56 of file Factory.cpp.
|
static |
returns all available parsers as vector
Definition at line 47 of file Factory.cpp.
|
static |
creates a parser that matches the given name.
parserName | name of the parser (one of availableParsers()) |
projector | projection object passed to the parser |
config | config object passed to the parser |
a | lanelet2::UnsupportedIOHandlerError if handler is not registered |
Definition at line 23 of file Factory.cpp.
|
static |
creates a matching parser for the given file extension
extension | extension to look for (including the dot!) |
projector | projection object passed to the parser |
config | config object passed to the parser |
a | lanelet2::UnsupportedExtensionError if extension is not registered |
Definition at line 35 of file Factory.cpp.
|
static |
Definition at line 65 of file Factory.cpp.
|
private |
Definition at line 70 of file Factory.cpp.
|
friend |
|
private |
|
private |