Factory class for all supported lanelet map writers. More...
#include <Factory.h>
Public Types | |
| using | WriterCreationFcn = std::function< Writer *(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 > | availableWriters () |
| returns all available writers as vector More... | |
| static Writer::Ptr | create (const std::string &writerName, const Projector &projector, const io::Configuration &config=io::Configuration()) |
| creates a writer that matches the given name. More... | |
| static Writer::Ptr | createFromExtension (const std::string &extension, const Projector &projector, const io::Configuration &config=io::Configuration()) |
| creates a matching writer for the given file extension More... | |
| static WriterFactory & | instance () |
Private Member Functions | |
| void | registerWriter (const std::string &strategy, const std::string &extension, const WriterCreationFcn &factoryFunction) |
| WriterFactory ()=default | |
Private Attributes | |
| std::map< std::string, WriterCreationFcn > | extensionRegistry_ |
| std::map< std::string, WriterCreationFcn > | registry_ |
Friends | |
| template<typename T > | |
| class | RegisterWriter |
| using lanelet::io_handlers::WriterFactory::WriterCreationFcn = std::function<Writer*(const Projector&, const io::Configuration&)> |
|
privatedefault |
|
static |
returns all available extensions as vector
Definition at line 114 of file Factory.cpp.
|
static |
returns all available writers as vector
Definition at line 105 of file Factory.cpp.
|
static |
creates a writer that matches the given name.
| writerName | name of the writer (one of availableParsers()) |
| projector | projection object passed to the writer |
| config | config object passed to the writer |
| a | lanelet2::UnsupportedIOHandlerError if handler is not registered |
Definition at line 81 of file Factory.cpp.
|
static |
creates a matching writer for the given file extension
| extension | extension to look for (including the dot!) |
| projector | projection object passed to the writer |
| config | config object passed to the writer |
| a | lanelet2::UnsupportedExtensionError if extension is not registered |
Definition at line 93 of file Factory.cpp.
|
static |
Definition at line 123 of file Factory.cpp.
|
private |
Definition at line 128 of file Factory.cpp.
|
friend |
|
private |
|
private |