VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
overlayShapeFileSaveHandler.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2016 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 #pragma once
9 
10 #include <vrvUtil/signalslib.h>
11 #include <vrfGuiCore/vrfGuiCore.h>
13 #include <vrvCore/DtUniqueID.h>
14 #include <vlutil/vlFilename.h>
15 
16 #include <set>
17 
18 namespace makVrv
19 {
20  class DtDe;
21  class DtModel;
22  class DtSceneObject;
23 }
24 
25 class GDALDriver;
26 class OGRLayer;
27 class GDALDataset;
28 class OGRGeometry;
29 
30 namespace makVrf
31 {
36  {
37  public:
40 
43 
44  static DtOverlayShapeFileSaveHandler& instance(makVrv::DtDe& de);
45  static void registerInstance(makVrv::DtDe& de, DtOverlayShapeFileSaveHandler*);
46 
48  virtual bool overlayLayerCanBeExported(const std::string& overlayLayer) const;
49 
51  virtual bool exportOverlay(const std::string& overlay, const std::string& rootname);
52 
55  virtual const DtFilename& exportTo() const;
56 
58  virtual bool isExportable(makVrv::DtUniqueID) const;
59 
60  protected:
62  virtual bool exportPointModels(const std::set<makVrv::DtUniqueID>& points, const std::string& root,
63  const std::string& type = "P");
64  virtual bool exportAreaModels(const std::set<makVrv::DtUniqueID>& areas, const std::string& root,
65  const std::string& type = "A");
66  virtual bool exportLinearModels(const std::set<makVrv::DtUniqueID>& lines, const std::string& root,
67  const std::string& type = "L");
68 
70  virtual void removeExistingFiles(const std::string&) const;
71 
72  protected:
74  virtual bool isExportableModel(makVrv::DtModel*) const;
75 
76  virtual bool isPointModel(makVrv::DtModel*) const;
77  virtual bool isAreaModel(makVrv::DtModel*) const;
78  virtual bool isLinearModel(makVrv::DtModel*) const;
79 
80  virtual bool isPointModel(makVrv::DtUniqueID) const;
81  virtual bool isAreaModel(makVrv::DtUniqueID) const;
82  virtual bool isLinearModel(makVrv::DtUniqueID) const;
83 
84  virtual makVrv::DtModel* modelFor(makVrv::DtUniqueID) const;
85 
86  virtual makVrv::DtSceneObject* findSceneObjectFor(makVrv::DtUniqueID) const;
87 
88  virtual GDALDriver* createOGRDriver(const char* driverName = "ESRI Shapefile");
89 
90  virtual OGRLayer* initializeLayerBasedOnType(const std::string& root, const std::string& fileExtension, int ogrType);
91 
92  virtual void addFeaturesToLayer(const std::set<makVrv::DtUniqueID>& items, OGRLayer*, int type) const;
93 
94  virtual void cleanup();
95 
96  virtual OGRGeometry* convertObjectToGeometry(makVrv::DtUniqueID, int type) const;
97  virtual std::string objectName(makVrv::DtUniqueID) const;
98  virtual std::string objectPaletteName(makVrv::DtUniqueID) const;
99  virtual std::string objectEntityType(makVrv::DtUniqueID) const;
100 
101  protected:
103  GDALDriver *myCurrentDriver;
104  GDALDataset *myCurrentDataSource;
106  };
107 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
GDALDataset * myCurrentDataSource
Definition: overlayShapeFileSaveHandler.h:104
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
GDALDriver * myCurrentDriver
Definition: overlayShapeFileSaveHandler.h:103
makVrv::DtDe & myDe
Definition: overlayShapeFileSaveHandler.h:102
DtFilename myExportToDirectory
Definition: overlayShapeFileSaveHandler.h:105
Contains makVrv::DtVirtualBaseClass class.
The DtOverlayShapeFileSaveHandler class is the interface to be used when saving and overlay layer to ...
Definition: overlayShapeFileSaveHandler.h:35
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:41
A model which owns a single model instance.
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)