Parser.h
Go to the documentation of this file.
1 #pragma once
3 
4 #include <memory>
5 
9 
10 namespace lanelet {
11 namespace io_handlers {
22 class Parser : public IOHandler {
23  public:
25  Parser() = default;
26  using Ptr = std::shared_ptr<Parser>;
27  virtual std::unique_ptr<LaneletMap> parse(const std::string& filename, ErrorMessages& errors) const = 0;
28 
29  private:
31  void handleDefaultProjector() const final {
32  throw lanelet::IOError("You must pass an origin when loading a map with georeferenced (lat/lon) data!");
33  }
34 };
35 } // namespace io_handlers
36 } // namespace lanelet
Base class for all handlers (writers and parsers)
Definition: IoHandler.h:13
std::vector< std::string > ErrorMessages
Definition: Io.h:11
Generic error for all errors in this module.
Definition: Exceptions.h:13
Base object for parsers. To create a new parser, you have to do the following steps: ...
Definition: Parser.h:22
void handleDefaultProjector() const final
loading a map with a default origin throws an error
Definition: Parser.h:31
virtual std::unique_ptr< LaneletMap > parse(const std::string &filename, ErrorMessages &errors) const =0
std::shared_ptr< IOHandler > Ptr
Definition: IoHandler.h:15


lanelet2_io
Author(s): Fabian Poggenhans
autogenerated on Tue Jun 6 2023 02:23:45