VR-Forces 4.2 Class Documentation
ogrFeatureSet.h
Go to the documentation of this file.
1 
2 
3 
4 
5 #pragma once
6 
8 
9 #include <boost/scoped_ptr.hpp>
10 #include <boost/shared_ptr.hpp>
11 
12 #include <features/featureSet.h>
13 #include <features/feature.h>
14 #include <features/query.h>
15 
16 #include <ogrsf_frmts.h>
17 
18 namespace MAKVRinTerra
19 {
21  {
22  public:
23  typedef std::vector<DtFeatureGeometry> GeometryVector;
24 
26  boost::shared_ptr<OGRFeature> feature,
27  DtFeatureGeometry geometry,
28  DtFeature::CPtr defaults);
29 
30  unsigned numberOfAttributes(const Key::String &) const;
31 
32  boost::optional<Attribute> attribute(const Key & k) const;
33 
34  DtFeatureGeometry geometry() const;
35 
36  void forEachAttribute(ForEachFunction) const;
37 
38  private:
39  boost::shared_ptr<OGRFeature> myFeature;
42  };
43 
45  {
46  public:
47  typedef boost::shared_ptr<DtOgrDataSource> Ptr;
48 
52  static DtFeatureSet* Make(std::string file);
53 
55  explicit DtOgrDataSource(std::string file);
56 
57  std::string label() const;
58  bool isIndexed() const;
59 
60  protected:
61  std::string myFile;
62  boost::shared_ptr<OGRDataSource> myDataSource;
63  };
64 
66  {
67  public:
69 
70  DtOgrLayer(boost::shared_ptr<OGRDataSource>, int layerNum, bool indexed, std::string srcPath);
71 
72  std::string label() const;
73  void forEachFeature(ForEachFunction, DtWaitType) const;
74  DtFeatureSet* filter(const DtQuery &, DtLoadType) const;
75  DtFeatureSet* clone() const;
76  bool loaded(double) const;
77  bool empty() const;
78  bool isIndexed() const;
79 
80  protected:
81  explicit DtOgrLayer(const DtOgrLayer& from);
82  DtOgrLayer(const DtOgrLayer& from, boost::optional<DtFeatureGeometry> filter);
83 
84  typedef std::set<DtFeature::Key> AttributeSet;
85 
86  boost::shared_ptr<OGRDataSource> myDataSource;
87  boost::shared_ptr<OGRLayer> myLayer;
89  boost::optional<DtFeatureGeometry> myGeometryFilter;
92  std::string myLayerName;
95  std::string myLabel;
96  };
97 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)