VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ogrFeatureSet.h
Go to the documentation of this file.
1 
2 
3 
4 
5 #pragma once
6 
9 
10 #include <boost/scoped_ptr.hpp>
11 #include <boost/shared_ptr.hpp>
12 
13 #include <features/featureSet.h>
14 #include <features/feature.h>
15 #include <features/query.h>
16 
18 
19 #include <ogrsf_frmts.h>
20 
21 #include <set>
22 
23 namespace MAKVRinTerra
24 {
26  {
27  public:
28  typedef std::vector<DtFeatureGeometry> GeometryVector;
29 
31  boost::shared_ptr<OGRFeature> feature,
32  DtFeatureGeometry geometry,
33  DtFeature::CPtr defaults);
34 
35  unsigned numberOfAttributes(const Key::String &) const;
36 
37  boost::optional<Attribute> attribute(const Key & k) const;
38 
39  DtFeatureGeometry geometry() const;
40 
41  void forEachAttribute(ForEachFunction) const;
42 
43  DetachCallback addDeleteCallback(const DeleteCallback&) const
44  {
45  return DetachCallback();
46  }
47 
48  bool isDeleted() const
49  {
50  return false;
51  }
52 
53  private:
54  boost::shared_ptr<OGRFeature> myFeature;
57  };
58 
60  {
61  public:
62  typedef boost::shared_ptr<DtOgrDataSource> Ptr;
63 
67  static DtFeatureSet* Make(std::string file);
68 
70  explicit DtOgrDataSource(std::string file);
71 
72  std::string label() const;
73  bool isIndexed() const;
74 
75  protected:
76  std::string myFile;
77  boost::shared_ptr<OGRDataSource> myDataSource;
78  };
79 
81  {
82  public:
84 
85  DtOgrLayer(boost::shared_ptr<OGRDataSource>, int layerNum, bool indexed, std::string srcPath);
86 
87  std::string label() const;
88  void forEachFeatureParallel(const ForEachFunction&) const;
89  DetachCallback forEachFeatureAsync(const ForEachFunction&) const;
90  DtFeatureSet* filter(
91  const DtQuery& query,
92  const boost::optional<DtFeatureGeometry>&,
93  DtLoadType) const;
94  DtFeatureSet* clone() const;
95  bool loaded(double) const;
96  DetachCallback addLoadedCallback(const LoadedCallback&) const;
97  bool empty() const;
98  bool isIndexed() const;
99 
100  protected:
101  explicit DtOgrLayer(const DtOgrLayer& from);
102  DtOgrLayer(const DtOgrLayer& from, boost::optional<DtFeatureGeometry> filter);
103 
104  typedef std::set<DtFeature::Key> AttributeSet;
105 
106  boost::shared_ptr<OGRDataSource> myDataSource;
107  boost::shared_ptr<OGRLayer> myLayer;
109  boost::optional<DtFeatureGeometry> myGeometryFilter;
112  std::string myLayerName;
115  std::string myLabel;
116  };
117 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)