Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
JsonWriter.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_GEAR_IO_JSONWRITER_HPP_INCLUDED
5 #define FIRE_GEAR_IO_JSONWRITER_HPP_INCLUDED
6 
7 #include <exception>
8 #include <vector>
9 #include <ostream>
10 #include <string>
11 
12 #include "fire/export.hpp"
13 
14 #include "fire/gear/io/Writer.hpp"
15 #include "fire/gear/Group.hpp"
16 
17 namespace fire {
18 namespace gear {
19 namespace geom {
20 class Geometry;
21 } // namespace geom
22 } // namespace gear
23 } // namespace fire
24 
29 namespace fire {
34 namespace gear {
39 namespace io {
44 class FIRE_ENGINE_DLL JsonWriter : public fire::gear::io::Writer {
45  private:
52  bool outputOnlyGeometry;
59  bool outputPretty;
60 
61  public:
72  JsonWriter();
77  virtual ~JsonWriter();
88  void write(const std::vector< fire::gear::geom::Geometry* >& geometries, std::ostream& outputStream);
99  void write(const std::vector< fire::gear::geom::Geometry* >& geometries, const std::string& filePath);
110  void write(const fire::gear::Group& group, std::ostream& outputStream);
122  void write(const fire::gear::Group& group, const std::string& filePath);
133  std::string write(const fire::gear::geom::Geometry& geometry);
138  bool getOutputOnlyGeometry() const;
147  void setOutputOnlyGeometry(bool bvalue);
152  bool getOutputPretty() const;
158  void setOutputPretty(bool bvalue);
159 };
160 } // namespace io
161 } // namespace gear
162 } // namespace fire
163 
164 #endif
Definition: Group.hpp:48
Definition: Geometry.hpp:69
classe di dichiarazione dell' interfaccia del writer delle geometrie
Definition: Writer.hpp:40
classe che specializza l' interfaccia del writer delle geometrie per il formato GeoJson ...
Definition: JsonWriter.hpp:44