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
lanelet::ErrorMessages
std::vector< std::string > ErrorMessages
Definition: Io.h:11
LaneletMap.h
lanelet
lanelet::io::Configuration
std::map< std::string, Attribute > Configuration
Definition: Configuration.h:8
lanelet::io_handlers::IOHandler::Ptr
std::shared_ptr< IOHandler > Ptr
Definition: IoHandler.h:15
IoHandler.h
lanelet::io_handlers::Writer::write
virtual void write(const std::string &filename, const LaneletMap &laneletMap, ErrorMessages &errors, const io::Configuration &params=io::Configuration()) const =0
lanelet::LaneletMap
lanelet::io_handlers::Writer
Base object for writers. To create a new writer, you have to do the following steps:
Definition: Writer.h:22
lanelet::io_handlers::IOHandler::IOHandler
IOHandler()=default
lanelet::io_handlers::Writer::Writer
Writer()=default
lanelet::io_handlers::Writer::handleDefaultProjector
void handleDefaultProjector() const final
using a default projector is not allowed. The implementations define how this issue is handled.
Definition: Writer.h:33
lanelet::io_handlers::IOHandler
Base class for all handlers (writers and parsers)
Definition: IoHandler.h:13
Projection.h


lanelet2_io
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:26:03