VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
featureSetList.h
Go to the documentation of this file.
1 
2 
3 
4 
5 #pragma once
6 
7 #include <features/featureSet.h>
8 
9 #include <vector>
10 
11 #include <tbb/spin_mutex.h>
12 
13 namespace MAKVRinTerra
14 {
20  template <typename FS, typename Inner>
22  : public FS
23  , public DtObjectDebugger< DtFeatureSetList<FS,Inner> >
24  {
25  public:
26  using FS::filter;
27 
28  typedef FS FeatureSet;
29  typedef typename FeatureSet::ForEachFunction ForEachFunction;
30  typedef typename FeatureSet::LoadedCallback LoadedCallback;
31  typedef typename FeatureSet::DetachCallback DetachCallback;
32  typedef typename FS::Visitor Visitor;
33  typedef typename FS::ConstVisitor ConstVisitor;
34 
35  explicit DtFeatureSetList();
36  explicit DtFeatureSetList(size_t);
37 
39 
46  void add(Inner* fs);
47  void add(const Inner&);
48  void add(std::auto_ptr<Inner>);
49 
51  void addFront(Inner*);
52 
53  std::string label() const;
54  void forEachFeatureParallel(const ForEachFunction& func) const;
55  DetachCallback forEachFeatureAsync(const ForEachFunction& func) const;
56  FS* filter(const DtQuery&, const boost::optional<DtFeatureGeometry>&, DtLoadType) const;
57  DtFeatureSetList* clone() const;
58  bool loaded(double = 0.0) const;
59  DetachCallback addLoadedCallback(const LoadedCallback&) const;
60  unsigned numberOfFeatures() const;
61  bool elided() const;
62  bool empty() const;
63  bool isIndexed() const;
64 
65  void accept(Visitor&);
66  void accept(ConstVisitor&) const;
67 
68  protected:
69  struct ParallelIterator;
70  template <typename Function> struct ParallelAsyncIterator;
71  struct ParallelFilter;
72 
73  struct LoadDetacher;
74 
76  explicit DtFeatureSetList(const DtFeatureSetList&);
77 
78  typedef tbb::spin_mutex AddMutex;
80 
81  typedef std::vector<Inner*> PtrList;
83  };
84 
85  template <size_t N, typename FS, typename Inner>
87  : public FS
88  , public DtObjectDebugger< DtFeatureSetArray<N,FS,Inner> >
89  {
90  public:
91  using FS::filter;
92 
93  typedef FS FeatureSet;
94  typedef typename FeatureSet::ForEachFunction ForEachFunction;
95  typedef typename FeatureSet::LoadedCallback LoadedCallback;
96  typedef typename FeatureSet::DetachCallback DetachCallback;
97  typedef typename FS::Visitor Visitor;
98  typedef typename FS::ConstVisitor ConstVisitor;
99 
101 
108  void set(size_t n, Inner* fs);
109  void set(size_t n, const Inner&);
110  void set(size_t n, std::auto_ptr<Inner>);
111 
112  std::string label() const;
113  void forEachFeatureParallel(const ForEachFunction& func) const;
114  DetachCallback forEachFeatureAsync(const ForEachFunction& func) const;
115  FS* filter(const DtQuery&, const boost::optional<DtFeatureGeometry>&, DtLoadType) const;
116  DtFeatureSetArray* clone() const;
117  bool loaded(double = 0.0) const;
118  DetachCallback addLoadedCallback(const LoadedCallback&) const;
119  unsigned numberOfFeatures() const;
120  bool elided() const;
121  bool empty() const;
122  bool isIndexed() const;
123 
124  void accept(Visitor&);
125  void accept(ConstVisitor&) const;
126 
127  protected:
128  struct ParallelIterator;
129  template <typename Function> struct ParallelAsyncIterator;
130  struct ParallelFilter;
131 
132  struct LoadDetacher;
133 
135  explicit DtFeatureSetArray(const DtFeatureSetArray&);
136 
137  typedef tbb::spin_mutex AddMutex;
139 
140  std::auto_ptr<Inner> myFeatures[N];
141  };
142 }
143 
145 //DT_DEFINE_OBJECT_DEBUGGER_NAME_TEMPLATE(MAKVRinTerra::DtFeatureSetArray);

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)