VR-Forces Developer's Guide
 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 <vrfGuiCore/vrfGuiCore.h>
12 #include <vrvCore/DtUniqueID.h>
13 #include <vlutil/vlFilename.h>
14 
15 #include <set>
16 #include <string>
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 
42  virtual ~DtOverlayShapeFileSaveHandler() override;
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. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
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:19
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:44
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)