VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgEarthMemoryFeatureSource.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
12 
14 
15 #include <osgEarth/FeatureSource>
16 #include <osgEarth/Feature>
17 #include <osgEarth/Threading>
18 
19 namespace osgEarth
20 {
21  class LandCoverDictionary;
22 }
23 
24 namespace makVrv
25 {
26 
29 
32 
34  template <>
35  inline const char* creatorTypeName<DtOsgEarthMemoryFeatureSource>(void) { return "DtOsgEarthMemoryFeatureSourceCreator"; }
36 
37 
41  class DT_DLL_VRVOSG DtOsgEarthMemoryFeatureSource : public osgEarth::FeatureSource
42  {
43  public:
44 
47 
48  protected:
51 
53 
54  public:
55 
61  DtOsgEarthMemoryFeatureSource &operator=(const DtOsgEarthMemoryFeatureSource &other) = delete;
62 
63 
64  public: // FeatureSource API
65 
67  virtual osgEarth::Status openImplementation() override;
68 
70  virtual osgEarth::FeatureCursor* createFeatureCursorImplementation(
71  const osgEarth::Query& query,
72  osgEarth::ProgressCallback* progress) override;
73 
75  virtual bool insertFeature(osgEarth::Feature* feature) override;
76 
78  virtual bool deleteFeature(osgEarth::FeatureID fid) override;
79 
81  virtual bool deleteAllFeatures();
82 
84  virtual bool isWritable() const override;
85 
86  protected:
88  osgEarth::FeatureList myFeatures;
89  std::atomic_int myFidgen;
91  };
92 }
friend DtOsgEarthMemoryFeatureSourceCreator
Definition: DtOsgEarthMemoryFeatureSource.h:52
unsigned int FeatureID
Definition: DtFeature.h:21
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
const char * creatorTypeName< DtOsgEarthMemoryFeatureSource >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtOsgEarthMemoryFeatureSource.h:35
DtDe & myDe
Definition: DtOsgEarthMemoryFeatureSource.h:90
osgEarth::Threading::Mutex myMutex
Definition: DtOsgEarthMemoryFeatureSource.h:87
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
std::atomic_int myFidgen
Definition: DtOsgEarthMemoryFeatureSource.h:89
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
osgEarth::FeatureList myFeatures
Definition: DtOsgEarthMemoryFeatureSource.h:88
DtVirtualBaseClassCreator< DtOsgEarthMemoryFeatureSource > DtOsgEarthMemoryFeatureSourceCreator
creator
Definition: DtOsgEarthMemoryFeatureSource.h:28
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Custom feature source that stores features in memory.
Definition: DtOsgEarthMemoryFeatureSource.h:41

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)