VR-Forces 5.0.2 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 
17 namespace makVrv
18 {
19  class DtDe;
20  class DtModel;
21  class DtSceneObject;
22 }
23 
24 class GDALDriver;
25 class OGRLayer;
26 class GDALDataset;
27 class OGRGeometry;
28 
29 namespace makVrf
30 {
35  {
36  public:
39 
42 
43  static DtOverlayShapeFileSaveHandler& instance(makVrv::DtDe& de);
44  static void registerInstance(makVrv::DtDe& de, DtOverlayShapeFileSaveHandler*);
45 
47  virtual bool overlayLayerCanBeExported(const std::string& overlayLayer) const;
48 
50  virtual bool exportOverlay(const std::string& overlay, const std::string& rootname);
51 
54  virtual const DtFilename& exportTo() const;
55 
57  virtual bool isExportable(makVrv::DtUniqueID) const;
58 
59  protected:
61  virtual bool exportPointModels(const std::set<makVrv::DtUniqueID>& points, const std::string& root,
62  const std::string& type = "P");
63  virtual bool exportAreaModels(const std::set<makVrv::DtUniqueID>& areas, const std::string& root,
64  const std::string& type = "A");
65  virtual bool exportLinearModels(const std::set<makVrv::DtUniqueID>& lines, const std::string& root,
66  const std::string& type = "L");
67 
69  virtual void removeExistingFiles(const std::string&) const;
70 
71  protected:
73  virtual bool isExportableModel(makVrv::DtModel*) const;
74 
75  virtual bool isPointModel(makVrv::DtModel*) const;
76  virtual bool isAreaModel(makVrv::DtModel*) const;
77  virtual bool isLinearModel(makVrv::DtModel*) const;
78 
79  virtual bool isPointModel(makVrv::DtUniqueID) const;
80  virtual bool isAreaModel(makVrv::DtUniqueID) const;
81  virtual bool isLinearModel(makVrv::DtUniqueID) const;
82 
83  virtual makVrv::DtModel* modelFor(makVrv::DtUniqueID) const;
84 
85  virtual makVrv::DtSceneObject* findSceneObjectFor(makVrv::DtUniqueID) const;
86 
87  virtual GDALDriver* createOGRDriver(const char* driverName = "ESRI Shapefile");
88 
89  virtual OGRLayer* initializeLayerBasedOnType(const std::string& root, const std::string& fileExtension, int ogrType);
90 
91  virtual void addFeaturesToLayer(const std::set<makVrv::DtUniqueID>& items, OGRLayer*, int type) const;
92 
93  virtual void cleanup();
94 
95  virtual OGRGeometry* convertObjectToGeometry(makVrv::DtUniqueID, int type) const;
96  virtual std::string objectName(makVrv::DtUniqueID) const;
97  virtual std::string objectPaletteName(makVrv::DtUniqueID) const;
98  virtual std::string objectEntityType(makVrv::DtUniqueID) const;
99 
100  protected:
102  GDALDriver *myCurrentDriver;
103  GDALDataset *myCurrentDataSource;
105  };
106 }
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:103
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
GDALDriver * myCurrentDriver
Definition: overlayShapeFileSaveHandler.h:102
makVrv::DtDe & myDe
Definition: overlayShapeFileSaveHandler.h:101
DtFilename myExportToDirectory
Definition: overlayShapeFileSaveHandler.h:104
Contains makVrv::DtVirtualBaseClass class.
The DtOverlayShapeFileSaveHandler class is the interface to be used when saving and overlay layer to ...
Definition: overlayShapeFileSaveHandler.h:34
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:42
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:55
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:70

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)