Writer.h
Go to the documentation of this file.
1 #pragma once
3 
4 #include <iostream>
5 #include <memory>
6 
9 
10 namespace lanelet {
11 namespace io_handlers {
22 class Writer : public IOHandler {
23  public:
24  Writer() = default;
26  using Ptr = std::shared_ptr<Writer>;
27 
28  virtual void write(const std::string& filename, const LaneletMap& laneletMap, ErrorMessages& errors,
29  const io::Configuration& params = io::Configuration()) const = 0;
30 
31  // IOHandler interface
32  private:
33  void handleDefaultProjector() const final {
34  std::cout << "Default origin should not be used when writing into a format that uses georeferenced lat/lon "
35  "coordinates. Will continue to write the map, but the data will be dislocated and deformed"
36  << std::endl;
37  }
38 };
39 } // namespace io_handlers
40 } // namespace lanelet
Base class for all handlers (writers and parsers)
Definition: IoHandler.h:13
std::vector< std::string > ErrorMessages
Definition: Io.h:11
std::map< std::string, Attribute > Configuration
Definition: Configuration.h:8
virtual void write(const std::string &filename, const LaneletMap &laneletMap, ErrorMessages &errors, const io::Configuration &params=io::Configuration()) const =0
void handleDefaultProjector() const final
using a default projector is not allowed. The implementations define how this issue is handled...
Definition: Writer.h:33
Base object for writers. To create a new writer, you have to do the following steps: ...
Definition: Writer.h:22
std::shared_ptr< IOHandler > Ptr
Definition: IoHandler.h:15


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